blob: 5929c23aacc6be570b560c00c2aeea0f96edff2f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Christian Heimesfb2d25a2008-01-07 16:12:44 +00002# From configure.in Revision: 59611 .
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 ;;
14394 esac
14395
Martin v. Löwiseba40652007-08-30 20:10:57 +000014396 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14397echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014398 if test "${ac_cv_pthread_system_supported+set}" = set; then
14399 echo $ECHO_N "(cached) $ECHO_C" >&6
14400else
14401 if test "$cross_compiling" = yes; then
14402 ac_cv_pthread_system_supported=no
14403else
14404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014405/* confdefs.h. */
14406_ACEOF
14407cat confdefs.h >>conftest.$ac_ext
14408cat >>conftest.$ac_ext <<_ACEOF
14409/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014410#include <pthread.h>
14411 void *foo(void *parm) {
14412 return NULL;
14413 }
14414 main() {
14415 pthread_attr_t attr;
14416 pthread_t id;
14417 if (pthread_attr_init(&attr)) exit(-1);
14418 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14419 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14420 exit(0);
14421 }
14422_ACEOF
14423rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014424if { (ac_try="$ac_link"
14425case "(($ac_try" in
14426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14427 *) ac_try_echo=$ac_try;;
14428esac
14429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14430 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014431 ac_status=$?
14432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014434 { (case "(($ac_try" in
14435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14436 *) ac_try_echo=$ac_try;;
14437esac
14438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14439 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014440 ac_status=$?
14441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14442 (exit $ac_status); }; }; then
14443 ac_cv_pthread_system_supported=yes
14444else
14445 echo "$as_me: program exited with status $ac_status" >&5
14446echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014447sed 's/^/| /' conftest.$ac_ext >&5
14448
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014449( exit $ac_status )
14450ac_cv_pthread_system_supported=no
14451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014452rm -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 +000014453fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014454
Martin v. Löwiseba40652007-08-30 20:10:57 +000014455
14456
Guido van Rossum627b2d71993-12-24 10:39:16 +000014457fi
14458
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14460echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014461 if test "$ac_cv_pthread_system_supported" = "yes"; then
14462
14463cat >>confdefs.h <<\_ACEOF
14464#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14465_ACEOF
14466
14467 fi
14468
14469for ac_func in pthread_sigmask
14470do
14471as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014472{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14473echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14474if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014475 echo $ECHO_N "(cached) $ECHO_C" >&6
14476else
14477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014478/* confdefs.h. */
14479_ACEOF
14480cat confdefs.h >>conftest.$ac_ext
14481cat >>conftest.$ac_ext <<_ACEOF
14482/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014483/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14484 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14485#define $ac_func innocuous_$ac_func
14486
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014487/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014488 which can conflict with char $ac_func (); below.
14489 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014490 <limits.h> exists even on freestanding compilers. */
14491
14492#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014493# include <limits.h>
14494#else
14495# include <assert.h>
14496#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014497
14498#undef $ac_func
14499
Martin v. Löwiseba40652007-08-30 20:10:57 +000014500/* Override any GCC internal prototype to avoid an error.
14501 Use char because int might match the return type of a GCC
14502 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014503#ifdef __cplusplus
14504extern "C"
14505#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014506char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014507/* The GNU C library defines this for functions which it implements
14508 to always fail with ENOSYS. Some functions are actually named
14509 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014510#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014511choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014512#endif
14513
Skip Montanaro6dead952003-09-25 14:50:04 +000014514int
14515main ()
14516{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014518 ;
14519 return 0;
14520}
14521_ACEOF
14522rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014523if { (ac_try="$ac_link"
14524case "(($ac_try" in
14525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14526 *) ac_try_echo=$ac_try;;
14527esac
14528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14529 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014531 grep -v '^ *+' conftest.er1 >conftest.err
14532 rm -f conftest.er1
14533 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014535 (exit $ac_status); } && {
14536 test -z "$ac_c_werror_flag" ||
14537 test ! -s conftest.err
14538 } && test -s conftest$ac_exeext &&
14539 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014540 eval "$as_ac_var=yes"
14541else
14542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014543sed 's/^/| /' conftest.$ac_ext >&5
14544
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014547
14548rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014549 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014551ac_res=`eval echo '${'$as_ac_var'}'`
14552 { echo "$as_me:$LINENO: result: $ac_res" >&5
14553echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014554if test `eval echo '${'$as_ac_var'}'` = yes; then
14555 cat >>confdefs.h <<_ACEOF
14556#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14557_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014558 case $ac_sys_system in
14559 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014560
Jason Tishlerfac083d2003-07-22 15:20:49 +000014561cat >>confdefs.h <<\_ACEOF
14562#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14563_ACEOF
14564
14565 ;;
14566 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014567fi
14568done
14569
14570fi
14571
14572
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014573# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014574
14575
Martin v. Löwiseba40652007-08-30 20:10:57 +000014576{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14577echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14578# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014579if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014580 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014581 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014582 { echo "$as_me:$LINENO: result: no" >&5
14583echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014584 ipv6=no
14585 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014586 *) { echo "$as_me:$LINENO: result: yes" >&5
14587echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014589#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014590_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014591
14592 ipv6=yes
14593 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014595else
Martin v. Löwis11437992002-04-12 09:54:03 +000014596
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014597 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014598 { echo "$as_me:$LINENO: result: no" >&5
14599echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014600 ipv6=no
14601
14602else
Martin v. Löwis11437992002-04-12 09:54:03 +000014603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014604/* confdefs.h. */
14605_ACEOF
14606cat confdefs.h >>conftest.$ac_ext
14607cat >>conftest.$ac_ext <<_ACEOF
14608/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014609 /* AF_INET6 available check */
14610#include <sys/types.h>
14611#include <sys/socket.h>
14612main()
14613{
14614 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14615 exit(1);
14616 else
14617 exit(0);
14618}
14619
Martin v. Löwis11437992002-04-12 09:54:03 +000014620_ACEOF
14621rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014622if { (ac_try="$ac_link"
14623case "(($ac_try" in
14624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14625 *) ac_try_echo=$ac_try;;
14626esac
14627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14628 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 ac_status=$?
14630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014632 { (case "(($ac_try" in
14633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14634 *) ac_try_echo=$ac_try;;
14635esac
14636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14637 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 ac_status=$?
14639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14640 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014641 { echo "$as_me:$LINENO: result: yes" >&5
14642echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014643 ipv6=yes
14644else
Martin v. Löwis11437992002-04-12 09:54:03 +000014645 echo "$as_me: program exited with status $ac_status" >&5
14646echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014647sed 's/^/| /' conftest.$ac_ext >&5
14648
Martin v. Löwis11437992002-04-12 09:54:03 +000014649( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650{ echo "$as_me:$LINENO: result: no" >&5
14651echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014652 ipv6=no
14653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014654rm -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 +000014655fi
14656
Martin v. Löwiseba40652007-08-30 20:10:57 +000014657
14658
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014659if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14661echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014663/* confdefs.h. */
14664_ACEOF
14665cat confdefs.h >>conftest.$ac_ext
14666cat >>conftest.$ac_ext <<_ACEOF
14667/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014668#include <sys/types.h>
14669#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014670int
14671main ()
14672{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014673struct sockaddr_in6 x;
14674x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014675 ;
14676 return 0;
14677}
14678_ACEOF
14679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014680if { (ac_try="$ac_compile"
14681case "(($ac_try" in
14682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14683 *) ac_try_echo=$ac_try;;
14684esac
14685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014688 grep -v '^ *+' conftest.er1 >conftest.err
14689 rm -f conftest.er1
14690 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014692 (exit $ac_status); } && {
14693 test -z "$ac_c_werror_flag" ||
14694 test ! -s conftest.err
14695 } && test -s conftest.$ac_objext; then
14696 { echo "$as_me:$LINENO: result: yes" >&5
14697echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014698 ipv6=yes
14699else
Martin v. Löwis11437992002-04-12 09:54:03 +000014700 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014701sed 's/^/| /' conftest.$ac_ext >&5
14702
Martin v. Löwiseba40652007-08-30 20:10:57 +000014703 { echo "$as_me:$LINENO: result: no" >&5
14704echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014705 ipv6=no
14706fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014707
14708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014709fi
14710
14711if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014713#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014714_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014715
14716fi
14717
Martin v. Löwiseba40652007-08-30 20:10:57 +000014718fi
14719
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014720
14721ipv6type=unknown
14722ipv6lib=none
14723ipv6trylibc=no
14724
14725if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
14727echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000014728 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
14729 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014730 case $i in
14731 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014733/* confdefs.h. */
14734_ACEOF
14735cat confdefs.h >>conftest.$ac_ext
14736cat >>conftest.$ac_ext <<_ACEOF
14737/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014738
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014739#include <netinet/in.h>
14740#ifdef IPV6_INRIA_VERSION
14741yes
14742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014743_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014745 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014746 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014747fi
14748rm -f conftest*
14749
14750 ;;
14751 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014753/* confdefs.h. */
14754_ACEOF
14755cat confdefs.h >>conftest.$ac_ext
14756cat >>conftest.$ac_ext <<_ACEOF
14757/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014758
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014759#include <netinet/in.h>
14760#ifdef __KAME__
14761yes
14762#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014763_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014765 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014766 ipv6type=$i;
14767 ipv6lib=inet6
14768 ipv6libdir=/usr/local/v6/lib
14769 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014770fi
14771rm -f conftest*
14772
14773 ;;
14774 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014776/* confdefs.h. */
14777_ACEOF
14778cat confdefs.h >>conftest.$ac_ext
14779cat >>conftest.$ac_ext <<_ACEOF
14780/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014781
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014782#include <features.h>
14783#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
14784yes
14785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014786_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014788 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014789 ipv6type=$i;
14790 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014791fi
14792rm -f conftest*
14793
14794 ;;
14795 linux-inet6)
14796 if test -d /usr/inet6; then
14797 ipv6type=$i
14798 ipv6lib=inet6
14799 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000014800 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014801 fi
14802 ;;
14803 solaris)
14804 if test -f /etc/netconfig; then
14805 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
14806 ipv6type=$i
14807 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014808 fi
14809 fi
14810 ;;
14811 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000014812 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014813/* confdefs.h. */
14814_ACEOF
14815cat confdefs.h >>conftest.$ac_ext
14816cat >>conftest.$ac_ext <<_ACEOF
14817/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014818
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014819#include <sys/param.h>
14820#ifdef _TOSHIBA_INET6
14821yes
14822#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014823_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014825 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014826 ipv6type=$i;
14827 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014828 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014829fi
14830rm -f conftest*
14831
14832 ;;
14833 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000014834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014835/* confdefs.h. */
14836_ACEOF
14837cat confdefs.h >>conftest.$ac_ext
14838cat >>conftest.$ac_ext <<_ACEOF
14839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014841#include </usr/local/v6/include/sys/v6config.h>
14842#ifdef __V6D__
14843yes
14844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014847 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014848 ipv6type=$i;
14849 ipv6lib=v6;
14850 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000014851 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014852fi
14853rm -f conftest*
14854
14855 ;;
14856 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000014857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014858/* confdefs.h. */
14859_ACEOF
14860cat confdefs.h >>conftest.$ac_ext
14861cat >>conftest.$ac_ext <<_ACEOF
14862/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014863
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014864#include <sys/param.h>
14865#ifdef _ZETA_MINAMI_INET6
14866yes
14867#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014868_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014870 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014871 ipv6type=$i;
14872 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014873 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014874fi
14875rm -f conftest*
14876
14877 ;;
14878 esac
14879 if test "$ipv6type" != "unknown"; then
14880 break
14881 fi
14882 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000014883 { echo "$as_me:$LINENO: result: $ipv6type" >&5
14884echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014885fi
14886
14887if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
14888 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
14889 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
14890 echo "using lib$ipv6lib"
14891 else
14892 if test $ipv6trylibc = "yes"; then
14893 echo "using libc"
14894 else
14895 echo 'Fatal: no $ipv6lib library found. cannot continue.'
14896 echo "You need to fetch lib$ipv6lib.a from appropriate"
14897 echo 'ipv6 kit and compile beforehand.'
14898 exit 1
14899 fi
14900 fi
14901fi
14902
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014903# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000014904{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
14905echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014906
Martin v. Löwiseba40652007-08-30 20:10:57 +000014907# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014908if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014909 withval=$with_doc_strings;
14910fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014911
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014912
14913if test -z "$with_doc_strings"
14914then with_doc_strings="yes"
14915fi
14916if test "$with_doc_strings" != "no"
14917then
14918
14919cat >>confdefs.h <<\_ACEOF
14920#define WITH_DOC_STRINGS 1
14921_ACEOF
14922
14923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014924{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
14925echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014926
Neil Schemenauera35c6882001-02-27 04:45:05 +000014927# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014928{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
14929echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014930
Martin v. Löwiseba40652007-08-30 20:10:57 +000014931# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014932if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014934if test "$withval" != no
14935then
14936
14937cat >>confdefs.h <<\_ACEOF
14938#define WITH_TSC 1
14939_ACEOF
14940
Martin v. Löwiseba40652007-08-30 20:10:57 +000014941 { echo "$as_me:$LINENO: result: yes" >&5
14942echo "${ECHO_T}yes" >&6; }
14943else { echo "$as_me:$LINENO: result: no" >&5
14944echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014945fi
14946else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947 { echo "$as_me:$LINENO: result: no" >&5
14948echo "${ECHO_T}no" >&6; }
14949fi
14950
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014951
14952# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
14954echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014955
Martin v. Löwiseba40652007-08-30 20:10:57 +000014956# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000014957if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014958 withval=$with_pymalloc;
14959fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014960
Neil Schemenauera35c6882001-02-27 04:45:05 +000014961
Neil Schemenauer16c22972002-03-22 15:34:49 +000014962if test -z "$with_pymalloc"
14963then with_pymalloc="yes"
14964fi
14965if test "$with_pymalloc" != "no"
14966then
Martin v. Löwis11437992002-04-12 09:54:03 +000014967
14968cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014969#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014970_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014971
14972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014973{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
14974echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000014975
Barry Warsawef82cd72000-06-30 16:21:01 +000014976# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
14978echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014979
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000014981if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014982 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000014983if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014984then
14985
14986cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000014987#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014988_ACEOF
14989
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990 { echo "$as_me:$LINENO: result: yes" >&5
14991echo "${ECHO_T}yes" >&6; }
14992else { echo "$as_me:$LINENO: result: no" >&5
14993echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000014994fi
14995else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014996 { echo "$as_me:$LINENO: result: no" >&5
14997echo "${ECHO_T}no" >&6; }
14998fi
14999
Barry Warsawef82cd72000-06-30 16:21:01 +000015000
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015001# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015002
Guido van Rossum98935bf2001-09-05 19:13:16 +000015003DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015004
Guido van Rossume97ee181999-12-20 21:27:22 +000015005# the dlopen() function means we might want to use dynload_shlib.o. some
15006# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015007
Thomas Wouters3a584202000-08-05 23:28:51 +000015008for ac_func in dlopen
15009do
Martin v. Löwis11437992002-04-12 09:54:03 +000015010as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015011{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15012echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15013if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015014 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015017/* confdefs.h. */
15018_ACEOF
15019cat confdefs.h >>conftest.$ac_ext
15020cat >>conftest.$ac_ext <<_ACEOF
15021/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015022/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15023 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15024#define $ac_func innocuous_$ac_func
15025
Guido van Rossume97ee181999-12-20 21:27:22 +000015026/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015027 which can conflict with char $ac_func (); below.
15028 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015029 <limits.h> exists even on freestanding compilers. */
15030
15031#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015032# include <limits.h>
15033#else
15034# include <assert.h>
15035#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015036
15037#undef $ac_func
15038
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039/* Override any GCC internal prototype to avoid an error.
15040 Use char because int might match the return type of a GCC
15041 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015042#ifdef __cplusplus
15043extern "C"
15044#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015045char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015046/* The GNU C library defines this for functions which it implements
15047 to always fail with ENOSYS. Some functions are actually named
15048 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015050choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015051#endif
15052
Skip Montanaro6dead952003-09-25 14:50:04 +000015053int
15054main ()
15055{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015057 ;
15058 return 0;
15059}
15060_ACEOF
15061rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015062if { (ac_try="$ac_link"
15063case "(($ac_try" in
15064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15065 *) ac_try_echo=$ac_try;;
15066esac
15067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015070 grep -v '^ *+' conftest.er1 >conftest.err
15071 rm -f conftest.er1
15072 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015074 (exit $ac_status); } && {
15075 test -z "$ac_c_werror_flag" ||
15076 test ! -s conftest.err
15077 } && test -s conftest$ac_exeext &&
15078 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015080else
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015082sed 's/^/| /' conftest.$ac_ext >&5
15083
Martin v. Löwiseba40652007-08-30 20:10:57 +000015084 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015086
15087rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015088 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015089fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090ac_res=`eval echo '${'$as_ac_var'}'`
15091 { echo "$as_me:$LINENO: result: $ac_res" >&5
15092echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015093if test `eval echo '${'$as_ac_var'}'` = yes; then
15094 cat >>confdefs.h <<_ACEOF
15095#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15096_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015097
Guido van Rossume97ee181999-12-20 21:27:22 +000015098fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015099done
Guido van Rossume97ee181999-12-20 21:27:22 +000015100
Michael W. Hudson54241132001-12-07 15:38:26 +000015101
Guido van Rossume97ee181999-12-20 21:27:22 +000015102# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15103# loading of modules.
15104
Martin v. Löwiseba40652007-08-30 20:10:57 +000015105{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15106echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015107if test -z "$DYNLOADFILE"
15108then
15109 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015110 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15111 if test "$ac_cv_func_dlopen" = yes
15112 then DYNLOADFILE="dynload_shlib.o"
15113 else DYNLOADFILE="dynload_aix.o"
15114 fi
15115 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015116 BeOS*) DYNLOADFILE="dynload_beos.o";;
15117 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015118 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15119 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015120 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015121 *)
15122 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15123 # out any dynamic loading
15124 if test "$ac_cv_func_dlopen" = yes
15125 then DYNLOADFILE="dynload_shlib.o"
15126 else DYNLOADFILE="dynload_stub.o"
15127 fi
15128 ;;
15129 esac
15130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015131{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15132echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015133if test "$DYNLOADFILE" != "dynload_stub.o"
15134then
Martin v. Löwis11437992002-04-12 09:54:03 +000015135
15136cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015137#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015138_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015139
15140fi
15141
Neil Schemenauer4e425612001-06-19 15:44:15 +000015142# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15143
Michael W. Hudson54241132001-12-07 15:38:26 +000015144
Martin v. Löwiseba40652007-08-30 20:10:57 +000015145{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15146echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015147if test -z "$MACHDEP_OBJS"
15148then
Jack Jansene578a632001-08-15 01:27:14 +000015149 MACHDEP_OBJS=$extra_machdep_objs
15150else
15151 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015152fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015153{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15154echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015155
Guido van Rossum627b2d71993-12-24 10:39:16 +000015156# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015157
15158
15159
15160
15161
15162
15163
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000015228
Martin v. Löwisc3001752005-01-23 09:27:24 +000015229
15230
Neal Norwitz05a45592006-03-20 06:30:08 +000015231
15232
Martin v. Löwis382abef2007-02-19 10:55:19 +000015233
15234
Christian Heimes36281872007-11-30 21:11:28 +000015235
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015236for ac_func in alarm bind_textdomain_codeset chown clock confstr \
Christian Heimes36281872007-11-30 21:11:28 +000015237 ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015238 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015239 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015240 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015241 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015242 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015243 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015244 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015245 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015246 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015247 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015248do
Martin v. Löwis11437992002-04-12 09:54:03 +000015249as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15251echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15252if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015254else
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015256/* confdefs.h. */
15257_ACEOF
15258cat confdefs.h >>conftest.$ac_ext
15259cat >>conftest.$ac_ext <<_ACEOF
15260/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015261/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15262 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15263#define $ac_func innocuous_$ac_func
15264
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015265/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015266 which can conflict with char $ac_func (); below.
15267 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015268 <limits.h> exists even on freestanding compilers. */
15269
15270#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015271# include <limits.h>
15272#else
15273# include <assert.h>
15274#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015275
15276#undef $ac_func
15277
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278/* Override any GCC internal prototype to avoid an error.
15279 Use char because int might match the return type of a GCC
15280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015281#ifdef __cplusplus
15282extern "C"
15283#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015284char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015285/* The GNU C library defines this for functions which it implements
15286 to always fail with ENOSYS. Some functions are actually named
15287 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015289choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015290#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015291
Skip Montanaro6dead952003-09-25 14:50:04 +000015292int
15293main ()
15294{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015295return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015296 ;
15297 return 0;
15298}
15299_ACEOF
15300rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015301if { (ac_try="$ac_link"
15302case "(($ac_try" in
15303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15304 *) ac_try_echo=$ac_try;;
15305esac
15306eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15307 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015308 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015309 grep -v '^ *+' conftest.er1 >conftest.err
15310 rm -f conftest.er1
15311 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313 (exit $ac_status); } && {
15314 test -z "$ac_c_werror_flag" ||
15315 test ! -s conftest.err
15316 } && test -s conftest$ac_exeext &&
15317 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015319else
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015321sed 's/^/| /' conftest.$ac_ext >&5
15322
Martin v. Löwiseba40652007-08-30 20:10:57 +000015323 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325
15326rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015327 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329ac_res=`eval echo '${'$as_ac_var'}'`
15330 { echo "$as_me:$LINENO: result: $ac_res" >&5
15331echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015332if test `eval echo '${'$as_ac_var'}'` = yes; then
15333 cat >>confdefs.h <<_ACEOF
15334#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15335_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015336
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015337fi
15338done
15339
Michael W. Hudson54241132001-12-07 15:38:26 +000015340
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015341# For some functions, having a definition is not sufficient, since
15342# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343{ echo "$as_me:$LINENO: checking for chroot" >&5
15344echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015345cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015346/* confdefs.h. */
15347_ACEOF
15348cat confdefs.h >>conftest.$ac_ext
15349cat >>conftest.$ac_ext <<_ACEOF
15350/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015351#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015352int
15353main ()
15354{
15355void *x=chroot
15356 ;
15357 return 0;
15358}
15359_ACEOF
15360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015361if { (ac_try="$ac_compile"
15362case "(($ac_try" in
15363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15364 *) ac_try_echo=$ac_try;;
15365esac
15366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015369 grep -v '^ *+' conftest.er1 >conftest.err
15370 rm -f conftest.er1
15371 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373 (exit $ac_status); } && {
15374 test -z "$ac_c_werror_flag" ||
15375 test ! -s conftest.err
15376 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015377
15378cat >>confdefs.h <<\_ACEOF
15379#define HAVE_CHROOT 1
15380_ACEOF
15381
Martin v. Löwiseba40652007-08-30 20:10:57 +000015382 { echo "$as_me:$LINENO: result: yes" >&5
15383echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015384else
15385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015386sed 's/^/| /' conftest.$ac_ext >&5
15387
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388 { echo "$as_me:$LINENO: result: no" >&5
15389echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015390
15391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015392
15393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15394{ echo "$as_me:$LINENO: checking for link" >&5
15395echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015397/* confdefs.h. */
15398_ACEOF
15399cat confdefs.h >>conftest.$ac_ext
15400cat >>conftest.$ac_ext <<_ACEOF
15401/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015402#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015403int
15404main ()
15405{
15406void *x=link
15407 ;
15408 return 0;
15409}
15410_ACEOF
15411rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015412if { (ac_try="$ac_compile"
15413case "(($ac_try" in
15414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15415 *) ac_try_echo=$ac_try;;
15416esac
15417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015420 grep -v '^ *+' conftest.er1 >conftest.err
15421 rm -f conftest.er1
15422 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424 (exit $ac_status); } && {
15425 test -z "$ac_c_werror_flag" ||
15426 test ! -s conftest.err
15427 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015428
15429cat >>confdefs.h <<\_ACEOF
15430#define HAVE_LINK 1
15431_ACEOF
15432
Martin v. Löwiseba40652007-08-30 20:10:57 +000015433 { echo "$as_me:$LINENO: result: yes" >&5
15434echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015435else
15436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015437sed 's/^/| /' conftest.$ac_ext >&5
15438
Martin v. Löwiseba40652007-08-30 20:10:57 +000015439 { echo "$as_me:$LINENO: result: no" >&5
15440echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015441
15442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015443
15444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15445{ echo "$as_me:$LINENO: checking for symlink" >&5
15446echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015447cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015448/* confdefs.h. */
15449_ACEOF
15450cat confdefs.h >>conftest.$ac_ext
15451cat >>conftest.$ac_ext <<_ACEOF
15452/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015453#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015454int
15455main ()
15456{
15457void *x=symlink
15458 ;
15459 return 0;
15460}
15461_ACEOF
15462rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015463if { (ac_try="$ac_compile"
15464case "(($ac_try" in
15465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15466 *) ac_try_echo=$ac_try;;
15467esac
15468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015471 grep -v '^ *+' conftest.er1 >conftest.err
15472 rm -f conftest.er1
15473 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015475 (exit $ac_status); } && {
15476 test -z "$ac_c_werror_flag" ||
15477 test ! -s conftest.err
15478 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015479
15480cat >>confdefs.h <<\_ACEOF
15481#define HAVE_SYMLINK 1
15482_ACEOF
15483
Martin v. Löwiseba40652007-08-30 20:10:57 +000015484 { echo "$as_me:$LINENO: result: yes" >&5
15485echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015486else
15487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015488sed 's/^/| /' conftest.$ac_ext >&5
15489
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490 { echo "$as_me:$LINENO: result: no" >&5
15491echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015492
15493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015494
15495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15496{ echo "$as_me:$LINENO: checking for fchdir" >&5
15497echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015499/* confdefs.h. */
15500_ACEOF
15501cat confdefs.h >>conftest.$ac_ext
15502cat >>conftest.$ac_ext <<_ACEOF
15503/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015504#include <unistd.h>
15505int
15506main ()
15507{
15508void *x=fchdir
15509 ;
15510 return 0;
15511}
15512_ACEOF
15513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015514if { (ac_try="$ac_compile"
15515case "(($ac_try" in
15516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15517 *) ac_try_echo=$ac_try;;
15518esac
15519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015522 grep -v '^ *+' conftest.er1 >conftest.err
15523 rm -f conftest.er1
15524 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015526 (exit $ac_status); } && {
15527 test -z "$ac_c_werror_flag" ||
15528 test ! -s conftest.err
15529 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015530
15531cat >>confdefs.h <<\_ACEOF
15532#define HAVE_FCHDIR 1
15533_ACEOF
15534
Martin v. Löwiseba40652007-08-30 20:10:57 +000015535 { echo "$as_me:$LINENO: result: yes" >&5
15536echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015537else
15538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015539sed 's/^/| /' conftest.$ac_ext >&5
15540
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541 { echo "$as_me:$LINENO: result: no" >&5
15542echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015543
15544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015545
15546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15547{ echo "$as_me:$LINENO: checking for fsync" >&5
15548echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015549cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015550/* confdefs.h. */
15551_ACEOF
15552cat confdefs.h >>conftest.$ac_ext
15553cat >>conftest.$ac_ext <<_ACEOF
15554/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015555#include <unistd.h>
15556int
15557main ()
15558{
15559void *x=fsync
15560 ;
15561 return 0;
15562}
15563_ACEOF
15564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565if { (ac_try="$ac_compile"
15566case "(($ac_try" in
15567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15568 *) ac_try_echo=$ac_try;;
15569esac
15570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015573 grep -v '^ *+' conftest.er1 >conftest.err
15574 rm -f conftest.er1
15575 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577 (exit $ac_status); } && {
15578 test -z "$ac_c_werror_flag" ||
15579 test ! -s conftest.err
15580 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015581
15582cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015583#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015584_ACEOF
15585
Martin v. Löwiseba40652007-08-30 20:10:57 +000015586 { echo "$as_me:$LINENO: result: yes" >&5
15587echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015588else
15589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015590sed 's/^/| /' conftest.$ac_ext >&5
15591
Martin v. Löwiseba40652007-08-30 20:10:57 +000015592 { echo "$as_me:$LINENO: result: no" >&5
15593echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015594
15595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015596
15597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15598{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15599echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015600cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015601/* confdefs.h. */
15602_ACEOF
15603cat confdefs.h >>conftest.$ac_ext
15604cat >>conftest.$ac_ext <<_ACEOF
15605/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015606#include <unistd.h>
15607int
15608main ()
15609{
15610void *x=fdatasync
15611 ;
15612 return 0;
15613}
15614_ACEOF
15615rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616if { (ac_try="$ac_compile"
15617case "(($ac_try" in
15618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15619 *) ac_try_echo=$ac_try;;
15620esac
15621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015624 grep -v '^ *+' conftest.er1 >conftest.err
15625 rm -f conftest.er1
15626 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628 (exit $ac_status); } && {
15629 test -z "$ac_c_werror_flag" ||
15630 test ! -s conftest.err
15631 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015632
15633cat >>confdefs.h <<\_ACEOF
15634#define HAVE_FDATASYNC 1
15635_ACEOF
15636
Martin v. Löwiseba40652007-08-30 20:10:57 +000015637 { echo "$as_me:$LINENO: result: yes" >&5
15638echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015639else
15640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015641sed 's/^/| /' conftest.$ac_ext >&5
15642
Martin v. Löwiseba40652007-08-30 20:10:57 +000015643 { echo "$as_me:$LINENO: result: no" >&5
15644echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015645
15646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015647
15648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015649
Martin v. Löwisd5843682002-11-21 20:41:28 +000015650# On some systems (eg. FreeBSD 5), we would find a definition of the
15651# functions ctermid_r, setgroups in the library, but no prototype
15652# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
15653# address to avoid compiler warnings and potential miscompilations
15654# because of the missing prototypes.
15655
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
15657echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015659/* confdefs.h. */
15660_ACEOF
15661cat confdefs.h >>conftest.$ac_ext
15662cat >>conftest.$ac_ext <<_ACEOF
15663/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015664
15665#include "confdefs.h"
15666#include <stdio.h>
15667
Martin v. Löwisd5843682002-11-21 20:41:28 +000015668int
15669main ()
15670{
15671void* p = ctermid_r
15672 ;
15673 return 0;
15674}
15675_ACEOF
15676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015677if { (ac_try="$ac_compile"
15678case "(($ac_try" in
15679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15680 *) ac_try_echo=$ac_try;;
15681esac
15682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015685 grep -v '^ *+' conftest.er1 >conftest.err
15686 rm -f conftest.er1
15687 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689 (exit $ac_status); } && {
15690 test -z "$ac_c_werror_flag" ||
15691 test ! -s conftest.err
15692 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015693
15694cat >>confdefs.h <<\_ACEOF
15695#define HAVE_CTERMID_R 1
15696_ACEOF
15697
Martin v. Löwiseba40652007-08-30 20:10:57 +000015698 { echo "$as_me:$LINENO: result: yes" >&5
15699echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015700else
15701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015702sed 's/^/| /' conftest.$ac_ext >&5
15703
Martin v. Löwiseba40652007-08-30 20:10:57 +000015704 { echo "$as_me:$LINENO: result: no" >&5
15705echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000015706
15707fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000015708
Martin v. Löwiseba40652007-08-30 20:10:57 +000015709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15710
15711{ echo "$as_me:$LINENO: checking for flock" >&5
15712echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015714/* confdefs.h. */
15715_ACEOF
15716cat confdefs.h >>conftest.$ac_ext
15717cat >>conftest.$ac_ext <<_ACEOF
15718/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015719
15720#include "confdefs.h"
15721#include <sys/file.h>
15722
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015723int
15724main ()
15725{
15726void* p = flock
15727 ;
15728 return 0;
15729}
15730_ACEOF
15731rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015732if { (ac_try="$ac_compile"
15733case "(($ac_try" in
15734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15735 *) ac_try_echo=$ac_try;;
15736esac
15737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15738 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015740 grep -v '^ *+' conftest.er1 >conftest.err
15741 rm -f conftest.er1
15742 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015744 (exit $ac_status); } && {
15745 test -z "$ac_c_werror_flag" ||
15746 test ! -s conftest.err
15747 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015748
15749cat >>confdefs.h <<\_ACEOF
15750#define HAVE_FLOCK 1
15751_ACEOF
15752
Martin v. Löwiseba40652007-08-30 20:10:57 +000015753 { echo "$as_me:$LINENO: result: yes" >&5
15754echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015755else
15756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015757sed 's/^/| /' conftest.$ac_ext >&5
15758
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759 { echo "$as_me:$LINENO: result: no" >&5
15760echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015761
15762fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015763
Martin v. Löwiseba40652007-08-30 20:10:57 +000015764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15765
15766{ echo "$as_me:$LINENO: checking for getpagesize" >&5
15767echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015768cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015769/* confdefs.h. */
15770_ACEOF
15771cat confdefs.h >>conftest.$ac_ext
15772cat >>conftest.$ac_ext <<_ACEOF
15773/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015774
15775#include "confdefs.h"
15776#include <unistd.h>
15777
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015778int
15779main ()
15780{
15781void* p = getpagesize
15782 ;
15783 return 0;
15784}
15785_ACEOF
15786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015787if { (ac_try="$ac_compile"
15788case "(($ac_try" in
15789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15790 *) ac_try_echo=$ac_try;;
15791esac
15792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015795 grep -v '^ *+' conftest.er1 >conftest.err
15796 rm -f conftest.er1
15797 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015799 (exit $ac_status); } && {
15800 test -z "$ac_c_werror_flag" ||
15801 test ! -s conftest.err
15802 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015803
15804cat >>confdefs.h <<\_ACEOF
15805#define HAVE_GETPAGESIZE 1
15806_ACEOF
15807
Martin v. Löwiseba40652007-08-30 20:10:57 +000015808 { echo "$as_me:$LINENO: result: yes" >&5
15809echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015810else
15811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015812sed 's/^/| /' conftest.$ac_ext >&5
15813
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814 { echo "$as_me:$LINENO: result: no" >&5
15815echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015816
15817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015818
15819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015820
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015821for ac_prog in true
15822do
15823 # Extract the first word of "$ac_prog", so it can be a program name with args.
15824set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000015825{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15826echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015827if test "${ac_cv_prog_TRUE+set}" = set; then
15828 echo $ECHO_N "(cached) $ECHO_C" >&6
15829else
15830 if test -n "$TRUE"; then
15831 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
15832else
15833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15834for as_dir in $PATH
15835do
15836 IFS=$as_save_IFS
15837 test -z "$as_dir" && as_dir=.
15838 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839 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 +000015840 ac_cv_prog_TRUE="$ac_prog"
15841 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15842 break 2
15843 fi
15844done
15845done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015846IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015847
15848fi
15849fi
15850TRUE=$ac_cv_prog_TRUE
15851if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852 { echo "$as_me:$LINENO: result: $TRUE" >&5
15853echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015854else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015855 { echo "$as_me:$LINENO: result: no" >&5
15856echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015857fi
15858
Martin v. Löwiseba40652007-08-30 20:10:57 +000015859
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015860 test -n "$TRUE" && break
15861done
15862test -n "$TRUE" || TRUE="/bin/true"
15863
15864
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
15866echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015867if test "${ac_cv_lib_c_inet_aton+set}" = set; then
15868 echo $ECHO_N "(cached) $ECHO_C" >&6
15869else
15870 ac_check_lib_save_LIBS=$LIBS
15871LIBS="-lc $LIBS"
15872cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015873/* confdefs.h. */
15874_ACEOF
15875cat confdefs.h >>conftest.$ac_ext
15876cat >>conftest.$ac_ext <<_ACEOF
15877/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015878
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879/* Override any GCC internal prototype to avoid an error.
15880 Use char because int might match the return type of a GCC
15881 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015882#ifdef __cplusplus
15883extern "C"
15884#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015885char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015886int
15887main ()
15888{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015889return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015890 ;
15891 return 0;
15892}
15893_ACEOF
15894rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015895if { (ac_try="$ac_link"
15896case "(($ac_try" in
15897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15898 *) ac_try_echo=$ac_try;;
15899esac
15900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15901 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015903 grep -v '^ *+' conftest.er1 >conftest.err
15904 rm -f conftest.er1
15905 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015907 (exit $ac_status); } && {
15908 test -z "$ac_c_werror_flag" ||
15909 test ! -s conftest.err
15910 } && test -s conftest$ac_exeext &&
15911 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015912 ac_cv_lib_c_inet_aton=yes
15913else
15914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015915sed 's/^/| /' conftest.$ac_ext >&5
15916
Martin v. Löwiseba40652007-08-30 20:10:57 +000015917 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015919
15920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015922LIBS=$ac_check_lib_save_LIBS
15923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015924{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
15925echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015926if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015927 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015928else
15929
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15931echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015932if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15933 echo $ECHO_N "(cached) $ECHO_C" >&6
15934else
15935 ac_check_lib_save_LIBS=$LIBS
15936LIBS="-lresolv $LIBS"
15937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015938/* confdefs.h. */
15939_ACEOF
15940cat confdefs.h >>conftest.$ac_ext
15941cat >>conftest.$ac_ext <<_ACEOF
15942/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015943
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944/* Override any GCC internal prototype to avoid an error.
15945 Use char because int might match the return type of a GCC
15946 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015947#ifdef __cplusplus
15948extern "C"
15949#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015950char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015951int
15952main ()
15953{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015954return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015955 ;
15956 return 0;
15957}
15958_ACEOF
15959rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015960if { (ac_try="$ac_link"
15961case "(($ac_try" in
15962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15963 *) ac_try_echo=$ac_try;;
15964esac
15965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15966 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015968 grep -v '^ *+' conftest.er1 >conftest.err
15969 rm -f conftest.er1
15970 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015972 (exit $ac_status); } && {
15973 test -z "$ac_c_werror_flag" ||
15974 test ! -s conftest.err
15975 } && test -s conftest$ac_exeext &&
15976 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015977 ac_cv_lib_resolv_inet_aton=yes
15978else
15979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015980sed 's/^/| /' conftest.$ac_ext >&5
15981
Martin v. Löwiseba40652007-08-30 20:10:57 +000015982 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015984
15985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015987LIBS=$ac_check_lib_save_LIBS
15988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015989{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15990echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015991if test $ac_cv_lib_resolv_inet_aton = yes; then
15992 cat >>confdefs.h <<_ACEOF
15993#define HAVE_LIBRESOLV 1
15994_ACEOF
15995
15996 LIBS="-lresolv $LIBS"
15997
15998fi
15999
16000
16001fi
16002
16003
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016004# On Tru64, chflags seems to be present, but calling it will
16005# exit Python
16006{ echo "$as_me:$LINENO: checking for chflags" >&5
16007echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16008if test "$cross_compiling" = yes; then
16009 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16010See \`config.log' for more details." >&5
16011echo "$as_me: error: cannot run test program while cross compiling
16012See \`config.log' for more details." >&2;}
16013 { (exit 1); exit 1; }; }
16014else
16015 cat >conftest.$ac_ext <<_ACEOF
16016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
16021
16022#include <sys/stat.h>
16023#include <unistd.h>
16024int main(int argc, char*argv[])
16025{
16026 if(chflags(argv[0], 0) != 0)
16027 return 1;
16028 return 0;
16029}
16030
16031_ACEOF
16032rm -f conftest$ac_exeext
16033if { (ac_try="$ac_link"
16034case "(($ac_try" in
16035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16036 *) ac_try_echo=$ac_try;;
16037esac
16038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16039 (eval "$ac_link") 2>&5
16040 ac_status=$?
16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16043 { (case "(($ac_try" in
16044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16045 *) ac_try_echo=$ac_try;;
16046esac
16047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16048 (eval "$ac_try") 2>&5
16049 ac_status=$?
16050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16051 (exit $ac_status); }; }; then
16052
16053cat >>confdefs.h <<\_ACEOF
16054#define HAVE_CHFLAGS 1
16055_ACEOF
16056
16057 { echo "$as_me:$LINENO: result: yes" >&5
16058echo "${ECHO_T}yes" >&6; }
16059else
16060 echo "$as_me: program exited with status $ac_status" >&5
16061echo "$as_me: failed program was:" >&5
16062sed 's/^/| /' conftest.$ac_ext >&5
16063
16064( exit $ac_status )
16065{ echo "$as_me:$LINENO: result: no" >&5
16066echo "${ECHO_T}no" >&6; }
16067
16068fi
16069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16070fi
16071
16072
16073
16074{ echo "$as_me:$LINENO: checking for lchflags" >&5
16075echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16076if test "$cross_compiling" = yes; then
16077 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16078See \`config.log' for more details." >&5
16079echo "$as_me: error: cannot run test program while cross compiling
16080See \`config.log' for more details." >&2;}
16081 { (exit 1); exit 1; }; }
16082else
16083 cat >conftest.$ac_ext <<_ACEOF
16084/* confdefs.h. */
16085_ACEOF
16086cat confdefs.h >>conftest.$ac_ext
16087cat >>conftest.$ac_ext <<_ACEOF
16088/* end confdefs.h. */
16089
16090#include <sys/stat.h>
16091#include <unistd.h>
16092int main(int argc, char*argv[])
16093{
16094 if(lchflags(argv[0], 0) != 0)
16095 return 1;
16096 return 0;
16097}
16098
16099_ACEOF
16100rm -f conftest$ac_exeext
16101if { (ac_try="$ac_link"
16102case "(($ac_try" in
16103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16104 *) ac_try_echo=$ac_try;;
16105esac
16106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16107 (eval "$ac_link") 2>&5
16108 ac_status=$?
16109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16110 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16111 { (case "(($ac_try" in
16112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16113 *) ac_try_echo=$ac_try;;
16114esac
16115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16116 (eval "$ac_try") 2>&5
16117 ac_status=$?
16118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16119 (exit $ac_status); }; }; then
16120
16121cat >>confdefs.h <<\_ACEOF
16122#define HAVE_LCHFLAGS 1
16123_ACEOF
16124
16125 { echo "$as_me:$LINENO: result: yes" >&5
16126echo "${ECHO_T}yes" >&6; }
16127else
16128 echo "$as_me: program exited with status $ac_status" >&5
16129echo "$as_me: failed program was:" >&5
16130sed 's/^/| /' conftest.$ac_ext >&5
16131
16132( exit $ac_status )
16133{ echo "$as_me:$LINENO: result: no" >&5
16134echo "${ECHO_T}no" >&6; }
16135
16136fi
16137rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16138fi
16139
16140
16141
Ronald Oussorenf8752642006-07-06 10:13:35 +000016142case $ac_sys_system/$ac_sys_release in
16143Darwin/*)
16144 _CUR_CFLAGS="${CFLAGS}"
16145 _CUR_LDFLAGS="${LDFLAGS}"
16146 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16147 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16148 ;;
16149esac
16150
Martin v. Löwiseba40652007-08-30 20:10:57 +000016151{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16152echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016153if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16154 echo $ECHO_N "(cached) $ECHO_C" >&6
16155else
16156 ac_check_lib_save_LIBS=$LIBS
16157LIBS="-lz $LIBS"
16158cat >conftest.$ac_ext <<_ACEOF
16159/* confdefs.h. */
16160_ACEOF
16161cat confdefs.h >>conftest.$ac_ext
16162cat >>conftest.$ac_ext <<_ACEOF
16163/* end confdefs.h. */
16164
Martin v. Löwiseba40652007-08-30 20:10:57 +000016165/* Override any GCC internal prototype to avoid an error.
16166 Use char because int might match the return type of a GCC
16167 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016168#ifdef __cplusplus
16169extern "C"
16170#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016171char inflateCopy ();
16172int
16173main ()
16174{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016176 ;
16177 return 0;
16178}
16179_ACEOF
16180rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016181if { (ac_try="$ac_link"
16182case "(($ac_try" in
16183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16184 *) ac_try_echo=$ac_try;;
16185esac
16186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16187 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016188 ac_status=$?
16189 grep -v '^ *+' conftest.er1 >conftest.err
16190 rm -f conftest.er1
16191 cat conftest.err >&5
16192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193 (exit $ac_status); } && {
16194 test -z "$ac_c_werror_flag" ||
16195 test ! -s conftest.err
16196 } && test -s conftest$ac_exeext &&
16197 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016198 ac_cv_lib_z_inflateCopy=yes
16199else
16200 echo "$as_me: failed program was:" >&5
16201sed 's/^/| /' conftest.$ac_ext >&5
16202
Martin v. Löwiseba40652007-08-30 20:10:57 +000016203 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016205
16206rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016207 conftest$ac_exeext conftest.$ac_ext
16208LIBS=$ac_check_lib_save_LIBS
16209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16211echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016212if test $ac_cv_lib_z_inflateCopy = yes; then
16213
16214cat >>confdefs.h <<\_ACEOF
16215#define HAVE_ZLIB_COPY 1
16216_ACEOF
16217
16218fi
16219
16220
Ronald Oussorenf8752642006-07-06 10:13:35 +000016221case $ac_sys_system/$ac_sys_release in
16222Darwin/*)
16223 CFLAGS="${_CUR_CFLAGS}"
16224 LDFLAGS="${_CUR_LDFLAGS}"
16225 ;;
16226esac
16227
Martin v. Löwiseba40652007-08-30 20:10:57 +000016228{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16229echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016230cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016231/* confdefs.h. */
16232_ACEOF
16233cat confdefs.h >>conftest.$ac_ext
16234cat >>conftest.$ac_ext <<_ACEOF
16235/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016236
16237#include "confdefs.h"
16238#include <netdb.h>
16239
Martin v. Löwise9416172003-05-03 10:12:45 +000016240int
16241main ()
16242{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016243void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016244 ;
16245 return 0;
16246}
16247_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016248rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249if { (ac_try="$ac_link"
16250case "(($ac_try" in
16251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16252 *) ac_try_echo=$ac_try;;
16253esac
16254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16255 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016256 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016257 grep -v '^ *+' conftest.er1 >conftest.err
16258 rm -f conftest.er1
16259 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016261 (exit $ac_status); } && {
16262 test -z "$ac_c_werror_flag" ||
16263 test ! -s conftest.err
16264 } && test -s conftest$ac_exeext &&
16265 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016266
16267cat >>confdefs.h <<\_ACEOF
16268#define HAVE_HSTRERROR 1
16269_ACEOF
16270
Martin v. Löwiseba40652007-08-30 20:10:57 +000016271 { echo "$as_me:$LINENO: result: yes" >&5
16272echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016273else
16274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016275sed 's/^/| /' conftest.$ac_ext >&5
16276
Martin v. Löwiseba40652007-08-30 20:10:57 +000016277 { echo "$as_me:$LINENO: result: no" >&5
16278echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016279
16280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016281
16282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016283 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016284
Martin v. Löwiseba40652007-08-30 20:10:57 +000016285{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16286echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016288/* confdefs.h. */
16289_ACEOF
16290cat confdefs.h >>conftest.$ac_ext
16291cat >>conftest.$ac_ext <<_ACEOF
16292/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016293
16294#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016295#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016296#include <sys/socket.h>
16297#include <netinet/in.h>
16298#include <arpa/inet.h>
16299
Martin v. Löwise9416172003-05-03 10:12:45 +000016300int
16301main ()
16302{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016303void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016304 ;
16305 return 0;
16306}
16307_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016308rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016309if { (ac_try="$ac_link"
16310case "(($ac_try" in
16311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16312 *) ac_try_echo=$ac_try;;
16313esac
16314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16315 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016317 grep -v '^ *+' conftest.er1 >conftest.err
16318 rm -f conftest.er1
16319 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016321 (exit $ac_status); } && {
16322 test -z "$ac_c_werror_flag" ||
16323 test ! -s conftest.err
16324 } && test -s conftest$ac_exeext &&
16325 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016326
16327cat >>confdefs.h <<\_ACEOF
16328#define HAVE_INET_ATON 1
16329_ACEOF
16330
Martin v. Löwiseba40652007-08-30 20:10:57 +000016331 { echo "$as_me:$LINENO: result: yes" >&5
16332echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016333else
16334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016335sed 's/^/| /' conftest.$ac_ext >&5
16336
Martin v. Löwiseba40652007-08-30 20:10:57 +000016337 { echo "$as_me:$LINENO: result: no" >&5
16338echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016339
16340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016341
16342rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016343 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016344
Martin v. Löwiseba40652007-08-30 20:10:57 +000016345{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16346echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016347cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016348/* confdefs.h. */
16349_ACEOF
16350cat confdefs.h >>conftest.$ac_ext
16351cat >>conftest.$ac_ext <<_ACEOF
16352/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016353
16354#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016355#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016356#include <sys/socket.h>
16357#include <netinet/in.h>
16358#include <arpa/inet.h>
16359
Martin v. Löwise9416172003-05-03 10:12:45 +000016360int
16361main ()
16362{
16363void* p = inet_pton
16364 ;
16365 return 0;
16366}
16367_ACEOF
16368rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016369if { (ac_try="$ac_compile"
16370case "(($ac_try" in
16371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16372 *) ac_try_echo=$ac_try;;
16373esac
16374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16375 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016377 grep -v '^ *+' conftest.er1 >conftest.err
16378 rm -f conftest.er1
16379 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016381 (exit $ac_status); } && {
16382 test -z "$ac_c_werror_flag" ||
16383 test ! -s conftest.err
16384 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016385
16386cat >>confdefs.h <<\_ACEOF
16387#define HAVE_INET_PTON 1
16388_ACEOF
16389
Martin v. Löwiseba40652007-08-30 20:10:57 +000016390 { echo "$as_me:$LINENO: result: yes" >&5
16391echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016392else
16393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016394sed 's/^/| /' conftest.$ac_ext >&5
16395
Martin v. Löwiseba40652007-08-30 20:10:57 +000016396 { echo "$as_me:$LINENO: result: no" >&5
16397echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016398
16399fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016400
16401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016402
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016403# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016404{ echo "$as_me:$LINENO: checking for setgroups" >&5
16405echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016406cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016407/* confdefs.h. */
16408_ACEOF
16409cat confdefs.h >>conftest.$ac_ext
16410cat >>conftest.$ac_ext <<_ACEOF
16411/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016412
16413#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016414#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016415#ifdef HAVE_GRP_H
16416#include <grp.h>
16417#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016418
Martin v. Löwisd5843682002-11-21 20:41:28 +000016419int
16420main ()
16421{
16422void* p = setgroups
16423 ;
16424 return 0;
16425}
16426_ACEOF
16427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016428if { (ac_try="$ac_compile"
16429case "(($ac_try" in
16430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16431 *) ac_try_echo=$ac_try;;
16432esac
16433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016436 grep -v '^ *+' conftest.er1 >conftest.err
16437 rm -f conftest.er1
16438 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440 (exit $ac_status); } && {
16441 test -z "$ac_c_werror_flag" ||
16442 test ! -s conftest.err
16443 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016444
16445cat >>confdefs.h <<\_ACEOF
16446#define HAVE_SETGROUPS 1
16447_ACEOF
16448
Martin v. Löwiseba40652007-08-30 20:10:57 +000016449 { echo "$as_me:$LINENO: result: yes" >&5
16450echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016451else
16452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016453sed 's/^/| /' conftest.$ac_ext >&5
16454
Martin v. Löwiseba40652007-08-30 20:10:57 +000016455 { echo "$as_me:$LINENO: result: no" >&5
16456echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016457
16458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016459
16460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016461
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016462# check for openpty and forkpty
16463
Martin v. Löwis11437992002-04-12 09:54:03 +000016464
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016465for ac_func in openpty
16466do
Martin v. Löwis11437992002-04-12 09:54:03 +000016467as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016468{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16469echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16470if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016472else
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016474/* confdefs.h. */
16475_ACEOF
16476cat confdefs.h >>conftest.$ac_ext
16477cat >>conftest.$ac_ext <<_ACEOF
16478/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016479/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16480 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16481#define $ac_func innocuous_$ac_func
16482
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016483/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016484 which can conflict with char $ac_func (); below.
16485 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016486 <limits.h> exists even on freestanding compilers. */
16487
16488#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016489# include <limits.h>
16490#else
16491# include <assert.h>
16492#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016493
16494#undef $ac_func
16495
Martin v. Löwiseba40652007-08-30 20:10:57 +000016496/* Override any GCC internal prototype to avoid an error.
16497 Use char because int might match the return type of a GCC
16498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016499#ifdef __cplusplus
16500extern "C"
16501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016502char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016503/* The GNU C library defines this for functions which it implements
16504 to always fail with ENOSYS. Some functions are actually named
16505 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016506#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016507choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016508#endif
16509
Skip Montanaro6dead952003-09-25 14:50:04 +000016510int
16511main ()
16512{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016513return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 ;
16515 return 0;
16516}
16517_ACEOF
16518rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016519if { (ac_try="$ac_link"
16520case "(($ac_try" in
16521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16522 *) ac_try_echo=$ac_try;;
16523esac
16524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16525 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016527 grep -v '^ *+' conftest.er1 >conftest.err
16528 rm -f conftest.er1
16529 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016531 (exit $ac_status); } && {
16532 test -z "$ac_c_werror_flag" ||
16533 test ! -s conftest.err
16534 } && test -s conftest$ac_exeext &&
16535 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016537else
Martin v. Löwis11437992002-04-12 09:54:03 +000016538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016539sed 's/^/| /' conftest.$ac_ext >&5
16540
Martin v. Löwiseba40652007-08-30 20:10:57 +000016541 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016543
16544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016545 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016547ac_res=`eval echo '${'$as_ac_var'}'`
16548 { echo "$as_me:$LINENO: result: $ac_res" >&5
16549echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016550if test `eval echo '${'$as_ac_var'}'` = yes; then
16551 cat >>confdefs.h <<_ACEOF
16552#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16553_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016554
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016555else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016556 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16557echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016558if test "${ac_cv_lib_util_openpty+set}" = set; then
16559 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016560else
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016562LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016564/* confdefs.h. */
16565_ACEOF
16566cat confdefs.h >>conftest.$ac_ext
16567cat >>conftest.$ac_ext <<_ACEOF
16568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016569
Martin v. Löwiseba40652007-08-30 20:10:57 +000016570/* Override any GCC internal prototype to avoid an error.
16571 Use char because int might match the return type of a GCC
16572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016573#ifdef __cplusplus
16574extern "C"
16575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016576char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016577int
16578main ()
16579{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016581 ;
16582 return 0;
16583}
16584_ACEOF
16585rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586if { (ac_try="$ac_link"
16587case "(($ac_try" in
16588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589 *) ac_try_echo=$ac_try;;
16590esac
16591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16592 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016594 grep -v '^ *+' conftest.er1 >conftest.err
16595 rm -f conftest.er1
16596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598 (exit $ac_status); } && {
16599 test -z "$ac_c_werror_flag" ||
16600 test ! -s conftest.err
16601 } && test -s conftest$ac_exeext &&
16602 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016604else
Martin v. Löwis11437992002-04-12 09:54:03 +000016605 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016606sed 's/^/| /' conftest.$ac_ext >&5
16607
Martin v. Löwiseba40652007-08-30 20:10:57 +000016608 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016609fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016610
16611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016613LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016615{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16616echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016617if test $ac_cv_lib_util_openpty = yes; then
16618 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016619#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016620_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016621 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016622else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016623 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
16624echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016625if test "${ac_cv_lib_bsd_openpty+set}" = set; then
16626 echo $ECHO_N "(cached) $ECHO_C" >&6
16627else
16628 ac_check_lib_save_LIBS=$LIBS
16629LIBS="-lbsd $LIBS"
16630cat >conftest.$ac_ext <<_ACEOF
16631/* confdefs.h. */
16632_ACEOF
16633cat confdefs.h >>conftest.$ac_ext
16634cat >>conftest.$ac_ext <<_ACEOF
16635/* end confdefs.h. */
16636
Martin v. Löwiseba40652007-08-30 20:10:57 +000016637/* Override any GCC internal prototype to avoid an error.
16638 Use char because int might match the return type of a GCC
16639 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016640#ifdef __cplusplus
16641extern "C"
16642#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016643char openpty ();
16644int
16645main ()
16646{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016647return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016648 ;
16649 return 0;
16650}
16651_ACEOF
16652rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016653if { (ac_try="$ac_link"
16654case "(($ac_try" in
16655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16656 *) ac_try_echo=$ac_try;;
16657esac
16658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16659 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016660 ac_status=$?
16661 grep -v '^ *+' conftest.er1 >conftest.err
16662 rm -f conftest.er1
16663 cat conftest.err >&5
16664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016665 (exit $ac_status); } && {
16666 test -z "$ac_c_werror_flag" ||
16667 test ! -s conftest.err
16668 } && test -s conftest$ac_exeext &&
16669 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016670 ac_cv_lib_bsd_openpty=yes
16671else
16672 echo "$as_me: failed program was:" >&5
16673sed 's/^/| /' conftest.$ac_ext >&5
16674
Martin v. Löwiseba40652007-08-30 20:10:57 +000016675 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016677
16678rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016679 conftest$ac_exeext conftest.$ac_ext
16680LIBS=$ac_check_lib_save_LIBS
16681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016682{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
16683echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016684if test $ac_cv_lib_bsd_openpty = yes; then
16685 cat >>confdefs.h <<\_ACEOF
16686#define HAVE_OPENPTY 1
16687_ACEOF
16688 LIBS="$LIBS -lbsd"
16689fi
16690
16691
16692fi
16693
Fred Drake8cef4cf2000-06-28 16:40:38 +000016694
16695fi
16696done
16697
Martin v. Löwis11437992002-04-12 09:54:03 +000016698
Fred Drake8cef4cf2000-06-28 16:40:38 +000016699for ac_func in forkpty
16700do
Martin v. Löwis11437992002-04-12 09:54:03 +000016701as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016702{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16703echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16704if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016706else
Martin v. Löwis11437992002-04-12 09:54:03 +000016707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016708/* confdefs.h. */
16709_ACEOF
16710cat confdefs.h >>conftest.$ac_ext
16711cat >>conftest.$ac_ext <<_ACEOF
16712/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016713/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16714 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16715#define $ac_func innocuous_$ac_func
16716
Fred Drake8cef4cf2000-06-28 16:40:38 +000016717/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016718 which can conflict with char $ac_func (); below.
16719 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016720 <limits.h> exists even on freestanding compilers. */
16721
16722#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016723# include <limits.h>
16724#else
16725# include <assert.h>
16726#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016727
16728#undef $ac_func
16729
Martin v. Löwiseba40652007-08-30 20:10:57 +000016730/* Override any GCC internal prototype to avoid an error.
16731 Use char because int might match the return type of a GCC
16732 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016733#ifdef __cplusplus
16734extern "C"
16735#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016736char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000016737/* The GNU C library defines this for functions which it implements
16738 to always fail with ENOSYS. Some functions are actually named
16739 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016740#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000016741choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000016742#endif
16743
Skip Montanaro6dead952003-09-25 14:50:04 +000016744int
16745main ()
16746{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016747return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016748 ;
16749 return 0;
16750}
16751_ACEOF
16752rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753if { (ac_try="$ac_link"
16754case "(($ac_try" in
16755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16756 *) ac_try_echo=$ac_try;;
16757esac
16758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16759 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016761 grep -v '^ *+' conftest.er1 >conftest.err
16762 rm -f conftest.er1
16763 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016765 (exit $ac_status); } && {
16766 test -z "$ac_c_werror_flag" ||
16767 test ! -s conftest.err
16768 } && test -s conftest$ac_exeext &&
16769 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016771else
Martin v. Löwis11437992002-04-12 09:54:03 +000016772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016773sed 's/^/| /' conftest.$ac_ext >&5
16774
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016777
16778rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016779 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016780fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016781ac_res=`eval echo '${'$as_ac_var'}'`
16782 { echo "$as_me:$LINENO: result: $ac_res" >&5
16783echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016784if test `eval echo '${'$as_ac_var'}'` = yes; then
16785 cat >>confdefs.h <<_ACEOF
16786#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16787_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016788
Fred Drake8cef4cf2000-06-28 16:40:38 +000016789else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016790 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
16791echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016792if test "${ac_cv_lib_util_forkpty+set}" = set; then
16793 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016794else
Martin v. Löwis11437992002-04-12 09:54:03 +000016795 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016796LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016797cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016798/* confdefs.h. */
16799_ACEOF
16800cat confdefs.h >>conftest.$ac_ext
16801cat >>conftest.$ac_ext <<_ACEOF
16802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016803
Martin v. Löwiseba40652007-08-30 20:10:57 +000016804/* Override any GCC internal prototype to avoid an error.
16805 Use char because int might match the return type of a GCC
16806 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016807#ifdef __cplusplus
16808extern "C"
16809#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016810char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016811int
16812main ()
16813{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016815 ;
16816 return 0;
16817}
16818_ACEOF
16819rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016820if { (ac_try="$ac_link"
16821case "(($ac_try" in
16822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16823 *) ac_try_echo=$ac_try;;
16824esac
16825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16826 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 grep -v '^ *+' conftest.er1 >conftest.err
16829 rm -f conftest.er1
16830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016832 (exit $ac_status); } && {
16833 test -z "$ac_c_werror_flag" ||
16834 test ! -s conftest.err
16835 } && test -s conftest$ac_exeext &&
16836 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016837 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016838else
Martin v. Löwis11437992002-04-12 09:54:03 +000016839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016840sed 's/^/| /' conftest.$ac_ext >&5
16841
Martin v. Löwiseba40652007-08-30 20:10:57 +000016842 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016844
16845rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016847LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016849{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
16850echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016851if test $ac_cv_lib_util_forkpty = yes; then
16852 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016853#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016854_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016855 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016856else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016857 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
16858echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016859if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
16860 echo $ECHO_N "(cached) $ECHO_C" >&6
16861else
16862 ac_check_lib_save_LIBS=$LIBS
16863LIBS="-lbsd $LIBS"
16864cat >conftest.$ac_ext <<_ACEOF
16865/* confdefs.h. */
16866_ACEOF
16867cat confdefs.h >>conftest.$ac_ext
16868cat >>conftest.$ac_ext <<_ACEOF
16869/* end confdefs.h. */
16870
Martin v. Löwiseba40652007-08-30 20:10:57 +000016871/* Override any GCC internal prototype to avoid an error.
16872 Use char because int might match the return type of a GCC
16873 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016874#ifdef __cplusplus
16875extern "C"
16876#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016877char forkpty ();
16878int
16879main ()
16880{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016881return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016882 ;
16883 return 0;
16884}
16885_ACEOF
16886rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016887if { (ac_try="$ac_link"
16888case "(($ac_try" in
16889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16890 *) ac_try_echo=$ac_try;;
16891esac
16892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16893 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016894 ac_status=$?
16895 grep -v '^ *+' conftest.er1 >conftest.err
16896 rm -f conftest.er1
16897 cat conftest.err >&5
16898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016899 (exit $ac_status); } && {
16900 test -z "$ac_c_werror_flag" ||
16901 test ! -s conftest.err
16902 } && test -s conftest$ac_exeext &&
16903 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016904 ac_cv_lib_bsd_forkpty=yes
16905else
16906 echo "$as_me: failed program was:" >&5
16907sed 's/^/| /' conftest.$ac_ext >&5
16908
Martin v. Löwiseba40652007-08-30 20:10:57 +000016909 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016911
16912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016913 conftest$ac_exeext conftest.$ac_ext
16914LIBS=$ac_check_lib_save_LIBS
16915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016916{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
16917echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016918if test $ac_cv_lib_bsd_forkpty = yes; then
16919 cat >>confdefs.h <<\_ACEOF
16920#define HAVE_FORKPTY 1
16921_ACEOF
16922 LIBS="$LIBS -lbsd"
16923fi
16924
16925
16926fi
16927
Fred Drake8cef4cf2000-06-28 16:40:38 +000016928
16929fi
16930done
16931
Jack Jansendd19cf82001-12-06 22:36:17 +000016932
Michael W. Hudson54241132001-12-07 15:38:26 +000016933# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016934
16935
16936
16937
16938
16939
Fred Drake8cef4cf2000-06-28 16:40:38 +000016940for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
16941do
Martin v. Löwis11437992002-04-12 09:54:03 +000016942as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016943{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16944echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16945if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016946 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016947else
Martin v. Löwis11437992002-04-12 09:54:03 +000016948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016949/* confdefs.h. */
16950_ACEOF
16951cat confdefs.h >>conftest.$ac_ext
16952cat >>conftest.$ac_ext <<_ACEOF
16953/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016954/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16955 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16956#define $ac_func innocuous_$ac_func
16957
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016958/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016959 which can conflict with char $ac_func (); below.
16960 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016961 <limits.h> exists even on freestanding compilers. */
16962
16963#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016964# include <limits.h>
16965#else
16966# include <assert.h>
16967#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016968
16969#undef $ac_func
16970
Martin v. Löwiseba40652007-08-30 20:10:57 +000016971/* Override any GCC internal prototype to avoid an error.
16972 Use char because int might match the return type of a GCC
16973 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016974#ifdef __cplusplus
16975extern "C"
16976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016977char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016978/* The GNU C library defines this for functions which it implements
16979 to always fail with ENOSYS. Some functions are actually named
16980 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016981#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016982choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016983#endif
16984
Skip Montanaro6dead952003-09-25 14:50:04 +000016985int
16986main ()
16987{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016988return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016989 ;
16990 return 0;
16991}
16992_ACEOF
16993rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016994if { (ac_try="$ac_link"
16995case "(($ac_try" in
16996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16997 *) ac_try_echo=$ac_try;;
16998esac
16999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17000 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017002 grep -v '^ *+' conftest.er1 >conftest.err
17003 rm -f conftest.er1
17004 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017006 (exit $ac_status); } && {
17007 test -z "$ac_c_werror_flag" ||
17008 test ! -s conftest.err
17009 } && test -s conftest$ac_exeext &&
17010 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017011 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017012else
Martin v. Löwis11437992002-04-12 09:54:03 +000017013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017014sed 's/^/| /' conftest.$ac_ext >&5
17015
Martin v. Löwiseba40652007-08-30 20:10:57 +000017016 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017018
17019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017020 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017022ac_res=`eval echo '${'$as_ac_var'}'`
17023 { echo "$as_me:$LINENO: result: $ac_res" >&5
17024echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017025if test `eval echo '${'$as_ac_var'}'` = yes; then
17026 cat >>confdefs.h <<_ACEOF
17027#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17028_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017030fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017031done
17032
Michael W. Hudson54241132001-12-07 15:38:26 +000017033
Martin v. Löwis11437992002-04-12 09:54:03 +000017034
17035
17036
17037
17038
Martin v. Löwis1142de32002-03-29 16:28:31 +000017039for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000017040do
Martin v. Löwis11437992002-04-12 09:54:03 +000017041as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17043echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17044if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017045 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017046else
Martin v. Löwis11437992002-04-12 09:54:03 +000017047 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017048/* confdefs.h. */
17049_ACEOF
17050cat confdefs.h >>conftest.$ac_ext
17051cat >>conftest.$ac_ext <<_ACEOF
17052/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017053/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17054 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17055#define $ac_func innocuous_$ac_func
17056
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017057/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017058 which can conflict with char $ac_func (); below.
17059 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017060 <limits.h> exists even on freestanding compilers. */
17061
17062#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017063# include <limits.h>
17064#else
17065# include <assert.h>
17066#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017067
17068#undef $ac_func
17069
Martin v. Löwiseba40652007-08-30 20:10:57 +000017070/* Override any GCC internal prototype to avoid an error.
17071 Use char because int might match the return type of a GCC
17072 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017073#ifdef __cplusplus
17074extern "C"
17075#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017076char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017077/* The GNU C library defines this for functions which it implements
17078 to always fail with ENOSYS. Some functions are actually named
17079 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017080#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017081choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017082#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017083
Skip Montanaro6dead952003-09-25 14:50:04 +000017084int
17085main ()
17086{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017087return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017088 ;
17089 return 0;
17090}
17091_ACEOF
17092rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017093if { (ac_try="$ac_link"
17094case "(($ac_try" in
17095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17096 *) ac_try_echo=$ac_try;;
17097esac
17098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17099 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017101 grep -v '^ *+' conftest.er1 >conftest.err
17102 rm -f conftest.er1
17103 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017105 (exit $ac_status); } && {
17106 test -z "$ac_c_werror_flag" ||
17107 test ! -s conftest.err
17108 } && test -s conftest$ac_exeext &&
17109 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017110 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017111else
Martin v. Löwis11437992002-04-12 09:54:03 +000017112 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017113sed 's/^/| /' conftest.$ac_ext >&5
17114
Martin v. Löwiseba40652007-08-30 20:10:57 +000017115 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017116fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017117
17118rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017119 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017121ac_res=`eval echo '${'$as_ac_var'}'`
17122 { echo "$as_me:$LINENO: result: $ac_res" >&5
17123echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017124if test `eval echo '${'$as_ac_var'}'` = yes; then
17125 cat >>confdefs.h <<_ACEOF
17126#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17127_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017128
Martin v. Löwis1142de32002-03-29 16:28:31 +000017129else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017130 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017131 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017132 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17133 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134esac
17135
Martin v. Löwis1142de32002-03-29 16:28:31 +000017136fi
17137done
17138
17139
Martin v. Löwis11437992002-04-12 09:54:03 +000017140
Martin v. Löwis1142de32002-03-29 16:28:31 +000017141for ac_func in getpgrp
17142do
Martin v. Löwis11437992002-04-12 09:54:03 +000017143as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017144{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17145echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17146if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017148else
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017150/* confdefs.h. */
17151_ACEOF
17152cat confdefs.h >>conftest.$ac_ext
17153cat >>conftest.$ac_ext <<_ACEOF
17154/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017155/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17156 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17157#define $ac_func innocuous_$ac_func
17158
Martin v. Löwis1142de32002-03-29 16:28:31 +000017159/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017160 which can conflict with char $ac_func (); below.
17161 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017162 <limits.h> exists even on freestanding compilers. */
17163
17164#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017165# include <limits.h>
17166#else
17167# include <assert.h>
17168#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017169
17170#undef $ac_func
17171
Martin v. Löwiseba40652007-08-30 20:10:57 +000017172/* Override any GCC internal prototype to avoid an error.
17173 Use char because int might match the return type of a GCC
17174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017175#ifdef __cplusplus
17176extern "C"
17177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017178char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017179/* The GNU C library defines this for functions which it implements
17180 to always fail with ENOSYS. Some functions are actually named
17181 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017182#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017183choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017184#endif
17185
Skip Montanaro6dead952003-09-25 14:50:04 +000017186int
17187main ()
17188{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017189return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017190 ;
17191 return 0;
17192}
17193_ACEOF
17194rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017195if { (ac_try="$ac_link"
17196case "(($ac_try" in
17197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17198 *) ac_try_echo=$ac_try;;
17199esac
17200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17201 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017203 grep -v '^ *+' conftest.er1 >conftest.err
17204 rm -f conftest.er1
17205 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017207 (exit $ac_status); } && {
17208 test -z "$ac_c_werror_flag" ||
17209 test ! -s conftest.err
17210 } && test -s conftest$ac_exeext &&
17211 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017212 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017213else
Martin v. Löwis11437992002-04-12 09:54:03 +000017214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017215sed 's/^/| /' conftest.$ac_ext >&5
17216
Martin v. Löwiseba40652007-08-30 20:10:57 +000017217 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017219
17220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017221 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223ac_res=`eval echo '${'$as_ac_var'}'`
17224 { echo "$as_me:$LINENO: result: $ac_res" >&5
17225echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017226if test `eval echo '${'$as_ac_var'}'` = yes; then
17227 cat >>confdefs.h <<_ACEOF
17228#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17229_ACEOF
17230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017231/* confdefs.h. */
17232_ACEOF
17233cat confdefs.h >>conftest.$ac_ext
17234cat >>conftest.$ac_ext <<_ACEOF
17235/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017236#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017237int
17238main ()
17239{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017240getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017241 ;
17242 return 0;
17243}
17244_ACEOF
17245rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017246if { (ac_try="$ac_compile"
17247case "(($ac_try" in
17248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17249 *) ac_try_echo=$ac_try;;
17250esac
17251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017254 grep -v '^ *+' conftest.er1 >conftest.err
17255 rm -f conftest.er1
17256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017258 (exit $ac_status); } && {
17259 test -z "$ac_c_werror_flag" ||
17260 test ! -s conftest.err
17261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017262
17263cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017264#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017265_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017266
Martin v. Löwis11437992002-04-12 09:54:03 +000017267
Guido van Rossumf78abae1997-01-21 22:02:36 +000017268else
Martin v. Löwis11437992002-04-12 09:54:03 +000017269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017270sed 's/^/| /' conftest.$ac_ext >&5
17271
Martin v. Löwiseba40652007-08-30 20:10:57 +000017272
Guido van Rossum627b2d71993-12-24 10:39:16 +000017273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017274
17275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017276
Guido van Rossum627b2d71993-12-24 10:39:16 +000017277fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017278done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017279
Jack Jansen150753c2003-03-29 22:07:47 +000017280
17281for ac_func in setpgrp
17282do
17283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017284{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17286if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017288else
Martin v. Löwis11437992002-04-12 09:54:03 +000017289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017290/* confdefs.h. */
17291_ACEOF
17292cat confdefs.h >>conftest.$ac_ext
17293cat >>conftest.$ac_ext <<_ACEOF
17294/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017295/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17297#define $ac_func innocuous_$ac_func
17298
Jack Jansen150753c2003-03-29 22:07:47 +000017299/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017300 which can conflict with char $ac_func (); below.
17301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017302 <limits.h> exists even on freestanding compilers. */
17303
17304#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017305# include <limits.h>
17306#else
17307# include <assert.h>
17308#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017309
17310#undef $ac_func
17311
Martin v. Löwiseba40652007-08-30 20:10:57 +000017312/* Override any GCC internal prototype to avoid an error.
17313 Use char because int might match the return type of a GCC
17314 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017315#ifdef __cplusplus
17316extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017317#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017318char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017319/* The GNU C library defines this for functions which it implements
17320 to always fail with ENOSYS. Some functions are actually named
17321 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017322#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017323choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017324#endif
17325
Skip Montanaro6dead952003-09-25 14:50:04 +000017326int
17327main ()
17328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017329return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 ;
17331 return 0;
17332}
17333_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017335if { (ac_try="$ac_link"
17336case "(($ac_try" in
17337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17338 *) ac_try_echo=$ac_try;;
17339esac
17340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017343 grep -v '^ *+' conftest.er1 >conftest.err
17344 rm -f conftest.er1
17345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017347 (exit $ac_status); } && {
17348 test -z "$ac_c_werror_flag" ||
17349 test ! -s conftest.err
17350 } && test -s conftest$ac_exeext &&
17351 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017352 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017353else
Jack Jansen150753c2003-03-29 22:07:47 +000017354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017355sed 's/^/| /' conftest.$ac_ext >&5
17356
Martin v. Löwiseba40652007-08-30 20:10:57 +000017357 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017359
17360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017361 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017363ac_res=`eval echo '${'$as_ac_var'}'`
17364 { echo "$as_me:$LINENO: result: $ac_res" >&5
17365echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017366if test `eval echo '${'$as_ac_var'}'` = yes; then
17367 cat >>confdefs.h <<_ACEOF
17368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17369_ACEOF
17370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017371/* confdefs.h. */
17372_ACEOF
17373cat confdefs.h >>conftest.$ac_ext
17374cat >>conftest.$ac_ext <<_ACEOF
17375/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017376#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017377int
17378main ()
17379{
17380setpgrp(0,0);
17381 ;
17382 return 0;
17383}
17384_ACEOF
17385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017386if { (ac_try="$ac_compile"
17387case "(($ac_try" in
17388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17389 *) ac_try_echo=$ac_try;;
17390esac
17391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17392 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017394 grep -v '^ *+' conftest.er1 >conftest.err
17395 rm -f conftest.er1
17396 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017398 (exit $ac_status); } && {
17399 test -z "$ac_c_werror_flag" ||
17400 test ! -s conftest.err
17401 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
17403cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017404#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017405_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017406
Jack Jansen150753c2003-03-29 22:07:47 +000017407
17408else
17409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017410sed 's/^/| /' conftest.$ac_ext >&5
17411
Martin v. Löwiseba40652007-08-30 20:10:57 +000017412
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017414
17415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017416
17417fi
17418done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017419
Martin v. Löwis11437992002-04-12 09:54:03 +000017420
Thomas Wouters3a584202000-08-05 23:28:51 +000017421for ac_func in gettimeofday
17422do
Martin v. Löwis11437992002-04-12 09:54:03 +000017423as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017424{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17425echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17426if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017427 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017428else
Martin v. Löwis11437992002-04-12 09:54:03 +000017429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017430/* confdefs.h. */
17431_ACEOF
17432cat confdefs.h >>conftest.$ac_ext
17433cat >>conftest.$ac_ext <<_ACEOF
17434/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017435/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17436 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17437#define $ac_func innocuous_$ac_func
17438
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017439/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017440 which can conflict with char $ac_func (); below.
17441 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017442 <limits.h> exists even on freestanding compilers. */
17443
17444#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017445# include <limits.h>
17446#else
17447# include <assert.h>
17448#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017449
17450#undef $ac_func
17451
Martin v. Löwiseba40652007-08-30 20:10:57 +000017452/* Override any GCC internal prototype to avoid an error.
17453 Use char because int might match the return type of a GCC
17454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017455#ifdef __cplusplus
17456extern "C"
17457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017458char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017459/* The GNU C library defines this for functions which it implements
17460 to always fail with ENOSYS. Some functions are actually named
17461 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017462#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017463choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017464#endif
17465
Skip Montanaro6dead952003-09-25 14:50:04 +000017466int
17467main ()
17468{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017469return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 ;
17471 return 0;
17472}
17473_ACEOF
17474rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475if { (ac_try="$ac_link"
17476case "(($ac_try" in
17477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17478 *) ac_try_echo=$ac_try;;
17479esac
17480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17481 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017483 grep -v '^ *+' conftest.er1 >conftest.err
17484 rm -f conftest.er1
17485 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017487 (exit $ac_status); } && {
17488 test -z "$ac_c_werror_flag" ||
17489 test ! -s conftest.err
17490 } && test -s conftest$ac_exeext &&
17491 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017492 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017493else
Martin v. Löwis11437992002-04-12 09:54:03 +000017494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017495sed 's/^/| /' conftest.$ac_ext >&5
17496
Martin v. Löwiseba40652007-08-30 20:10:57 +000017497 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017499
17500rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017501 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017503ac_res=`eval echo '${'$as_ac_var'}'`
17504 { echo "$as_me:$LINENO: result: $ac_res" >&5
17505echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017506if test `eval echo '${'$as_ac_var'}'` = yes; then
17507 cat >>confdefs.h <<_ACEOF
17508#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17509_ACEOF
17510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017511/* confdefs.h. */
17512_ACEOF
17513cat confdefs.h >>conftest.$ac_ext
17514cat >>conftest.$ac_ext <<_ACEOF
17515/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017516#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017517int
17518main ()
17519{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017520gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017521 ;
17522 return 0;
17523}
17524_ACEOF
17525rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017526if { (ac_try="$ac_compile"
17527case "(($ac_try" in
17528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17529 *) ac_try_echo=$ac_try;;
17530esac
17531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017534 grep -v '^ *+' conftest.er1 >conftest.err
17535 rm -f conftest.er1
17536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017538 (exit $ac_status); } && {
17539 test -z "$ac_c_werror_flag" ||
17540 test ! -s conftest.err
17541 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017542 :
17543else
Martin v. Löwis11437992002-04-12 09:54:03 +000017544 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017545sed 's/^/| /' conftest.$ac_ext >&5
17546
Martin v. Löwis11437992002-04-12 09:54:03 +000017547
17548cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017549#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017550_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017551
Martin v. Löwis11437992002-04-12 09:54:03 +000017552
Guido van Rossum627b2d71993-12-24 10:39:16 +000017553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017554
17555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017556
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017557fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017558done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017559
Michael W. Hudson54241132001-12-07 15:38:26 +000017560
Martin v. Löwiseba40652007-08-30 20:10:57 +000017561{ echo "$as_me:$LINENO: checking for major" >&5
17562echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017563cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017564/* confdefs.h. */
17565_ACEOF
17566cat confdefs.h >>conftest.$ac_ext
17567cat >>conftest.$ac_ext <<_ACEOF
17568/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017569
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017570#if defined(MAJOR_IN_MKDEV)
17571#include <sys/mkdev.h>
17572#elif defined(MAJOR_IN_SYSMACROS)
17573#include <sys/sysmacros.h>
17574#else
17575#include <sys/types.h>
17576#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017577
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017578int
17579main ()
17580{
17581
17582 makedev(major(0),minor(0));
17583
17584 ;
17585 return 0;
17586}
17587_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017588rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017589if { (ac_try="$ac_link"
17590case "(($ac_try" in
17591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17592 *) ac_try_echo=$ac_try;;
17593esac
17594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17595 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017597 grep -v '^ *+' conftest.er1 >conftest.err
17598 rm -f conftest.er1
17599 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017601 (exit $ac_status); } && {
17602 test -z "$ac_c_werror_flag" ||
17603 test ! -s conftest.err
17604 } && test -s conftest$ac_exeext &&
17605 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017606
17607
17608cat >>confdefs.h <<\_ACEOF
17609#define HAVE_DEVICE_MACROS 1
17610_ACEOF
17611
Martin v. Löwiseba40652007-08-30 20:10:57 +000017612 { echo "$as_me:$LINENO: result: yes" >&5
17613echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017614
17615else
17616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017617sed 's/^/| /' conftest.$ac_ext >&5
17618
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017619
Martin v. Löwiseba40652007-08-30 20:10:57 +000017620 { echo "$as_me:$LINENO: result: no" >&5
17621echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017622
17623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017624
17625rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017626 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017627
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017628# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000017629# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000017630{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
17631echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017632cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017633/* confdefs.h. */
17634_ACEOF
17635cat confdefs.h >>conftest.$ac_ext
17636cat >>conftest.$ac_ext <<_ACEOF
17637/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017638
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017639#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017640#include <sys/socket.h>
17641#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017642#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017643
Martin v. Löwis11437992002-04-12 09:54:03 +000017644int
17645main ()
17646{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017647
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017648getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017649
Martin v. Löwis11437992002-04-12 09:54:03 +000017650 ;
17651 return 0;
17652}
17653_ACEOF
17654rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017655if { (ac_try="$ac_link"
17656case "(($ac_try" in
17657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17658 *) ac_try_echo=$ac_try;;
17659esac
17660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17661 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017663 grep -v '^ *+' conftest.er1 >conftest.err
17664 rm -f conftest.er1
17665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017667 (exit $ac_status); } && {
17668 test -z "$ac_c_werror_flag" ||
17669 test ! -s conftest.err
17670 } && test -s conftest$ac_exeext &&
17671 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017672
Martin v. Löwiseba40652007-08-30 20:10:57 +000017673{ echo "$as_me:$LINENO: result: yes" >&5
17674echo "${ECHO_T}yes" >&6; }
17675{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
17676echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017677if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017678 { echo "$as_me:$LINENO: result: buggy" >&5
17679echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017680buggygetaddrinfo=yes
17681else
Martin v. Löwis11437992002-04-12 09:54:03 +000017682 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017683/* confdefs.h. */
17684_ACEOF
17685cat confdefs.h >>conftest.$ac_ext
17686cat >>conftest.$ac_ext <<_ACEOF
17687/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017688
17689#include <sys/types.h>
17690#include <netdb.h>
17691#include <string.h>
17692#include <sys/socket.h>
17693#include <netinet/in.h>
17694
17695main()
17696{
17697 int passive, gaierr, inet4 = 0, inet6 = 0;
17698 struct addrinfo hints, *ai, *aitop;
17699 char straddr[INET6_ADDRSTRLEN], strport[16];
17700
17701 for (passive = 0; passive <= 1; passive++) {
17702 memset(&hints, 0, sizeof(hints));
17703 hints.ai_family = AF_UNSPEC;
17704 hints.ai_flags = passive ? AI_PASSIVE : 0;
17705 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000017706 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017707 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
17708 (void)gai_strerror(gaierr);
17709 goto bad;
17710 }
17711 for (ai = aitop; ai; ai = ai->ai_next) {
17712 if (ai->ai_addr == NULL ||
17713 ai->ai_addrlen == 0 ||
17714 getnameinfo(ai->ai_addr, ai->ai_addrlen,
17715 straddr, sizeof(straddr), strport, sizeof(strport),
17716 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
17717 goto bad;
17718 }
17719 switch (ai->ai_family) {
17720 case AF_INET:
17721 if (strcmp(strport, "54321") != 0) {
17722 goto bad;
17723 }
17724 if (passive) {
17725 if (strcmp(straddr, "0.0.0.0") != 0) {
17726 goto bad;
17727 }
17728 } else {
17729 if (strcmp(straddr, "127.0.0.1") != 0) {
17730 goto bad;
17731 }
17732 }
17733 inet4++;
17734 break;
17735 case AF_INET6:
17736 if (strcmp(strport, "54321") != 0) {
17737 goto bad;
17738 }
17739 if (passive) {
17740 if (strcmp(straddr, "::") != 0) {
17741 goto bad;
17742 }
17743 } else {
17744 if (strcmp(straddr, "::1") != 0) {
17745 goto bad;
17746 }
17747 }
17748 inet6++;
17749 break;
17750 case AF_UNSPEC:
17751 goto bad;
17752 break;
17753 default:
17754 /* another family support? */
17755 break;
17756 }
17757 }
17758 }
17759
17760 if (!(inet4 == 0 || inet4 == 2))
17761 goto bad;
17762 if (!(inet6 == 0 || inet6 == 2))
17763 goto bad;
17764
17765 if (aitop)
17766 freeaddrinfo(aitop);
17767 exit(0);
17768
17769 bad:
17770 if (aitop)
17771 freeaddrinfo(aitop);
17772 exit(1);
17773}
17774
Martin v. Löwis11437992002-04-12 09:54:03 +000017775_ACEOF
17776rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017777if { (ac_try="$ac_link"
17778case "(($ac_try" in
17779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17780 *) ac_try_echo=$ac_try;;
17781esac
17782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17783 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017784 ac_status=$?
17785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17786 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017787 { (case "(($ac_try" in
17788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17789 *) ac_try_echo=$ac_try;;
17790esac
17791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17792 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017793 ac_status=$?
17794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17795 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017796 { echo "$as_me:$LINENO: result: good" >&5
17797echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017798buggygetaddrinfo=no
17799else
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 echo "$as_me: program exited with status $ac_status" >&5
17801echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017802sed 's/^/| /' conftest.$ac_ext >&5
17803
Martin v. Löwis11437992002-04-12 09:54:03 +000017804( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000017805{ echo "$as_me:$LINENO: result: buggy" >&5
17806echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017807buggygetaddrinfo=yes
17808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017809rm -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 +000017810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017811
17812
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017813else
Martin v. Löwis11437992002-04-12 09:54:03 +000017814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017815sed 's/^/| /' conftest.$ac_ext >&5
17816
Martin v. Löwis11437992002-04-12 09:54:03 +000017817
Martin v. Löwiseba40652007-08-30 20:10:57 +000017818{ echo "$as_me:$LINENO: result: no" >&5
17819echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017820buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017821
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017823
17824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017826
17827if test "$buggygetaddrinfo" = "yes"; then
17828 if test "$ipv6" = "yes"; then
17829 echo 'Fatal: You must get working getaddrinfo() function.'
17830 echo ' or you can specify "--disable-ipv6"'.
17831 exit 1
17832 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017833else
Martin v. Löwis11437992002-04-12 09:54:03 +000017834
17835cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017836#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017837_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017838
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017839fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017840
Jack Jansen9a66b6d2001-08-08 13:56:14 +000017841for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017842do
Martin v. Löwis11437992002-04-12 09:54:03 +000017843as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017844{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17845echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17846if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017848else
Martin v. Löwis11437992002-04-12 09:54:03 +000017849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017850/* confdefs.h. */
17851_ACEOF
17852cat confdefs.h >>conftest.$ac_ext
17853cat >>conftest.$ac_ext <<_ACEOF
17854/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017855/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17856 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17857#define $ac_func innocuous_$ac_func
17858
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017859/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017860 which can conflict with char $ac_func (); below.
17861 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017862 <limits.h> exists even on freestanding compilers. */
17863
17864#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017865# include <limits.h>
17866#else
17867# include <assert.h>
17868#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017869
17870#undef $ac_func
17871
Martin v. Löwiseba40652007-08-30 20:10:57 +000017872/* Override any GCC internal prototype to avoid an error.
17873 Use char because int might match the return type of a GCC
17874 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017875#ifdef __cplusplus
17876extern "C"
17877#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017878char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017879/* The GNU C library defines this for functions which it implements
17880 to always fail with ENOSYS. Some functions are actually named
17881 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017882#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017883choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017884#endif
17885
Skip Montanaro6dead952003-09-25 14:50:04 +000017886int
17887main ()
17888{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017889return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017890 ;
17891 return 0;
17892}
17893_ACEOF
17894rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017895if { (ac_try="$ac_link"
17896case "(($ac_try" in
17897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17898 *) ac_try_echo=$ac_try;;
17899esac
17900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17901 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017903 grep -v '^ *+' conftest.er1 >conftest.err
17904 rm -f conftest.er1
17905 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017907 (exit $ac_status); } && {
17908 test -z "$ac_c_werror_flag" ||
17909 test ! -s conftest.err
17910 } && test -s conftest$ac_exeext &&
17911 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017912 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017913else
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017915sed 's/^/| /' conftest.$ac_ext >&5
17916
Martin v. Löwiseba40652007-08-30 20:10:57 +000017917 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017919
17920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017921 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017923ac_res=`eval echo '${'$as_ac_var'}'`
17924 { echo "$as_me:$LINENO: result: $ac_res" >&5
17925echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017926if test `eval echo '${'$as_ac_var'}'` = yes; then
17927 cat >>confdefs.h <<_ACEOF
17928#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17929_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017930
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017931fi
17932done
17933
Michael W. Hudson54241132001-12-07 15:38:26 +000017934
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017935# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000017936{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17937echo $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 +000017938if test "${ac_cv_header_time+set}" = set; then
17939 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017940else
Martin v. Löwis11437992002-04-12 09:54:03 +000017941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017942/* confdefs.h. */
17943_ACEOF
17944cat confdefs.h >>conftest.$ac_ext
17945cat >>conftest.$ac_ext <<_ACEOF
17946/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017947#include <sys/types.h>
17948#include <sys/time.h>
17949#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017950
Martin v. Löwis11437992002-04-12 09:54:03 +000017951int
17952main ()
17953{
17954if ((struct tm *) 0)
17955return 0;
17956 ;
17957 return 0;
17958}
17959_ACEOF
17960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017961if { (ac_try="$ac_compile"
17962case "(($ac_try" in
17963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17964 *) ac_try_echo=$ac_try;;
17965esac
17966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017969 grep -v '^ *+' conftest.er1 >conftest.err
17970 rm -f conftest.er1
17971 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017973 (exit $ac_status); } && {
17974 test -z "$ac_c_werror_flag" ||
17975 test ! -s conftest.err
17976 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017977 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017978else
Martin v. Löwis11437992002-04-12 09:54:03 +000017979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017980sed 's/^/| /' conftest.$ac_ext >&5
17981
Martin v. Löwiseba40652007-08-30 20:10:57 +000017982 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017983fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017984
17985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017987{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17988echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000017989if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017990
17991cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017992#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017993_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017994
17995fi
17996
Martin v. Löwiseba40652007-08-30 20:10:57 +000017997{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
17998echo $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 +000017999if test "${ac_cv_struct_tm+set}" = set; then
18000 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018001else
Martin v. Löwis11437992002-04-12 09:54:03 +000018002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018003/* confdefs.h. */
18004_ACEOF
18005cat confdefs.h >>conftest.$ac_ext
18006cat >>conftest.$ac_ext <<_ACEOF
18007/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018008#include <sys/types.h>
18009#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018010
Martin v. Löwis11437992002-04-12 09:54:03 +000018011int
18012main ()
18013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018014struct tm tm;
18015 int *p = &tm.tm_sec;
18016 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018017 ;
18018 return 0;
18019}
18020_ACEOF
18021rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018022if { (ac_try="$ac_compile"
18023case "(($ac_try" in
18024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18025 *) ac_try_echo=$ac_try;;
18026esac
18027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018030 grep -v '^ *+' conftest.er1 >conftest.err
18031 rm -f conftest.er1
18032 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018034 (exit $ac_status); } && {
18035 test -z "$ac_c_werror_flag" ||
18036 test ! -s conftest.err
18037 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018038 ac_cv_struct_tm=time.h
18039else
Martin v. Löwis11437992002-04-12 09:54:03 +000018040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018041sed 's/^/| /' conftest.$ac_ext >&5
18042
Martin v. Löwiseba40652007-08-30 20:10:57 +000018043 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018045
18046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018048{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18049echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018050if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018051
18052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018053#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018054_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018055
18056fi
18057
Martin v. Löwiseba40652007-08-30 20:10:57 +000018058{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18059echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018060if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18061 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018062else
Martin v. Löwis11437992002-04-12 09:54:03 +000018063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018064/* confdefs.h. */
18065_ACEOF
18066cat confdefs.h >>conftest.$ac_ext
18067cat >>conftest.$ac_ext <<_ACEOF
18068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018069#include <sys/types.h>
18070#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018071
18072
Martin v. Löwis11437992002-04-12 09:54:03 +000018073int
18074main ()
18075{
18076static struct tm ac_aggr;
18077if (ac_aggr.tm_zone)
18078return 0;
18079 ;
18080 return 0;
18081}
18082_ACEOF
18083rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018084if { (ac_try="$ac_compile"
18085case "(($ac_try" in
18086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18087 *) ac_try_echo=$ac_try;;
18088esac
18089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018092 grep -v '^ *+' conftest.er1 >conftest.err
18093 rm -f conftest.er1
18094 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018096 (exit $ac_status); } && {
18097 test -z "$ac_c_werror_flag" ||
18098 test ! -s conftest.err
18099 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018100 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018101else
Martin v. Löwis11437992002-04-12 09:54:03 +000018102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018103sed 's/^/| /' conftest.$ac_ext >&5
18104
Martin v. Löwiseba40652007-08-30 20:10:57 +000018105 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018106/* confdefs.h. */
18107_ACEOF
18108cat confdefs.h >>conftest.$ac_ext
18109cat >>conftest.$ac_ext <<_ACEOF
18110/* end confdefs.h. */
18111#include <sys/types.h>
18112#include <$ac_cv_struct_tm>
18113
18114
18115int
18116main ()
18117{
18118static struct tm ac_aggr;
18119if (sizeof ac_aggr.tm_zone)
18120return 0;
18121 ;
18122 return 0;
18123}
18124_ACEOF
18125rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018126if { (ac_try="$ac_compile"
18127case "(($ac_try" in
18128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18129 *) ac_try_echo=$ac_try;;
18130esac
18131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18132 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018134 grep -v '^ *+' conftest.er1 >conftest.err
18135 rm -f conftest.er1
18136 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018138 (exit $ac_status); } && {
18139 test -z "$ac_c_werror_flag" ||
18140 test ! -s conftest.err
18141 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018142 ac_cv_member_struct_tm_tm_zone=yes
18143else
18144 echo "$as_me: failed program was:" >&5
18145sed 's/^/| /' conftest.$ac_ext >&5
18146
Martin v. Löwiseba40652007-08-30 20:10:57 +000018147 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018149
18150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018152
18153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018155{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18156echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018157if test $ac_cv_member_struct_tm_tm_zone = yes; then
18158
18159cat >>confdefs.h <<_ACEOF
18160#define HAVE_STRUCT_TM_TM_ZONE 1
18161_ACEOF
18162
18163
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018164fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018165
Martin v. Löwis11437992002-04-12 09:54:03 +000018166if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18167
18168cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018169#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018170_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018171
18172else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018173 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18174echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18175if test "${ac_cv_have_decl_tzname+set}" = set; then
18176 echo $ECHO_N "(cached) $ECHO_C" >&6
18177else
18178 cat >conftest.$ac_ext <<_ACEOF
18179/* confdefs.h. */
18180_ACEOF
18181cat confdefs.h >>conftest.$ac_ext
18182cat >>conftest.$ac_ext <<_ACEOF
18183/* end confdefs.h. */
18184#include <time.h>
18185
18186int
18187main ()
18188{
18189#ifndef tzname
18190 (void) tzname;
18191#endif
18192
18193 ;
18194 return 0;
18195}
18196_ACEOF
18197rm -f conftest.$ac_objext
18198if { (ac_try="$ac_compile"
18199case "(($ac_try" in
18200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18201 *) ac_try_echo=$ac_try;;
18202esac
18203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18204 (eval "$ac_compile") 2>conftest.er1
18205 ac_status=$?
18206 grep -v '^ *+' conftest.er1 >conftest.err
18207 rm -f conftest.er1
18208 cat conftest.err >&5
18209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18210 (exit $ac_status); } && {
18211 test -z "$ac_c_werror_flag" ||
18212 test ! -s conftest.err
18213 } && test -s conftest.$ac_objext; then
18214 ac_cv_have_decl_tzname=yes
18215else
18216 echo "$as_me: failed program was:" >&5
18217sed 's/^/| /' conftest.$ac_ext >&5
18218
18219 ac_cv_have_decl_tzname=no
18220fi
18221
18222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18223fi
18224{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18225echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18226if test $ac_cv_have_decl_tzname = yes; then
18227
18228cat >>confdefs.h <<_ACEOF
18229#define HAVE_DECL_TZNAME 1
18230_ACEOF
18231
18232
18233else
18234 cat >>confdefs.h <<_ACEOF
18235#define HAVE_DECL_TZNAME 0
18236_ACEOF
18237
18238
18239fi
18240
18241
18242 { echo "$as_me:$LINENO: checking for tzname" >&5
18243echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018244if test "${ac_cv_var_tzname+set}" = set; then
18245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018246else
Martin v. Löwis11437992002-04-12 09:54:03 +000018247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018248/* confdefs.h. */
18249_ACEOF
18250cat confdefs.h >>conftest.$ac_ext
18251cat >>conftest.$ac_ext <<_ACEOF
18252/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018253#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018254#if !HAVE_DECL_TZNAME
18255extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018257
Martin v. Löwis11437992002-04-12 09:54:03 +000018258int
18259main ()
18260{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018261return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018262 ;
18263 return 0;
18264}
18265_ACEOF
18266rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018267if { (ac_try="$ac_link"
18268case "(($ac_try" in
18269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18270 *) ac_try_echo=$ac_try;;
18271esac
18272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18273 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018275 grep -v '^ *+' conftest.er1 >conftest.err
18276 rm -f conftest.er1
18277 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018279 (exit $ac_status); } && {
18280 test -z "$ac_c_werror_flag" ||
18281 test ! -s conftest.err
18282 } && test -s conftest$ac_exeext &&
18283 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018284 ac_cv_var_tzname=yes
18285else
Martin v. Löwis11437992002-04-12 09:54:03 +000018286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018287sed 's/^/| /' conftest.$ac_ext >&5
18288
Martin v. Löwiseba40652007-08-30 20:10:57 +000018289 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018291
18292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018293 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018295{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18296echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018297 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018298
18299cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018300#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018301_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018303 fi
18304fi
18305
Martin v. Löwiseba40652007-08-30 20:10:57 +000018306{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18307echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018308if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18309 echo $ECHO_N "(cached) $ECHO_C" >&6
18310else
18311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018312/* confdefs.h. */
18313_ACEOF
18314cat confdefs.h >>conftest.$ac_ext
18315cat >>conftest.$ac_ext <<_ACEOF
18316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018317$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018318int
18319main ()
18320{
18321static struct stat ac_aggr;
18322if (ac_aggr.st_rdev)
18323return 0;
18324 ;
18325 return 0;
18326}
18327_ACEOF
18328rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018329if { (ac_try="$ac_compile"
18330case "(($ac_try" in
18331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18332 *) ac_try_echo=$ac_try;;
18333esac
18334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018337 grep -v '^ *+' conftest.er1 >conftest.err
18338 rm -f conftest.er1
18339 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018341 (exit $ac_status); } && {
18342 test -z "$ac_c_werror_flag" ||
18343 test ! -s conftest.err
18344 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 ac_cv_member_struct_stat_st_rdev=yes
18346else
18347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018348sed 's/^/| /' conftest.$ac_ext >&5
18349
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018351/* confdefs.h. */
18352_ACEOF
18353cat confdefs.h >>conftest.$ac_ext
18354cat >>conftest.$ac_ext <<_ACEOF
18355/* end confdefs.h. */
18356$ac_includes_default
18357int
18358main ()
18359{
18360static struct stat ac_aggr;
18361if (sizeof ac_aggr.st_rdev)
18362return 0;
18363 ;
18364 return 0;
18365}
18366_ACEOF
18367rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018368if { (ac_try="$ac_compile"
18369case "(($ac_try" in
18370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18371 *) ac_try_echo=$ac_try;;
18372esac
18373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18374 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018376 grep -v '^ *+' conftest.er1 >conftest.err
18377 rm -f conftest.er1
18378 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018380 (exit $ac_status); } && {
18381 test -z "$ac_c_werror_flag" ||
18382 test ! -s conftest.err
18383 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018384 ac_cv_member_struct_stat_st_rdev=yes
18385else
18386 echo "$as_me: failed program was:" >&5
18387sed 's/^/| /' conftest.$ac_ext >&5
18388
Martin v. Löwiseba40652007-08-30 20:10:57 +000018389 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018391
18392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018394
18395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18398echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018399if test $ac_cv_member_struct_stat_st_rdev = yes; then
18400
18401cat >>confdefs.h <<_ACEOF
18402#define HAVE_STRUCT_STAT_ST_RDEV 1
18403_ACEOF
18404
18405
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018406fi
18407
Martin v. Löwiseba40652007-08-30 20:10:57 +000018408{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18409echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018410if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18411 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018412else
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018414/* confdefs.h. */
18415_ACEOF
18416cat confdefs.h >>conftest.$ac_ext
18417cat >>conftest.$ac_ext <<_ACEOF
18418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018419$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018420int
18421main ()
18422{
18423static struct stat ac_aggr;
18424if (ac_aggr.st_blksize)
18425return 0;
18426 ;
18427 return 0;
18428}
18429_ACEOF
18430rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018431if { (ac_try="$ac_compile"
18432case "(($ac_try" in
18433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18434 *) ac_try_echo=$ac_try;;
18435esac
18436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018439 grep -v '^ *+' conftest.er1 >conftest.err
18440 rm -f conftest.er1
18441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018443 (exit $ac_status); } && {
18444 test -z "$ac_c_werror_flag" ||
18445 test ! -s conftest.err
18446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018447 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018448else
Martin v. Löwis11437992002-04-12 09:54:03 +000018449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018450sed 's/^/| /' conftest.$ac_ext >&5
18451
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018453/* confdefs.h. */
18454_ACEOF
18455cat confdefs.h >>conftest.$ac_ext
18456cat >>conftest.$ac_ext <<_ACEOF
18457/* end confdefs.h. */
18458$ac_includes_default
18459int
18460main ()
18461{
18462static struct stat ac_aggr;
18463if (sizeof ac_aggr.st_blksize)
18464return 0;
18465 ;
18466 return 0;
18467}
18468_ACEOF
18469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018470if { (ac_try="$ac_compile"
18471case "(($ac_try" in
18472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18473 *) ac_try_echo=$ac_try;;
18474esac
18475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18476 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018478 grep -v '^ *+' conftest.er1 >conftest.err
18479 rm -f conftest.er1
18480 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018482 (exit $ac_status); } && {
18483 test -z "$ac_c_werror_flag" ||
18484 test ! -s conftest.err
18485 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018486 ac_cv_member_struct_stat_st_blksize=yes
18487else
18488 echo "$as_me: failed program was:" >&5
18489sed 's/^/| /' conftest.$ac_ext >&5
18490
Martin v. Löwiseba40652007-08-30 20:10:57 +000018491 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018493
18494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018495fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018496
18497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018499{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18500echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018501if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018502
Martin v. Löwis11437992002-04-12 09:54:03 +000018503cat >>confdefs.h <<_ACEOF
18504#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18505_ACEOF
18506
18507
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018508fi
18509
Martin v. Löwiseba40652007-08-30 20:10:57 +000018510{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18511echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018512if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18513 echo $ECHO_N "(cached) $ECHO_C" >&6
18514else
18515 cat >conftest.$ac_ext <<_ACEOF
18516/* confdefs.h. */
18517_ACEOF
18518cat confdefs.h >>conftest.$ac_ext
18519cat >>conftest.$ac_ext <<_ACEOF
18520/* end confdefs.h. */
18521$ac_includes_default
18522int
18523main ()
18524{
18525static struct stat ac_aggr;
18526if (ac_aggr.st_flags)
18527return 0;
18528 ;
18529 return 0;
18530}
18531_ACEOF
18532rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018533if { (ac_try="$ac_compile"
18534case "(($ac_try" in
18535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18536 *) ac_try_echo=$ac_try;;
18537esac
18538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18539 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018540 ac_status=$?
18541 grep -v '^ *+' conftest.er1 >conftest.err
18542 rm -f conftest.er1
18543 cat conftest.err >&5
18544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018545 (exit $ac_status); } && {
18546 test -z "$ac_c_werror_flag" ||
18547 test ! -s conftest.err
18548 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018549 ac_cv_member_struct_stat_st_flags=yes
18550else
18551 echo "$as_me: failed program was:" >&5
18552sed 's/^/| /' conftest.$ac_ext >&5
18553
Martin v. Löwiseba40652007-08-30 20:10:57 +000018554 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018555/* confdefs.h. */
18556_ACEOF
18557cat confdefs.h >>conftest.$ac_ext
18558cat >>conftest.$ac_ext <<_ACEOF
18559/* end confdefs.h. */
18560$ac_includes_default
18561int
18562main ()
18563{
18564static struct stat ac_aggr;
18565if (sizeof ac_aggr.st_flags)
18566return 0;
18567 ;
18568 return 0;
18569}
18570_ACEOF
18571rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018572if { (ac_try="$ac_compile"
18573case "(($ac_try" in
18574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18575 *) ac_try_echo=$ac_try;;
18576esac
18577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18578 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018579 ac_status=$?
18580 grep -v '^ *+' conftest.er1 >conftest.err
18581 rm -f conftest.er1
18582 cat conftest.err >&5
18583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018584 (exit $ac_status); } && {
18585 test -z "$ac_c_werror_flag" ||
18586 test ! -s conftest.err
18587 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018588 ac_cv_member_struct_stat_st_flags=yes
18589else
18590 echo "$as_me: failed program was:" >&5
18591sed 's/^/| /' conftest.$ac_ext >&5
18592
Martin v. Löwiseba40652007-08-30 20:10:57 +000018593 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018595
18596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018598
18599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018600fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
18602echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018603if test $ac_cv_member_struct_stat_st_flags = yes; then
18604
18605cat >>confdefs.h <<_ACEOF
18606#define HAVE_STRUCT_STAT_ST_FLAGS 1
18607_ACEOF
18608
18609
18610fi
18611
Martin v. Löwiseba40652007-08-30 20:10:57 +000018612{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
18613echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018614if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
18615 echo $ECHO_N "(cached) $ECHO_C" >&6
18616else
18617 cat >conftest.$ac_ext <<_ACEOF
18618/* confdefs.h. */
18619_ACEOF
18620cat confdefs.h >>conftest.$ac_ext
18621cat >>conftest.$ac_ext <<_ACEOF
18622/* end confdefs.h. */
18623$ac_includes_default
18624int
18625main ()
18626{
18627static struct stat ac_aggr;
18628if (ac_aggr.st_gen)
18629return 0;
18630 ;
18631 return 0;
18632}
18633_ACEOF
18634rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018635if { (ac_try="$ac_compile"
18636case "(($ac_try" in
18637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18638 *) ac_try_echo=$ac_try;;
18639esac
18640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18641 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018642 ac_status=$?
18643 grep -v '^ *+' conftest.er1 >conftest.err
18644 rm -f conftest.er1
18645 cat conftest.err >&5
18646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018647 (exit $ac_status); } && {
18648 test -z "$ac_c_werror_flag" ||
18649 test ! -s conftest.err
18650 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018651 ac_cv_member_struct_stat_st_gen=yes
18652else
18653 echo "$as_me: failed program was:" >&5
18654sed 's/^/| /' conftest.$ac_ext >&5
18655
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018657/* confdefs.h. */
18658_ACEOF
18659cat confdefs.h >>conftest.$ac_ext
18660cat >>conftest.$ac_ext <<_ACEOF
18661/* end confdefs.h. */
18662$ac_includes_default
18663int
18664main ()
18665{
18666static struct stat ac_aggr;
18667if (sizeof ac_aggr.st_gen)
18668return 0;
18669 ;
18670 return 0;
18671}
18672_ACEOF
18673rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018674if { (ac_try="$ac_compile"
18675case "(($ac_try" in
18676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18677 *) ac_try_echo=$ac_try;;
18678esac
18679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18680 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018681 ac_status=$?
18682 grep -v '^ *+' conftest.er1 >conftest.err
18683 rm -f conftest.er1
18684 cat conftest.err >&5
18685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018686 (exit $ac_status); } && {
18687 test -z "$ac_c_werror_flag" ||
18688 test ! -s conftest.err
18689 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018690 ac_cv_member_struct_stat_st_gen=yes
18691else
18692 echo "$as_me: failed program was:" >&5
18693sed 's/^/| /' conftest.$ac_ext >&5
18694
Martin v. Löwiseba40652007-08-30 20:10:57 +000018695 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018697
18698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018700
18701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018703{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
18704echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018705if test $ac_cv_member_struct_stat_st_gen = yes; then
18706
18707cat >>confdefs.h <<_ACEOF
18708#define HAVE_STRUCT_STAT_ST_GEN 1
18709_ACEOF
18710
18711
18712fi
18713
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
18715echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018716if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
18717 echo $ECHO_N "(cached) $ECHO_C" >&6
18718else
18719 cat >conftest.$ac_ext <<_ACEOF
18720/* confdefs.h. */
18721_ACEOF
18722cat confdefs.h >>conftest.$ac_ext
18723cat >>conftest.$ac_ext <<_ACEOF
18724/* end confdefs.h. */
18725$ac_includes_default
18726int
18727main ()
18728{
18729static struct stat ac_aggr;
18730if (ac_aggr.st_birthtime)
18731return 0;
18732 ;
18733 return 0;
18734}
18735_ACEOF
18736rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018737if { (ac_try="$ac_compile"
18738case "(($ac_try" in
18739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18740 *) ac_try_echo=$ac_try;;
18741esac
18742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018744 ac_status=$?
18745 grep -v '^ *+' conftest.er1 >conftest.err
18746 rm -f conftest.er1
18747 cat conftest.err >&5
18748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018749 (exit $ac_status); } && {
18750 test -z "$ac_c_werror_flag" ||
18751 test ! -s conftest.err
18752 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018753 ac_cv_member_struct_stat_st_birthtime=yes
18754else
18755 echo "$as_me: failed program was:" >&5
18756sed 's/^/| /' conftest.$ac_ext >&5
18757
Martin v. Löwiseba40652007-08-30 20:10:57 +000018758 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018759/* confdefs.h. */
18760_ACEOF
18761cat confdefs.h >>conftest.$ac_ext
18762cat >>conftest.$ac_ext <<_ACEOF
18763/* end confdefs.h. */
18764$ac_includes_default
18765int
18766main ()
18767{
18768static struct stat ac_aggr;
18769if (sizeof ac_aggr.st_birthtime)
18770return 0;
18771 ;
18772 return 0;
18773}
18774_ACEOF
18775rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018776if { (ac_try="$ac_compile"
18777case "(($ac_try" in
18778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18779 *) ac_try_echo=$ac_try;;
18780esac
18781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018783 ac_status=$?
18784 grep -v '^ *+' conftest.er1 >conftest.err
18785 rm -f conftest.er1
18786 cat conftest.err >&5
18787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018788 (exit $ac_status); } && {
18789 test -z "$ac_c_werror_flag" ||
18790 test ! -s conftest.err
18791 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018792 ac_cv_member_struct_stat_st_birthtime=yes
18793else
18794 echo "$as_me: failed program was:" >&5
18795sed 's/^/| /' conftest.$ac_ext >&5
18796
Martin v. Löwiseba40652007-08-30 20:10:57 +000018797 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018799
18800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802
18803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018805{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
18806echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018807if test $ac_cv_member_struct_stat_st_birthtime = yes; then
18808
18809cat >>confdefs.h <<_ACEOF
18810#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
18811_ACEOF
18812
18813
18814fi
18815
Martin v. Löwiseba40652007-08-30 20:10:57 +000018816{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
18817echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018818if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
18819 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018820else
Martin v. Löwis11437992002-04-12 09:54:03 +000018821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018822/* confdefs.h. */
18823_ACEOF
18824cat confdefs.h >>conftest.$ac_ext
18825cat >>conftest.$ac_ext <<_ACEOF
18826/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018827$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018828int
18829main ()
18830{
18831static struct stat ac_aggr;
18832if (ac_aggr.st_blocks)
18833return 0;
18834 ;
18835 return 0;
18836}
18837_ACEOF
18838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018839if { (ac_try="$ac_compile"
18840case "(($ac_try" in
18841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18842 *) ac_try_echo=$ac_try;;
18843esac
18844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018847 grep -v '^ *+' conftest.er1 >conftest.err
18848 rm -f conftest.er1
18849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018851 (exit $ac_status); } && {
18852 test -z "$ac_c_werror_flag" ||
18853 test ! -s conftest.err
18854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018855 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018856else
Martin v. Löwis11437992002-04-12 09:54:03 +000018857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018858sed 's/^/| /' conftest.$ac_ext >&5
18859
Martin v. Löwiseba40652007-08-30 20:10:57 +000018860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018861/* confdefs.h. */
18862_ACEOF
18863cat confdefs.h >>conftest.$ac_ext
18864cat >>conftest.$ac_ext <<_ACEOF
18865/* end confdefs.h. */
18866$ac_includes_default
18867int
18868main ()
18869{
18870static struct stat ac_aggr;
18871if (sizeof ac_aggr.st_blocks)
18872return 0;
18873 ;
18874 return 0;
18875}
18876_ACEOF
18877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018878if { (ac_try="$ac_compile"
18879case "(($ac_try" in
18880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18881 *) ac_try_echo=$ac_try;;
18882esac
18883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18884 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018886 grep -v '^ *+' conftest.er1 >conftest.err
18887 rm -f conftest.er1
18888 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018890 (exit $ac_status); } && {
18891 test -z "$ac_c_werror_flag" ||
18892 test ! -s conftest.err
18893 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018894 ac_cv_member_struct_stat_st_blocks=yes
18895else
18896 echo "$as_me: failed program was:" >&5
18897sed 's/^/| /' conftest.$ac_ext >&5
18898
Martin v. Löwiseba40652007-08-30 20:10:57 +000018899 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018900fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018901
18902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904
18905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018906fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018907{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
18908echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018909if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018910
Martin v. Löwis11437992002-04-12 09:54:03 +000018911cat >>confdefs.h <<_ACEOF
18912#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18913_ACEOF
18914
18915
18916cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018917#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018918_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018919
18920else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018921 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018922 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018923 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
18924 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018925esac
18926
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018927fi
18928
Michael W. Hudson54241132001-12-07 15:38:26 +000018929
Martin v. Löwis11437992002-04-12 09:54:03 +000018930
Martin v. Löwiseba40652007-08-30 20:10:57 +000018931{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
18932echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018933if test "${ac_cv_header_time_altzone+set}" = set; then
18934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018935else
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018937/* confdefs.h. */
18938_ACEOF
18939cat confdefs.h >>conftest.$ac_ext
18940cat >>conftest.$ac_ext <<_ACEOF
18941/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018942#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018943int
18944main ()
18945{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018946return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000018947 ;
18948 return 0;
18949}
18950_ACEOF
18951rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018952if { (ac_try="$ac_compile"
18953case "(($ac_try" in
18954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18955 *) ac_try_echo=$ac_try;;
18956esac
18957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18958 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018960 grep -v '^ *+' conftest.er1 >conftest.err
18961 rm -f conftest.er1
18962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964 (exit $ac_status); } && {
18965 test -z "$ac_c_werror_flag" ||
18966 test ! -s conftest.err
18967 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018968 ac_cv_header_time_altzone=yes
18969else
Martin v. Löwis11437992002-04-12 09:54:03 +000018970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018971sed 's/^/| /' conftest.$ac_ext >&5
18972
Martin v. Löwiseba40652007-08-30 20:10:57 +000018973 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018974fi
18975
Martin v. Löwiseba40652007-08-30 20:10:57 +000018976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18977fi
18978
18979{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
18980echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018981if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018982
18983cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018984#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018985_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018986
18987fi
18988
Guido van Rossumda88dad1995-01-26 00:46:29 +000018989was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000018990{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
18991echo $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 +000018992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018993/* confdefs.h. */
18994_ACEOF
18995cat confdefs.h >>conftest.$ac_ext
18996cat >>conftest.$ac_ext <<_ACEOF
18997/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018998
18999#include <sys/types.h>
19000#include <sys/select.h>
19001#include <sys/time.h>
19002
Martin v. Löwis11437992002-04-12 09:54:03 +000019003int
19004main ()
19005{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019006;
Martin v. Löwis11437992002-04-12 09:54:03 +000019007 ;
19008 return 0;
19009}
19010_ACEOF
19011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019012if { (ac_try="$ac_compile"
19013case "(($ac_try" in
19014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19015 *) ac_try_echo=$ac_try;;
19016esac
19017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019020 grep -v '^ *+' conftest.er1 >conftest.err
19021 rm -f conftest.er1
19022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019024 (exit $ac_status); } && {
19025 test -z "$ac_c_werror_flag" ||
19026 test ! -s conftest.err
19027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019028
19029
19030cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019031#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019032_ACEOF
19033
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019034 was_it_defined=yes
19035
Guido van Rossumf78abae1997-01-21 22:02:36 +000019036else
Martin v. Löwis11437992002-04-12 09:54:03 +000019037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019038sed 's/^/| /' conftest.$ac_ext >&5
19039
Brett Cannon19fab762007-06-02 03:02:29 +000019040
Martin v. Löwiseba40652007-08-30 20:10:57 +000019041fi
19042
19043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19044{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19045echo "${ECHO_T}$was_it_defined" >&6; }
19046
19047{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19048echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019049if test "${ac_cv_struct_addrinfo+set}" = set; then
19050 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019051else
Martin v. Löwis11437992002-04-12 09:54:03 +000019052 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019053/* confdefs.h. */
19054_ACEOF
19055cat confdefs.h >>conftest.$ac_ext
19056cat >>conftest.$ac_ext <<_ACEOF
19057/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019058
19059# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019060int
19061main ()
19062{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019063struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019064 ;
19065 return 0;
19066}
19067_ACEOF
19068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019069if { (ac_try="$ac_compile"
19070case "(($ac_try" in
19071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19072 *) ac_try_echo=$ac_try;;
19073esac
19074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19075 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019077 grep -v '^ *+' conftest.er1 >conftest.err
19078 rm -f conftest.er1
19079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019081 (exit $ac_status); } && {
19082 test -z "$ac_c_werror_flag" ||
19083 test ! -s conftest.err
19084 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019085 ac_cv_struct_addrinfo=yes
19086else
Martin v. Löwis11437992002-04-12 09:54:03 +000019087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019088sed 's/^/| /' conftest.$ac_ext >&5
19089
Martin v. Löwiseba40652007-08-30 20:10:57 +000019090 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019091fi
19092
Martin v. Löwiseba40652007-08-30 20:10:57 +000019093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19094fi
19095
19096{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19097echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019098if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019099
19100cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019101#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019102_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019103
19104fi
19105
Martin v. Löwiseba40652007-08-30 20:10:57 +000019106{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19107echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019108if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19109 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019110else
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019112/* confdefs.h. */
19113_ACEOF
19114cat confdefs.h >>conftest.$ac_ext
19115cat >>conftest.$ac_ext <<_ACEOF
19116/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019117
19118# include <sys/types.h>
19119# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019120int
19121main ()
19122{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019123struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 ;
19125 return 0;
19126}
19127_ACEOF
19128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129if { (ac_try="$ac_compile"
19130case "(($ac_try" in
19131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19132 *) ac_try_echo=$ac_try;;
19133esac
19134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019137 grep -v '^ *+' conftest.er1 >conftest.err
19138 rm -f conftest.er1
19139 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019141 (exit $ac_status); } && {
19142 test -z "$ac_c_werror_flag" ||
19143 test ! -s conftest.err
19144 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019145 ac_cv_struct_sockaddr_storage=yes
19146else
Martin v. Löwis11437992002-04-12 09:54:03 +000019147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019148sed 's/^/| /' conftest.$ac_ext >&5
19149
Martin v. Löwiseba40652007-08-30 20:10:57 +000019150 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019151fi
19152
Martin v. Löwiseba40652007-08-30 20:10:57 +000019153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19154fi
19155
19156{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19157echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019158if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019159
19160cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019161#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019162_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019163
19164fi
19165
Guido van Rossum627b2d71993-12-24 10:39:16 +000019166# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019167
Michael W. Hudson54241132001-12-07 15:38:26 +000019168
Martin v. Löwiseba40652007-08-30 20:10:57 +000019169{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19170echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019171if test "${ac_cv_c_char_unsigned+set}" = set; then
19172 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019173else
Martin v. Löwis11437992002-04-12 09:54:03 +000019174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019175/* confdefs.h. */
19176_ACEOF
19177cat confdefs.h >>conftest.$ac_ext
19178cat >>conftest.$ac_ext <<_ACEOF
19179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019180$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019181int
19182main ()
19183{
19184static int test_array [1 - 2 * !(((char) -1) < 0)];
19185test_array [0] = 0
19186
19187 ;
19188 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019189}
Martin v. Löwis11437992002-04-12 09:54:03 +000019190_ACEOF
19191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019192if { (ac_try="$ac_compile"
19193case "(($ac_try" in
19194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19195 *) ac_try_echo=$ac_try;;
19196esac
19197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019200 grep -v '^ *+' conftest.er1 >conftest.err
19201 rm -f conftest.er1
19202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019204 (exit $ac_status); } && {
19205 test -z "$ac_c_werror_flag" ||
19206 test ! -s conftest.err
19207 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019208 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019209else
19210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019211sed 's/^/| /' conftest.$ac_ext >&5
19212
Martin v. Löwiseba40652007-08-30 20:10:57 +000019213 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019215
19216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019218{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19219echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019220if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019221 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019222#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019223_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019224
19225fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019226
Martin v. Löwiseba40652007-08-30 20:10:57 +000019227{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19228echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019229if test "${ac_cv_c_const+set}" = set; then
19230 echo $ECHO_N "(cached) $ECHO_C" >&6
19231else
19232 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019233/* confdefs.h. */
19234_ACEOF
19235cat confdefs.h >>conftest.$ac_ext
19236cat >>conftest.$ac_ext <<_ACEOF
19237/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019238
Martin v. Löwis11437992002-04-12 09:54:03 +000019239int
19240main ()
19241{
19242/* FIXME: Include the comments suggested by Paul. */
19243#ifndef __cplusplus
19244 /* Ultrix mips cc rejects this. */
19245 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019246 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019247 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019248 char const *const *pcpcc;
19249 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019250 /* NEC SVR4.0.2 mips cc rejects this. */
19251 struct point {int x, y;};
19252 static struct point const zero = {0,0};
19253 /* AIX XL C 1.02.0.0 rejects this.
19254 It does not let you subtract one const X* pointer from another in
19255 an arm of an if-expression whose if-part is not a constant
19256 expression */
19257 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019258 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019259 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019260 ++pcpcc;
19261 ppc = (char**) pcpcc;
19262 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019263 { /* SCO 3.2v4 cc rejects this. */
19264 char *t;
19265 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019266
Martin v. Löwis11437992002-04-12 09:54:03 +000019267 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019268 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019269 }
19270 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19271 int x[] = {25, 17};
19272 const int *foo = &x[0];
19273 ++foo;
19274 }
19275 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19276 typedef const int *iptr;
19277 iptr p = 0;
19278 ++p;
19279 }
19280 { /* AIX XL C 1.02.0.0 rejects this saying
19281 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19282 struct s { int j; const int *ap[3]; };
19283 struct s *b; b->j = 5;
19284 }
19285 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19286 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019287 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019288 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019289 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019290#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019291
Martin v. Löwis11437992002-04-12 09:54:03 +000019292 ;
19293 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019294}
Martin v. Löwis11437992002-04-12 09:54:03 +000019295_ACEOF
19296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019297if { (ac_try="$ac_compile"
19298case "(($ac_try" in
19299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19300 *) ac_try_echo=$ac_try;;
19301esac
19302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019305 grep -v '^ *+' conftest.er1 >conftest.err
19306 rm -f conftest.er1
19307 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019309 (exit $ac_status); } && {
19310 test -z "$ac_c_werror_flag" ||
19311 test ! -s conftest.err
19312 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019313 ac_cv_c_const=yes
19314else
Martin v. Löwis11437992002-04-12 09:54:03 +000019315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019316sed 's/^/| /' conftest.$ac_ext >&5
19317
Martin v. Löwiseba40652007-08-30 20:10:57 +000019318 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019320
19321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019323{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19324echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019325if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019326
19327cat >>confdefs.h <<\_ACEOF
19328#define const
19329_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019330
19331fi
19332
Michael W. Hudson54241132001-12-07 15:38:26 +000019333
Guido van Rossumda88dad1995-01-26 00:46:29 +000019334works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019335{ echo "$as_me:$LINENO: checking for working volatile" >&5
19336echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019338/* confdefs.h. */
19339_ACEOF
19340cat confdefs.h >>conftest.$ac_ext
19341cat >>conftest.$ac_ext <<_ACEOF
19342/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019343
Martin v. Löwis11437992002-04-12 09:54:03 +000019344int
19345main ()
19346{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019347volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019348 ;
19349 return 0;
19350}
19351_ACEOF
19352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019353if { (ac_try="$ac_compile"
19354case "(($ac_try" in
19355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19356 *) ac_try_echo=$ac_try;;
19357esac
19358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019361 grep -v '^ *+' conftest.er1 >conftest.err
19362 rm -f conftest.er1
19363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019365 (exit $ac_status); } && {
19366 test -z "$ac_c_werror_flag" ||
19367 test ! -s conftest.err
19368 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019369 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019370else
Martin v. Löwis11437992002-04-12 09:54:03 +000019371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019372sed 's/^/| /' conftest.$ac_ext >&5
19373
Martin v. Löwis11437992002-04-12 09:54:03 +000019374
19375cat >>confdefs.h <<\_ACEOF
19376#define volatile
19377_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019378
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019379
Guido van Rossum627b2d71993-12-24 10:39:16 +000019380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019381
19382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19383{ echo "$as_me:$LINENO: result: $works" >&5
19384echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019385
Guido van Rossumda88dad1995-01-26 00:46:29 +000019386works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019387{ echo "$as_me:$LINENO: checking for working signed char" >&5
19388echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019389cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019390/* confdefs.h. */
19391_ACEOF
19392cat confdefs.h >>conftest.$ac_ext
19393cat >>conftest.$ac_ext <<_ACEOF
19394/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019395
Martin v. Löwis11437992002-04-12 09:54:03 +000019396int
19397main ()
19398{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019399signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019400 ;
19401 return 0;
19402}
19403_ACEOF
19404rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019405if { (ac_try="$ac_compile"
19406case "(($ac_try" in
19407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19408 *) ac_try_echo=$ac_try;;
19409esac
19410eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19411 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019412 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019413 grep -v '^ *+' conftest.er1 >conftest.err
19414 rm -f conftest.er1
19415 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019417 (exit $ac_status); } && {
19418 test -z "$ac_c_werror_flag" ||
19419 test ! -s conftest.err
19420 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019421 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019422else
Martin v. Löwis11437992002-04-12 09:54:03 +000019423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019424sed 's/^/| /' conftest.$ac_ext >&5
19425
Martin v. Löwis11437992002-04-12 09:54:03 +000019426
19427cat >>confdefs.h <<\_ACEOF
19428#define signed
19429_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019430
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019431
Guido van Rossum7f43da71994-08-01 12:15:30 +000019432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019433
19434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19435{ echo "$as_me:$LINENO: result: $works" >&5
19436echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019437
Guido van Rossumda88dad1995-01-26 00:46:29 +000019438have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019439{ echo "$as_me:$LINENO: checking for prototypes" >&5
19440echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019442/* confdefs.h. */
19443_ACEOF
19444cat confdefs.h >>conftest.$ac_ext
19445cat >>conftest.$ac_ext <<_ACEOF
19446/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019447int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019448int
19449main ()
19450{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019451return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 ;
19453 return 0;
19454}
19455_ACEOF
19456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019457if { (ac_try="$ac_compile"
19458case "(($ac_try" in
19459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19460 *) ac_try_echo=$ac_try;;
19461esac
19462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019465 grep -v '^ *+' conftest.er1 >conftest.err
19466 rm -f conftest.er1
19467 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019469 (exit $ac_status); } && {
19470 test -z "$ac_c_werror_flag" ||
19471 test ! -s conftest.err
19472 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019473
19474
19475cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019476#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019477_ACEOF
19478
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019479 have_prototypes=yes
19480
Guido van Rossumf78abae1997-01-21 22:02:36 +000019481else
Martin v. Löwis11437992002-04-12 09:54:03 +000019482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019483sed 's/^/| /' conftest.$ac_ext >&5
19484
Martin v. Löwiseba40652007-08-30 20:10:57 +000019485
Guido van Rossum7f43da71994-08-01 12:15:30 +000019486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019487
19488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19489{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19490echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019491
Guido van Rossumda88dad1995-01-26 00:46:29 +000019492works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019493{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19494echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019496/* confdefs.h. */
19497_ACEOF
19498cat confdefs.h >>conftest.$ac_ext
19499cat >>conftest.$ac_ext <<_ACEOF
19500/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019501
19502#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019503int foo(int x, ...) {
19504 va_list va;
19505 va_start(va, x);
19506 va_arg(va, int);
19507 va_arg(va, char *);
19508 va_arg(va, double);
19509 return 0;
19510}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019511
Martin v. Löwis11437992002-04-12 09:54:03 +000019512int
19513main ()
19514{
Guido van Rossum90eea071996-08-30 20:58:57 +000019515return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019516 ;
19517 return 0;
19518}
19519_ACEOF
19520rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019521if { (ac_try="$ac_compile"
19522case "(($ac_try" in
19523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19524 *) ac_try_echo=$ac_try;;
19525esac
19526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19527 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019529 grep -v '^ *+' conftest.er1 >conftest.err
19530 rm -f conftest.er1
19531 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019533 (exit $ac_status); } && {
19534 test -z "$ac_c_werror_flag" ||
19535 test ! -s conftest.err
19536 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019537
19538
19539cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019540#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019541_ACEOF
19542
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019543 works=yes
19544
Guido van Rossumf78abae1997-01-21 22:02:36 +000019545else
Martin v. Löwis11437992002-04-12 09:54:03 +000019546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019547sed 's/^/| /' conftest.$ac_ext >&5
19548
Martin v. Löwiseba40652007-08-30 20:10:57 +000019549
Guido van Rossum627b2d71993-12-24 10:39:16 +000019550fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019551
19552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19553{ echo "$as_me:$LINENO: result: $works" >&5
19554echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019555
Martin v. Löwisd6320502004-08-12 13:45:08 +000019556# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000019557{ echo "$as_me:$LINENO: checking for socketpair" >&5
19558echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019559cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019560/* confdefs.h. */
19561_ACEOF
19562cat confdefs.h >>conftest.$ac_ext
19563cat >>conftest.$ac_ext <<_ACEOF
19564/* end confdefs.h. */
19565
19566#include <sys/types.h>
19567#include <sys/socket.h>
19568
19569int
19570main ()
19571{
19572void *x=socketpair
19573 ;
19574 return 0;
19575}
19576_ACEOF
19577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019578if { (ac_try="$ac_compile"
19579case "(($ac_try" in
19580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19581 *) ac_try_echo=$ac_try;;
19582esac
19583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019586 grep -v '^ *+' conftest.er1 >conftest.err
19587 rm -f conftest.er1
19588 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000019589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019590 (exit $ac_status); } && {
19591 test -z "$ac_c_werror_flag" ||
19592 test ! -s conftest.err
19593 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000019594
19595cat >>confdefs.h <<\_ACEOF
19596#define HAVE_SOCKETPAIR 1
19597_ACEOF
19598
Martin v. Löwiseba40652007-08-30 20:10:57 +000019599 { echo "$as_me:$LINENO: result: yes" >&5
19600echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019601else
19602 echo "$as_me: failed program was:" >&5
19603sed 's/^/| /' conftest.$ac_ext >&5
19604
Martin v. Löwiseba40652007-08-30 20:10:57 +000019605 { echo "$as_me:$LINENO: result: no" >&5
19606echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000019607
19608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019609
19610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000019611
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019612# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000019613{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
19614echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019616/* confdefs.h. */
19617_ACEOF
19618cat confdefs.h >>conftest.$ac_ext
19619cat >>conftest.$ac_ext <<_ACEOF
19620/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019621#include <sys/types.h>
19622#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019623int
19624main ()
19625{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019626struct sockaddr x;
19627x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019628 ;
19629 return 0;
19630}
19631_ACEOF
19632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019633if { (ac_try="$ac_compile"
19634case "(($ac_try" in
19635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19636 *) ac_try_echo=$ac_try;;
19637esac
19638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019641 grep -v '^ *+' conftest.er1 >conftest.err
19642 rm -f conftest.er1
19643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019645 (exit $ac_status); } && {
19646 test -z "$ac_c_werror_flag" ||
19647 test ! -s conftest.err
19648 } && test -s conftest.$ac_objext; then
19649 { echo "$as_me:$LINENO: result: yes" >&5
19650echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019651
19652cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019653#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019654_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019655
19656else
Martin v. Löwis11437992002-04-12 09:54:03 +000019657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019658sed 's/^/| /' conftest.$ac_ext >&5
19659
Martin v. Löwiseba40652007-08-30 20:10:57 +000019660 { echo "$as_me:$LINENO: result: no" >&5
19661echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019662fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019663
19664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019665
Guido van Rossumda88dad1995-01-26 00:46:29 +000019666va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
19668echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019670/* confdefs.h. */
19671_ACEOF
19672cat confdefs.h >>conftest.$ac_ext
19673cat >>conftest.$ac_ext <<_ACEOF
19674/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019675
19676#ifdef HAVE_STDARG_PROTOTYPES
19677#include <stdarg.h>
19678#else
19679#include <varargs.h>
19680#endif
19681
Martin v. Löwis11437992002-04-12 09:54:03 +000019682int
19683main ()
19684{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019685va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000019686 ;
19687 return 0;
19688}
19689_ACEOF
19690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019691if { (ac_try="$ac_compile"
19692case "(($ac_try" in
19693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19694 *) ac_try_echo=$ac_try;;
19695esac
19696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019699 grep -v '^ *+' conftest.er1 >conftest.err
19700 rm -f conftest.er1
19701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019703 (exit $ac_status); } && {
19704 test -z "$ac_c_werror_flag" ||
19705 test ! -s conftest.err
19706 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019707 :
19708else
Martin v. Löwis11437992002-04-12 09:54:03 +000019709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019710sed 's/^/| /' conftest.$ac_ext >&5
19711
Martin v. Löwis11437992002-04-12 09:54:03 +000019712
19713
19714cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019715#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019716_ACEOF
19717
Guido van Rossumda88dad1995-01-26 00:46:29 +000019718 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019719
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019720fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019721
19722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19723{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
19724echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019725
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019726# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000019727
19728
19729
Martin v. Löwiseba40652007-08-30 20:10:57 +000019730{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
19731echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019732if test "${ac_cv_func_gethostbyname_r+set}" = set; then
19733 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019734else
Martin v. Löwis11437992002-04-12 09:54:03 +000019735 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019736/* confdefs.h. */
19737_ACEOF
19738cat confdefs.h >>conftest.$ac_ext
19739cat >>conftest.$ac_ext <<_ACEOF
19740/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019741/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
19742 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19743#define gethostbyname_r innocuous_gethostbyname_r
19744
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019745/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019746 which can conflict with char gethostbyname_r (); below.
19747 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019748 <limits.h> exists even on freestanding compilers. */
19749
19750#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019751# include <limits.h>
19752#else
19753# include <assert.h>
19754#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019755
19756#undef gethostbyname_r
19757
Martin v. Löwiseba40652007-08-30 20:10:57 +000019758/* Override any GCC internal prototype to avoid an error.
19759 Use char because int might match the return type of a GCC
19760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019761#ifdef __cplusplus
19762extern "C"
19763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019764char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019765/* The GNU C library defines this for functions which it implements
19766 to always fail with ENOSYS. Some functions are actually named
19767 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019768#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019769choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019770#endif
19771
Skip Montanaro6dead952003-09-25 14:50:04 +000019772int
19773main ()
19774{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019775return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019776 ;
19777 return 0;
19778}
19779_ACEOF
19780rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019781if { (ac_try="$ac_link"
19782case "(($ac_try" in
19783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19784 *) ac_try_echo=$ac_try;;
19785esac
19786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19787 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019789 grep -v '^ *+' conftest.er1 >conftest.err
19790 rm -f conftest.er1
19791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019793 (exit $ac_status); } && {
19794 test -z "$ac_c_werror_flag" ||
19795 test ! -s conftest.err
19796 } && test -s conftest$ac_exeext &&
19797 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019798 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019799else
Martin v. Löwis11437992002-04-12 09:54:03 +000019800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019801sed 's/^/| /' conftest.$ac_ext >&5
19802
Martin v. Löwiseba40652007-08-30 20:10:57 +000019803 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019805
19806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019807 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019809{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
19810echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019811if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019812
Martin v. Löwis11437992002-04-12 09:54:03 +000019813 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019814#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019815_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019816
Martin v. Löwiseba40652007-08-30 20:10:57 +000019817 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
19818echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019819 OLD_CFLAGS=$CFLAGS
19820 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019822/* confdefs.h. */
19823_ACEOF
19824cat confdefs.h >>conftest.$ac_ext
19825cat >>conftest.$ac_ext <<_ACEOF
19826/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019827
19828# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019829
Martin v. Löwis11437992002-04-12 09:54:03 +000019830int
19831main ()
19832{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019833
19834 char *name;
19835 struct hostent *he, *res;
19836 char buffer[2048];
19837 int buflen = 2048;
19838 int h_errnop;
19839
19840 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019841
19842 ;
19843 return 0;
19844}
19845_ACEOF
19846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847if { (ac_try="$ac_compile"
19848case "(($ac_try" in
19849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19850 *) ac_try_echo=$ac_try;;
19851esac
19852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019855 grep -v '^ *+' conftest.er1 >conftest.err
19856 rm -f conftest.er1
19857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019859 (exit $ac_status); } && {
19860 test -z "$ac_c_werror_flag" ||
19861 test ! -s conftest.err
19862 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019863
19864 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019865#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019866_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019867
Martin v. Löwis11437992002-04-12 09:54:03 +000019868
19869cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019870#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019871_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019872
Martin v. Löwiseba40652007-08-30 20:10:57 +000019873 { echo "$as_me:$LINENO: result: yes" >&5
19874echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019875
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019876else
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019878sed 's/^/| /' conftest.$ac_ext >&5
19879
Martin v. Löwis11437992002-04-12 09:54:03 +000019880
Martin v. Löwiseba40652007-08-30 20:10:57 +000019881 { echo "$as_me:$LINENO: result: no" >&5
19882echo "${ECHO_T}no" >&6; }
19883 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
19884echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019886/* confdefs.h. */
19887_ACEOF
19888cat confdefs.h >>conftest.$ac_ext
19889cat >>conftest.$ac_ext <<_ACEOF
19890/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019891
19892# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019893
Martin v. Löwis11437992002-04-12 09:54:03 +000019894int
19895main ()
19896{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019897
19898 char *name;
19899 struct hostent *he;
19900 char buffer[2048];
19901 int buflen = 2048;
19902 int h_errnop;
19903
19904 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019905
19906 ;
19907 return 0;
19908}
19909_ACEOF
19910rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019911if { (ac_try="$ac_compile"
19912case "(($ac_try" in
19913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19914 *) ac_try_echo=$ac_try;;
19915esac
19916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019919 grep -v '^ *+' conftest.er1 >conftest.err
19920 rm -f conftest.er1
19921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019923 (exit $ac_status); } && {
19924 test -z "$ac_c_werror_flag" ||
19925 test ! -s conftest.err
19926 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019927
19928 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019929#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019930_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019931
Martin v. Löwis11437992002-04-12 09:54:03 +000019932
19933cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019934#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019935_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019936
Martin v. Löwiseba40652007-08-30 20:10:57 +000019937 { echo "$as_me:$LINENO: result: yes" >&5
19938echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019939
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019940else
Martin v. Löwis11437992002-04-12 09:54:03 +000019941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019942sed 's/^/| /' conftest.$ac_ext >&5
19943
Martin v. Löwis11437992002-04-12 09:54:03 +000019944
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945 { echo "$as_me:$LINENO: result: no" >&5
19946echo "${ECHO_T}no" >&6; }
19947 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
19948echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019950/* confdefs.h. */
19951_ACEOF
19952cat confdefs.h >>conftest.$ac_ext
19953cat >>conftest.$ac_ext <<_ACEOF
19954/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019955
19956# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019957
Martin v. Löwis11437992002-04-12 09:54:03 +000019958int
19959main ()
19960{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019961
19962 char *name;
19963 struct hostent *he;
19964 struct hostent_data data;
19965
19966 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000019967
19968 ;
19969 return 0;
19970}
19971_ACEOF
19972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973if { (ac_try="$ac_compile"
19974case "(($ac_try" in
19975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19976 *) ac_try_echo=$ac_try;;
19977esac
19978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019981 grep -v '^ *+' conftest.er1 >conftest.err
19982 rm -f conftest.er1
19983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019985 (exit $ac_status); } && {
19986 test -z "$ac_c_werror_flag" ||
19987 test ! -s conftest.err
19988 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019989
19990 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019991#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019992_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019993
Martin v. Löwis11437992002-04-12 09:54:03 +000019994
19995cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019996#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019997_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019998
Martin v. Löwiseba40652007-08-30 20:10:57 +000019999 { echo "$as_me:$LINENO: result: yes" >&5
20000echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020001
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020002else
Martin v. Löwis11437992002-04-12 09:54:03 +000020003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020004sed 's/^/| /' conftest.$ac_ext >&5
20005
Martin v. Löwis11437992002-04-12 09:54:03 +000020006
Martin v. Löwiseba40652007-08-30 20:10:57 +000020007 { echo "$as_me:$LINENO: result: no" >&5
20008echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020009
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020010fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020011
20012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020013
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015
20016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020017
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020019
20020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020021 CFLAGS=$OLD_CFLAGS
20022
20023else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020024
Martin v. Löwis11437992002-04-12 09:54:03 +000020025
20026for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020027do
Martin v. Löwis11437992002-04-12 09:54:03 +000020028as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020029{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20030echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20031if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020032 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020033else
Martin v. Löwis11437992002-04-12 09:54:03 +000020034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020035/* confdefs.h. */
20036_ACEOF
20037cat confdefs.h >>conftest.$ac_ext
20038cat >>conftest.$ac_ext <<_ACEOF
20039/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020040/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20041 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20042#define $ac_func innocuous_$ac_func
20043
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020044/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020045 which can conflict with char $ac_func (); below.
20046 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020047 <limits.h> exists even on freestanding compilers. */
20048
20049#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020050# include <limits.h>
20051#else
20052# include <assert.h>
20053#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020054
20055#undef $ac_func
20056
Martin v. Löwiseba40652007-08-30 20:10:57 +000020057/* Override any GCC internal prototype to avoid an error.
20058 Use char because int might match the return type of a GCC
20059 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020060#ifdef __cplusplus
20061extern "C"
20062#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020063char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020064/* The GNU C library defines this for functions which it implements
20065 to always fail with ENOSYS. Some functions are actually named
20066 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020067#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020068choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020069#endif
20070
Skip Montanaro6dead952003-09-25 14:50:04 +000020071int
20072main ()
20073{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020074return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020075 ;
20076 return 0;
20077}
20078_ACEOF
20079rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020080if { (ac_try="$ac_link"
20081case "(($ac_try" in
20082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20083 *) ac_try_echo=$ac_try;;
20084esac
20085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20086 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020088 grep -v '^ *+' conftest.er1 >conftest.err
20089 rm -f conftest.er1
20090 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020092 (exit $ac_status); } && {
20093 test -z "$ac_c_werror_flag" ||
20094 test ! -s conftest.err
20095 } && test -s conftest$ac_exeext &&
20096 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020098else
Martin v. Löwis11437992002-04-12 09:54:03 +000020099 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020100sed 's/^/| /' conftest.$ac_ext >&5
20101
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020104
20105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020106 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020108ac_res=`eval echo '${'$as_ac_var'}'`
20109 { echo "$as_me:$LINENO: result: $ac_res" >&5
20110echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020111if test `eval echo '${'$as_ac_var'}'` = yes; then
20112 cat >>confdefs.h <<_ACEOF
20113#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20114_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020115
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020116fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020117done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020118
Michael W. Hudson54241132001-12-07 15:38:26 +000020119
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020120fi
20121
Michael W. Hudson54241132001-12-07 15:38:26 +000020122
20123
20124
20125
20126
20127
Guido van Rossum627b2d71993-12-24 10:39:16 +000020128# checks for system services
20129# (none yet)
20130
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020131# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020132{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20133echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020134if test "${ac_cv_func___fpu_control+set}" = set; then
20135 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020136else
Martin v. Löwis11437992002-04-12 09:54:03 +000020137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020138/* confdefs.h. */
20139_ACEOF
20140cat confdefs.h >>conftest.$ac_ext
20141cat >>conftest.$ac_ext <<_ACEOF
20142/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020143/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20144 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20145#define __fpu_control innocuous___fpu_control
20146
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020147/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020148 which can conflict with char __fpu_control (); below.
20149 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020150 <limits.h> exists even on freestanding compilers. */
20151
20152#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020153# include <limits.h>
20154#else
20155# include <assert.h>
20156#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020157
20158#undef __fpu_control
20159
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160/* Override any GCC internal prototype to avoid an error.
20161 Use char because int might match the return type of a GCC
20162 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020163#ifdef __cplusplus
20164extern "C"
20165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020166char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020167/* The GNU C library defines this for functions which it implements
20168 to always fail with ENOSYS. Some functions are actually named
20169 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020170#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020171choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020172#endif
20173
Skip Montanaro6dead952003-09-25 14:50:04 +000020174int
20175main ()
20176{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020178 ;
20179 return 0;
20180}
20181_ACEOF
20182rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020183if { (ac_try="$ac_link"
20184case "(($ac_try" in
20185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20186 *) ac_try_echo=$ac_try;;
20187esac
20188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20189 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020191 grep -v '^ *+' conftest.er1 >conftest.err
20192 rm -f conftest.er1
20193 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020195 (exit $ac_status); } && {
20196 test -z "$ac_c_werror_flag" ||
20197 test ! -s conftest.err
20198 } && test -s conftest$ac_exeext &&
20199 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020200 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020201else
Martin v. Löwis11437992002-04-12 09:54:03 +000020202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020203sed 's/^/| /' conftest.$ac_ext >&5
20204
Martin v. Löwiseba40652007-08-30 20:10:57 +000020205 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020206fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020207
20208rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020209 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020210fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020211{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20212echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020213if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020214 :
20215else
Martin v. Löwis11437992002-04-12 09:54:03 +000020216
Martin v. Löwiseba40652007-08-30 20:10:57 +000020217{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20218echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020219if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20220 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020221else
Martin v. Löwis11437992002-04-12 09:54:03 +000020222 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020223LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020224cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020225/* confdefs.h. */
20226_ACEOF
20227cat confdefs.h >>conftest.$ac_ext
20228cat >>conftest.$ac_ext <<_ACEOF
20229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020230
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231/* Override any GCC internal prototype to avoid an error.
20232 Use char because int might match the return type of a GCC
20233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020234#ifdef __cplusplus
20235extern "C"
20236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020237char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020238int
20239main ()
20240{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020241return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 ;
20243 return 0;
20244}
20245_ACEOF
20246rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247if { (ac_try="$ac_link"
20248case "(($ac_try" in
20249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20250 *) ac_try_echo=$ac_try;;
20251esac
20252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20253 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020255 grep -v '^ *+' conftest.er1 >conftest.err
20256 rm -f conftest.er1
20257 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020259 (exit $ac_status); } && {
20260 test -z "$ac_c_werror_flag" ||
20261 test ! -s conftest.err
20262 } && test -s conftest$ac_exeext &&
20263 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020264 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020265else
Martin v. Löwis11437992002-04-12 09:54:03 +000020266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020267sed 's/^/| /' conftest.$ac_ext >&5
20268
Martin v. Löwiseba40652007-08-30 20:10:57 +000020269 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020271
20272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020274LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20277echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020278if test $ac_cv_lib_ieee___fpu_control = yes; then
20279 cat >>confdefs.h <<_ACEOF
20280#define HAVE_LIBIEEE 1
20281_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020282
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020283 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020284
Guido van Rossum627b2d71993-12-24 10:39:16 +000020285fi
20286
Michael W. Hudson54241132001-12-07 15:38:26 +000020287
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020288fi
20289
Michael W. Hudson54241132001-12-07 15:38:26 +000020290
Guido van Rossum7f253911997-05-09 02:42:48 +000020291# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020292{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20293echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020294
Martin v. Löwiseba40652007-08-30 20:10:57 +000020295# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020296if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020297 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020298if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020299then
20300
20301cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020302#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020303_ACEOF
20304
Martin v. Löwiseba40652007-08-30 20:10:57 +000020305 { echo "$as_me:$LINENO: result: yes" >&5
20306echo "${ECHO_T}yes" >&6; }
20307else { echo "$as_me:$LINENO: result: no" >&5
20308echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020309fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020310else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020311 { echo "$as_me:$LINENO: result: no" >&5
20312echo "${ECHO_T}no" >&6; }
20313fi
20314
Guido van Rossum7f253911997-05-09 02:42:48 +000020315
Guido van Rossum7f43da71994-08-01 12:15:30 +000020316# check for --with-libm=...
20317
Guido van Rossum563e7081996-09-10 18:20:48 +000020318case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020319Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020320BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020321*) LIBM=-lm
20322esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020323{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20324echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020325
Martin v. Löwiseba40652007-08-30 20:10:57 +000020326# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020327if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020328 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020329if test "$withval" = no
20330then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20332echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020333elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020334then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020335 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20336echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020337else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20338echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20339 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020340fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020341else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020342 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20343echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20344fi
20345
Guido van Rossum7f43da71994-08-01 12:15:30 +000020346
20347# check for --with-libc=...
20348
Martin v. Löwiseba40652007-08-30 20:10:57 +000020349{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20350echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020351
Martin v. Löwiseba40652007-08-30 20:10:57 +000020352# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020353if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020354 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020355if test "$withval" = no
20356then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020357 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20358echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020359elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020360then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020361 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20362echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020363else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20364echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20365 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020366fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020367else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020368 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20369echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20370fi
20371
Guido van Rossum7f43da71994-08-01 12:15:30 +000020372
Christian Heimes0a8143f2007-12-18 23:22:54 +000020373# ************************************
20374# * Check for mathematical functions *
20375# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020376# check for hypot() in math library
20377LIBS_SAVE=$LIBS
20378LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020379
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020380for ac_func in hypot
20381do
Martin v. Löwis11437992002-04-12 09:54:03 +000020382as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020383{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20384echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20385if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020387else
Martin v. Löwis11437992002-04-12 09:54:03 +000020388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020389/* confdefs.h. */
20390_ACEOF
20391cat confdefs.h >>conftest.$ac_ext
20392cat >>conftest.$ac_ext <<_ACEOF
20393/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020394/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20395 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20396#define $ac_func innocuous_$ac_func
20397
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020398/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020399 which can conflict with char $ac_func (); below.
20400 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020401 <limits.h> exists even on freestanding compilers. */
20402
20403#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020404# include <limits.h>
20405#else
20406# include <assert.h>
20407#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020408
20409#undef $ac_func
20410
Martin v. Löwiseba40652007-08-30 20:10:57 +000020411/* Override any GCC internal prototype to avoid an error.
20412 Use char because int might match the return type of a GCC
20413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020414#ifdef __cplusplus
20415extern "C"
20416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020417char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020418/* The GNU C library defines this for functions which it implements
20419 to always fail with ENOSYS. Some functions are actually named
20420 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020421#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020422choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020423#endif
20424
Skip Montanaro6dead952003-09-25 14:50:04 +000020425int
20426main ()
20427{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020429 ;
20430 return 0;
20431}
20432_ACEOF
20433rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020434if { (ac_try="$ac_link"
20435case "(($ac_try" in
20436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20437 *) ac_try_echo=$ac_try;;
20438esac
20439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20440 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020442 grep -v '^ *+' conftest.er1 >conftest.err
20443 rm -f conftest.er1
20444 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020446 (exit $ac_status); } && {
20447 test -z "$ac_c_werror_flag" ||
20448 test ! -s conftest.err
20449 } && test -s conftest$ac_exeext &&
20450 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020451 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020452else
Martin v. Löwis11437992002-04-12 09:54:03 +000020453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020454sed 's/^/| /' conftest.$ac_ext >&5
20455
Martin v. Löwiseba40652007-08-30 20:10:57 +000020456 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020458
20459rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020460 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020462ac_res=`eval echo '${'$as_ac_var'}'`
20463 { echo "$as_me:$LINENO: result: $ac_res" >&5
20464echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020465if test `eval echo '${'$as_ac_var'}'` = yes; then
20466 cat >>confdefs.h <<_ACEOF
20467#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20468_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020469
Michael W. Hudson54241132001-12-07 15:38:26 +000020470else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020471 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020472 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020473 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20474 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020475esac
20476
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020477fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020478done
20479
Michael W. Hudson54241132001-12-07 15:38:26 +000020480
Christian Heimes0a8143f2007-12-18 23:22:54 +000020481
20482
20483
20484
20485
20486for ac_func in copysign isfinite isnan isinf
20487do
20488as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20489{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20490echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20491if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20492 echo $ECHO_N "(cached) $ECHO_C" >&6
20493else
20494 cat >conftest.$ac_ext <<_ACEOF
20495/* confdefs.h. */
20496_ACEOF
20497cat confdefs.h >>conftest.$ac_ext
20498cat >>conftest.$ac_ext <<_ACEOF
20499/* end confdefs.h. */
20500/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20501 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20502#define $ac_func innocuous_$ac_func
20503
20504/* System header to define __stub macros and hopefully few prototypes,
20505 which can conflict with char $ac_func (); below.
20506 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20507 <limits.h> exists even on freestanding compilers. */
20508
20509#ifdef __STDC__
20510# include <limits.h>
20511#else
20512# include <assert.h>
20513#endif
20514
20515#undef $ac_func
20516
20517/* Override any GCC internal prototype to avoid an error.
20518 Use char because int might match the return type of a GCC
20519 builtin and then its argument prototype would still apply. */
20520#ifdef __cplusplus
20521extern "C"
20522#endif
20523char $ac_func ();
20524/* The GNU C library defines this for functions which it implements
20525 to always fail with ENOSYS. Some functions are actually named
20526 something starting with __ and the normal name is an alias. */
20527#if defined __stub_$ac_func || defined __stub___$ac_func
20528choke me
20529#endif
20530
20531int
20532main ()
20533{
20534return $ac_func ();
20535 ;
20536 return 0;
20537}
20538_ACEOF
20539rm -f conftest.$ac_objext conftest$ac_exeext
20540if { (ac_try="$ac_link"
20541case "(($ac_try" in
20542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20543 *) ac_try_echo=$ac_try;;
20544esac
20545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20546 (eval "$ac_link") 2>conftest.er1
20547 ac_status=$?
20548 grep -v '^ *+' conftest.er1 >conftest.err
20549 rm -f conftest.er1
20550 cat conftest.err >&5
20551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20552 (exit $ac_status); } && {
20553 test -z "$ac_c_werror_flag" ||
20554 test ! -s conftest.err
20555 } && test -s conftest$ac_exeext &&
20556 $as_test_x conftest$ac_exeext; then
20557 eval "$as_ac_var=yes"
20558else
20559 echo "$as_me: failed program was:" >&5
20560sed 's/^/| /' conftest.$ac_ext >&5
20561
20562 eval "$as_ac_var=no"
20563fi
20564
20565rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20566 conftest$ac_exeext conftest.$ac_ext
20567fi
20568ac_res=`eval echo '${'$as_ac_var'}'`
20569 { echo "$as_me:$LINENO: result: $ac_res" >&5
20570echo "${ECHO_T}$ac_res" >&6; }
20571if test `eval echo '${'$as_ac_var'}'` = yes; then
20572 cat >>confdefs.h <<_ACEOF
20573#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20574_ACEOF
20575
20576fi
20577done
20578
20579
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020580LIBS=$LIBS_SAVE
20581
Guido van Rossumef2255b2000-03-10 22:30:29 +000020582# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020583if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020584 { echo "$as_me:$LINENO: checking for wchar.h" >&5
20585echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020586if test "${ac_cv_header_wchar_h+set}" = set; then
20587 echo $ECHO_N "(cached) $ECHO_C" >&6
20588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020589{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20590echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000020591else
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020593{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
20594echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020596/* confdefs.h. */
20597_ACEOF
20598cat confdefs.h >>conftest.$ac_ext
20599cat >>conftest.$ac_ext <<_ACEOF
20600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020601$ac_includes_default
20602#include <wchar.h>
20603_ACEOF
20604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605if { (ac_try="$ac_compile"
20606case "(($ac_try" in
20607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20608 *) ac_try_echo=$ac_try;;
20609esac
20610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020613 grep -v '^ *+' conftest.er1 >conftest.err
20614 rm -f conftest.er1
20615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020617 (exit $ac_status); } && {
20618 test -z "$ac_c_werror_flag" ||
20619 test ! -s conftest.err
20620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020621 ac_header_compiler=yes
20622else
20623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020624sed 's/^/| /' conftest.$ac_ext >&5
20625
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020628
20629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20630{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20631echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020632
20633# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000020634{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
20635echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020637/* confdefs.h. */
20638_ACEOF
20639cat confdefs.h >>conftest.$ac_ext
20640cat >>conftest.$ac_ext <<_ACEOF
20641/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020642#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020643_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000020644if { (ac_try="$ac_cpp conftest.$ac_ext"
20645case "(($ac_try" in
20646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20647 *) ac_try_echo=$ac_try;;
20648esac
20649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20650 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020651 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020652 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 rm -f conftest.er1
20654 cat conftest.err >&5
20655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020656 (exit $ac_status); } >/dev/null && {
20657 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20658 test ! -s conftest.err
20659 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020660 ac_header_preproc=yes
20661else
20662 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020663sed 's/^/| /' conftest.$ac_ext >&5
20664
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020667
Martin v. Löwis11437992002-04-12 09:54:03 +000020668rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20670echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020671
20672# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020673case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20674 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
20676echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020677 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
20678echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
20679 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020680 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020681 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020682 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
20683echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020684 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
20685echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
20686 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
20687echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
20688 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
20689echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020690 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
20691echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020692 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
20693echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000020695## ------------------------------------------------ ##
20696## Report this to http://www.python.org/python-bugs ##
20697## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000020698_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000020699 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000020700 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020701esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020702{ echo "$as_me:$LINENO: checking for wchar.h" >&5
20703echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020704if test "${ac_cv_header_wchar_h+set}" = set; then
20705 echo $ECHO_N "(cached) $ECHO_C" >&6
20706else
20707 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000020708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20710echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020711
20712fi
20713if test $ac_cv_header_wchar_h = yes; then
20714
20715
20716cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020717#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020718_ACEOF
20719
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020720 wchar_h="yes"
20721
Guido van Rossumef2255b2000-03-10 22:30:29 +000020722else
Martin v. Löwis11437992002-04-12 09:54:03 +000020723 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000020724
20725fi
20726
Michael W. Hudson54241132001-12-07 15:38:26 +000020727
Martin v. Löwis11437992002-04-12 09:54:03 +000020728
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020729# determine wchar_t size
20730if test "$wchar_h" = yes
20731then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732 { echo "$as_me:$LINENO: checking for wchar_t" >&5
20733echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020734if test "${ac_cv_type_wchar_t+set}" = set; then
20735 echo $ECHO_N "(cached) $ECHO_C" >&6
20736else
20737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020738/* confdefs.h. */
20739_ACEOF
20740cat confdefs.h >>conftest.$ac_ext
20741cat >>conftest.$ac_ext <<_ACEOF
20742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020743#include <wchar.h>
20744
Martin v. Löwiseba40652007-08-30 20:10:57 +000020745typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020746int
20747main ()
20748{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020750 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020751if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 return 0;
20753 ;
20754 return 0;
20755}
20756_ACEOF
20757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758if { (ac_try="$ac_compile"
20759case "(($ac_try" in
20760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20761 *) ac_try_echo=$ac_try;;
20762esac
20763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020766 grep -v '^ *+' conftest.er1 >conftest.err
20767 rm -f conftest.er1
20768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770 (exit $ac_status); } && {
20771 test -z "$ac_c_werror_flag" ||
20772 test ! -s conftest.err
20773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020774 ac_cv_type_wchar_t=yes
20775else
20776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020777sed 's/^/| /' conftest.$ac_ext >&5
20778
Martin v. Löwiseba40652007-08-30 20:10:57 +000020779 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020780fi
Brett Cannon19fab762007-06-02 03:02:29 +000020781
Martin v. Löwiseba40652007-08-30 20:10:57 +000020782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20783fi
20784{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
20785echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
20786
20787# The cast to long int works around a bug in the HP C Compiler
20788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20790# This bug is HP SR number 8606223364.
20791{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
20792echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020793if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20794 echo $ECHO_N "(cached) $ECHO_C" >&6
20795else
Martin v. Löwis11437992002-04-12 09:54:03 +000020796 if test "$cross_compiling" = yes; then
20797 # Depending upon the size, compute the lo and hi bounds.
20798cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020799/* confdefs.h. */
20800_ACEOF
20801cat confdefs.h >>conftest.$ac_ext
20802cat >>conftest.$ac_ext <<_ACEOF
20803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020804#include <wchar.h>
20805
Martin v. Löwiseba40652007-08-30 20:10:57 +000020806 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020807int
20808main ()
20809{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020811test_array [0] = 0
20812
20813 ;
20814 return 0;
20815}
20816_ACEOF
20817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020818if { (ac_try="$ac_compile"
20819case "(($ac_try" in
20820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20821 *) ac_try_echo=$ac_try;;
20822esac
20823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020826 grep -v '^ *+' conftest.er1 >conftest.err
20827 rm -f conftest.er1
20828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020830 (exit $ac_status); } && {
20831 test -z "$ac_c_werror_flag" ||
20832 test ! -s conftest.err
20833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020834 ac_lo=0 ac_mid=0
20835 while :; do
20836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020837/* confdefs.h. */
20838_ACEOF
20839cat confdefs.h >>conftest.$ac_ext
20840cat >>conftest.$ac_ext <<_ACEOF
20841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020842#include <wchar.h>
20843
Martin v. Löwiseba40652007-08-30 20:10:57 +000020844 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020845int
20846main ()
20847{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020849test_array [0] = 0
20850
20851 ;
20852 return 0;
20853}
20854_ACEOF
20855rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020856if { (ac_try="$ac_compile"
20857case "(($ac_try" in
20858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20859 *) ac_try_echo=$ac_try;;
20860esac
20861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20862 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020864 grep -v '^ *+' conftest.er1 >conftest.err
20865 rm -f conftest.er1
20866 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020868 (exit $ac_status); } && {
20869 test -z "$ac_c_werror_flag" ||
20870 test ! -s conftest.err
20871 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020872 ac_hi=$ac_mid; break
20873else
20874 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020875sed 's/^/| /' conftest.$ac_ext >&5
20876
Martin v. Löwiseba40652007-08-30 20:10:57 +000020877 ac_lo=`expr $ac_mid + 1`
20878 if test $ac_lo -le $ac_mid; then
20879 ac_lo= ac_hi=
20880 break
20881 fi
20882 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020883fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020884
20885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020886 done
20887else
20888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020889sed 's/^/| /' conftest.$ac_ext >&5
20890
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020892/* confdefs.h. */
20893_ACEOF
20894cat confdefs.h >>conftest.$ac_ext
20895cat >>conftest.$ac_ext <<_ACEOF
20896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020897#include <wchar.h>
20898
Martin v. Löwiseba40652007-08-30 20:10:57 +000020899 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020900int
20901main ()
20902{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020904test_array [0] = 0
20905
20906 ;
20907 return 0;
20908}
20909_ACEOF
20910rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020911if { (ac_try="$ac_compile"
20912case "(($ac_try" in
20913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20914 *) ac_try_echo=$ac_try;;
20915esac
20916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020919 grep -v '^ *+' conftest.er1 >conftest.err
20920 rm -f conftest.er1
20921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020923 (exit $ac_status); } && {
20924 test -z "$ac_c_werror_flag" ||
20925 test ! -s conftest.err
20926 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020927 ac_hi=-1 ac_mid=-1
20928 while :; do
20929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020930/* confdefs.h. */
20931_ACEOF
20932cat confdefs.h >>conftest.$ac_ext
20933cat >>conftest.$ac_ext <<_ACEOF
20934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020935#include <wchar.h>
20936
Martin v. Löwiseba40652007-08-30 20:10:57 +000020937 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000020938int
20939main ()
20940{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020941static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020942test_array [0] = 0
20943
20944 ;
20945 return 0;
20946}
20947_ACEOF
20948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020949if { (ac_try="$ac_compile"
20950case "(($ac_try" in
20951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20952 *) ac_try_echo=$ac_try;;
20953esac
20954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020957 grep -v '^ *+' conftest.er1 >conftest.err
20958 rm -f conftest.er1
20959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961 (exit $ac_status); } && {
20962 test -z "$ac_c_werror_flag" ||
20963 test ! -s conftest.err
20964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020965 ac_lo=$ac_mid; break
20966else
20967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020968sed 's/^/| /' conftest.$ac_ext >&5
20969
Martin v. Löwiseba40652007-08-30 20:10:57 +000020970 ac_hi=`expr '(' $ac_mid ')' - 1`
20971 if test $ac_mid -le $ac_hi; then
20972 ac_lo= ac_hi=
20973 break
20974 fi
20975 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000020976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020977
20978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020979 done
20980else
20981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020982sed 's/^/| /' conftest.$ac_ext >&5
20983
Martin v. Löwiseba40652007-08-30 20:10:57 +000020984 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000020985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020986
20987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020989
20990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020991# Binary search between lo and hi bounds.
20992while test "x$ac_lo" != "x$ac_hi"; do
20993 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20994 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020995/* confdefs.h. */
20996_ACEOF
20997cat confdefs.h >>conftest.$ac_ext
20998cat >>conftest.$ac_ext <<_ACEOF
20999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021000#include <wchar.h>
21001
Martin v. Löwiseba40652007-08-30 20:10:57 +000021002 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021003int
21004main ()
21005{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021006static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021007test_array [0] = 0
21008
21009 ;
21010 return 0;
21011}
21012_ACEOF
21013rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021014if { (ac_try="$ac_compile"
21015case "(($ac_try" in
21016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21017 *) ac_try_echo=$ac_try;;
21018esac
21019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021022 grep -v '^ *+' conftest.er1 >conftest.err
21023 rm -f conftest.er1
21024 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021026 (exit $ac_status); } && {
21027 test -z "$ac_c_werror_flag" ||
21028 test ! -s conftest.err
21029 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021030 ac_hi=$ac_mid
21031else
21032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021033sed 's/^/| /' conftest.$ac_ext >&5
21034
Martin v. Löwiseba40652007-08-30 20:10:57 +000021035 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021037
21038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021039done
21040case $ac_lo in
21041?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021042'') if test "$ac_cv_type_wchar_t" = yes; then
21043 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021044See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021045echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021046See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021047 { (exit 77); exit 77; }; }
21048 else
21049 ac_cv_sizeof_wchar_t=0
21050 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021051esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021052else
Martin v. Löwis11437992002-04-12 09:54:03 +000021053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021054/* confdefs.h. */
21055_ACEOF
21056cat confdefs.h >>conftest.$ac_ext
21057cat >>conftest.$ac_ext <<_ACEOF
21058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021059#include <wchar.h>
21060
Martin v. Löwiseba40652007-08-30 20:10:57 +000021061 typedef wchar_t ac__type_sizeof_;
21062static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21063static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021064#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021065#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021066int
21067main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021068{
Martin v. Löwis11437992002-04-12 09:54:03 +000021069
21070 FILE *f = fopen ("conftest.val", "w");
21071 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021072 return 1;
21073 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021074 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021075 long int i = longval ();
21076 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21077 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021078 fprintf (f, "%ld\n", i);
21079 }
21080 else
21081 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082 unsigned long int i = ulongval ();
21083 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21084 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021085 fprintf (f, "%lu\n", i);
21086 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021087 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021088
21089 ;
21090 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021091}
Martin v. Löwis11437992002-04-12 09:54:03 +000021092_ACEOF
21093rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021094if { (ac_try="$ac_link"
21095case "(($ac_try" in
21096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21097 *) ac_try_echo=$ac_try;;
21098esac
21099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21100 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021101 ac_status=$?
21102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21103 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021104 { (case "(($ac_try" in
21105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21106 *) ac_try_echo=$ac_try;;
21107esac
21108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21109 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021110 ac_status=$?
21111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21112 (exit $ac_status); }; }; then
21113 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021114else
Martin v. Löwis11437992002-04-12 09:54:03 +000021115 echo "$as_me: program exited with status $ac_status" >&5
21116echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021117sed 's/^/| /' conftest.$ac_ext >&5
21118
Martin v. Löwis11437992002-04-12 09:54:03 +000021119( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021120if test "$ac_cv_type_wchar_t" = yes; then
21121 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021122See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021123echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021124See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021125 { (exit 77); exit 77; }; }
21126 else
21127 ac_cv_sizeof_wchar_t=0
21128 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021130rm -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 +000021131fi
21132rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021134{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21135echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21136
21137
21138
Martin v. Löwis11437992002-04-12 09:54:03 +000021139cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021140#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021141_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021142
Michael W. Hudson54241132001-12-07 15:38:26 +000021143
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021144fi
21145
Martin v. Löwiseba40652007-08-30 20:10:57 +000021146{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21147echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021148have_ucs4_tcl=no
21149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021150/* confdefs.h. */
21151_ACEOF
21152cat confdefs.h >>conftest.$ac_ext
21153cat >>conftest.$ac_ext <<_ACEOF
21154/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021155
21156#include <tcl.h>
21157#if TCL_UTF_MAX != 6
21158# error "NOT UCS4_TCL"
21159#endif
21160int
21161main ()
21162{
21163
21164 ;
21165 return 0;
21166}
21167_ACEOF
21168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021169if { (ac_try="$ac_compile"
21170case "(($ac_try" in
21171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21172 *) ac_try_echo=$ac_try;;
21173esac
21174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021177 grep -v '^ *+' conftest.er1 >conftest.err
21178 rm -f conftest.er1
21179 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021181 (exit $ac_status); } && {
21182 test -z "$ac_c_werror_flag" ||
21183 test ! -s conftest.err
21184 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021185
21186
21187cat >>confdefs.h <<\_ACEOF
21188#define HAVE_UCS4_TCL 1
21189_ACEOF
21190
21191 have_ucs4_tcl=yes
21192
21193else
21194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021195sed 's/^/| /' conftest.$ac_ext >&5
21196
Martin v. Löwiseba40652007-08-30 20:10:57 +000021197
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021199
21200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21201{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21202echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021203
Skip Montanaro6dead952003-09-25 14:50:04 +000021204# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021205if test "$wchar_h" = yes
21206then
21207 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021208 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21209echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021210 if test "${ac_cv_wchar_t_signed+set}" = set; then
21211 echo $ECHO_N "(cached) $ECHO_C" >&6
21212else
21213
21214 if test "$cross_compiling" = yes; then
21215 ac_cv_wchar_t_signed=yes
21216else
21217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021218/* confdefs.h. */
21219_ACEOF
21220cat confdefs.h >>conftest.$ac_ext
21221cat >>conftest.$ac_ext <<_ACEOF
21222/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021223
21224 #include <wchar.h>
21225 int main()
21226 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021227 /* Success: exit code 0 */
21228 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021229 }
21230
21231_ACEOF
21232rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233if { (ac_try="$ac_link"
21234case "(($ac_try" in
21235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21236 *) ac_try_echo=$ac_try;;
21237esac
21238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21239 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021240 ac_status=$?
21241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21242 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243 { (case "(($ac_try" in
21244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21245 *) ac_try_echo=$ac_try;;
21246esac
21247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21248 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021249 ac_status=$?
21250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21251 (exit $ac_status); }; }; then
21252 ac_cv_wchar_t_signed=yes
21253else
21254 echo "$as_me: program exited with status $ac_status" >&5
21255echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021256sed 's/^/| /' conftest.$ac_ext >&5
21257
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021258( exit $ac_status )
21259ac_cv_wchar_t_signed=no
21260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021261rm -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 +000021262fi
21263
Martin v. Löwiseba40652007-08-30 20:10:57 +000021264
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021265fi
21266
Martin v. Löwiseba40652007-08-30 20:10:57 +000021267 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21268echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21269fi
21270
21271{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21272echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21273# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021274if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021275 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021276else
21277 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021278fi
21279
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021280
21281if test $enable_unicode = yes
21282then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021283 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021284 case "$have_ucs4_tcl" in
21285 yes) enable_unicode="ucs4"
21286 ;;
21287 *) enable_unicode="ucs2"
21288 ;;
21289 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021290fi
21291
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021292
21293
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021294case "$enable_unicode" in
21295ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021296 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021297#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021298_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021299
21300 ;;
21301ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021302 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021303#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021304_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021305
21306 ;;
21307esac
21308
Michael W. Hudson54241132001-12-07 15:38:26 +000021309
Martin v. Löwis11437992002-04-12 09:54:03 +000021310
21311
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021312
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021313if test "$enable_unicode" = "no"
21314then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021315 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316 { echo "$as_me:$LINENO: result: not used" >&5
21317echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021318else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021319 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021320
21321cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021322#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021323_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021324
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021325
21326 # wchar_t is only usable if it maps to an unsigned type
21327 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021328 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021329 then
21330 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021331
Martin v. Löwis11437992002-04-12 09:54:03 +000021332cat >>confdefs.h <<\_ACEOF
21333#define HAVE_USABLE_WCHAR_T 1
21334_ACEOF
21335
21336 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021337#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021338_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021339
21340 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21341 then
21342 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021343 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021344#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021345_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021346
21347 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21348 then
21349 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021351#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021352_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021353
21354 else
21355 PY_UNICODE_TYPE="no type found"
21356 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021357 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21358echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021359fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021360
21361# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021362{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21363echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021364if test "${ac_cv_c_bigendian+set}" = set; then
21365 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021366else
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 # See if sys/param.h defines the BYTE_ORDER macro.
21368cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021369/* confdefs.h. */
21370_ACEOF
21371cat confdefs.h >>conftest.$ac_ext
21372cat >>conftest.$ac_ext <<_ACEOF
21373/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021374#include <sys/types.h>
21375#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021376
Martin v. Löwis11437992002-04-12 09:54:03 +000021377int
21378main ()
21379{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21381 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021382 bogus endian macros
21383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021384
21385 ;
21386 return 0;
21387}
21388_ACEOF
21389rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021390if { (ac_try="$ac_compile"
21391case "(($ac_try" in
21392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21393 *) ac_try_echo=$ac_try;;
21394esac
21395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021398 grep -v '^ *+' conftest.er1 >conftest.err
21399 rm -f conftest.er1
21400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402 (exit $ac_status); } && {
21403 test -z "$ac_c_werror_flag" ||
21404 test ! -s conftest.err
21405 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021406 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021407cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021408/* confdefs.h. */
21409_ACEOF
21410cat confdefs.h >>conftest.$ac_ext
21411cat >>conftest.$ac_ext <<_ACEOF
21412/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021413#include <sys/types.h>
21414#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021415
Martin v. Löwis11437992002-04-12 09:54:03 +000021416int
21417main ()
21418{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021419#if BYTE_ORDER != BIG_ENDIAN
21420 not big endian
21421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021422
21423 ;
21424 return 0;
21425}
21426_ACEOF
21427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021428if { (ac_try="$ac_compile"
21429case "(($ac_try" in
21430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21431 *) ac_try_echo=$ac_try;;
21432esac
21433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021436 grep -v '^ *+' conftest.er1 >conftest.err
21437 rm -f conftest.er1
21438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440 (exit $ac_status); } && {
21441 test -z "$ac_c_werror_flag" ||
21442 test ! -s conftest.err
21443 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021444 ac_cv_c_bigendian=yes
21445else
Martin v. Löwis11437992002-04-12 09:54:03 +000021446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021447sed 's/^/| /' conftest.$ac_ext >&5
21448
Martin v. Löwiseba40652007-08-30 20:10:57 +000021449 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021450fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451
21452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021453else
Martin v. Löwis11437992002-04-12 09:54:03 +000021454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021455sed 's/^/| /' conftest.$ac_ext >&5
21456
Martin v. Löwiseba40652007-08-30 20:10:57 +000021457 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021458if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021459 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021460 ac_cv_c_bigendian=unknown
21461 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021462/* confdefs.h. */
21463_ACEOF
21464cat confdefs.h >>conftest.$ac_ext
21465cat >>conftest.$ac_ext <<_ACEOF
21466/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21468short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021469void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021470short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21471short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021472void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021473int
21474main ()
21475{
21476 _ascii (); _ebcdic ();
21477 ;
21478 return 0;
21479}
21480_ACEOF
21481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021482if { (ac_try="$ac_compile"
21483case "(($ac_try" in
21484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21485 *) ac_try_echo=$ac_try;;
21486esac
21487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021490 grep -v '^ *+' conftest.er1 >conftest.err
21491 rm -f conftest.er1
21492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494 (exit $ac_status); } && {
21495 test -z "$ac_c_werror_flag" ||
21496 test ! -s conftest.err
21497 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021498 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021499 ac_cv_c_bigendian=yes
21500fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021501if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021502 if test "$ac_cv_c_bigendian" = unknown; then
21503 ac_cv_c_bigendian=no
21504 else
21505 # finding both strings is unlikely to happen, but who knows?
21506 ac_cv_c_bigendian=unknown
21507 fi
21508fi
21509else
21510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021511sed 's/^/| /' conftest.$ac_ext >&5
21512
Martin v. Löwiseba40652007-08-30 20:10:57 +000021513
Martin v. Löwis11437992002-04-12 09:54:03 +000021514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021515
21516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021517else
21518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021519/* confdefs.h. */
21520_ACEOF
21521cat confdefs.h >>conftest.$ac_ext
21522cat >>conftest.$ac_ext <<_ACEOF
21523/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021524$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021525int
21526main ()
21527{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021528
Guido van Rossumef2255b2000-03-10 22:30:29 +000021529 /* Are we little or big endian? From Harbison&Steele. */
21530 union
21531 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021532 long int l;
21533 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021534 } u;
21535 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536 return u.c[sizeof (long int) - 1] == 1;
21537
21538 ;
21539 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021540}
Martin v. Löwis11437992002-04-12 09:54:03 +000021541_ACEOF
21542rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021543if { (ac_try="$ac_link"
21544case "(($ac_try" in
21545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21546 *) ac_try_echo=$ac_try;;
21547esac
21548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21549 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021550 ac_status=$?
21551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21552 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021553 { (case "(($ac_try" in
21554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21555 *) ac_try_echo=$ac_try;;
21556esac
21557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21558 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021559 ac_status=$?
21560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21561 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021562 ac_cv_c_bigendian=no
21563else
Martin v. Löwis11437992002-04-12 09:54:03 +000021564 echo "$as_me: program exited with status $ac_status" >&5
21565echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021566sed 's/^/| /' conftest.$ac_ext >&5
21567
Martin v. Löwis11437992002-04-12 09:54:03 +000021568( exit $ac_status )
21569ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021571rm -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 +000021572fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021573
21574
Martin v. Löwis11437992002-04-12 09:54:03 +000021575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021576
21577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021578fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021579{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21580echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021581case $ac_cv_c_bigendian in
21582 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021583
Martin v. Löwis11437992002-04-12 09:54:03 +000021584cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021585#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021586_ACEOF
21587 ;;
21588 no)
21589 ;;
21590 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000021591 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021592presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021593echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021594presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
21595 { (exit 1); exit 1; }; } ;;
21596esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000021597
Michael W. Hudson54241132001-12-07 15:38:26 +000021598
Ronald Oussoren988117f2006-04-29 11:31:35 +000021599
21600
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021601# Check whether right shifting a negative integer extends the sign bit
21602# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000021603{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
21604echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021605if test "${ac_cv_rshift_extends_sign+set}" = set; then
21606 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021607else
Martin v. Löwis11437992002-04-12 09:54:03 +000021608
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021609if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021610 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021611else
Martin v. Löwis11437992002-04-12 09:54:03 +000021612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021613/* confdefs.h. */
21614_ACEOF
21615cat confdefs.h >>conftest.$ac_ext
21616cat >>conftest.$ac_ext <<_ACEOF
21617/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021618
21619int main()
21620{
Vladimir Marangozova6180282000-07-12 05:05:06 +000021621 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021622}
21623
Martin v. Löwis11437992002-04-12 09:54:03 +000021624_ACEOF
21625rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021626if { (ac_try="$ac_link"
21627case "(($ac_try" in
21628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21629 *) ac_try_echo=$ac_try;;
21630esac
21631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21632 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021633 ac_status=$?
21634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21635 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636 { (case "(($ac_try" in
21637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21638 *) ac_try_echo=$ac_try;;
21639esac
21640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21641 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021642 ac_status=$?
21643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21644 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000021645 ac_cv_rshift_extends_sign=yes
21646else
Martin v. Löwis11437992002-04-12 09:54:03 +000021647 echo "$as_me: program exited with status $ac_status" >&5
21648echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021649sed 's/^/| /' conftest.$ac_ext >&5
21650
Martin v. Löwis11437992002-04-12 09:54:03 +000021651( exit $ac_status )
21652ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000021653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021654rm -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 +000021655fi
21656
Martin v. Löwiseba40652007-08-30 20:10:57 +000021657
21658fi
21659
21660{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
21661echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000021662if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021663then
Martin v. Löwis11437992002-04-12 09:54:03 +000021664
21665cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021666#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021667_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021668
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021669fi
21670
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021671# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000021672{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
21673echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021674if test "${ac_cv_have_getc_unlocked+set}" = set; then
21675 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021676else
Martin v. Löwis11437992002-04-12 09:54:03 +000021677
21678cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021679/* confdefs.h. */
21680_ACEOF
21681cat confdefs.h >>conftest.$ac_ext
21682cat >>conftest.$ac_ext <<_ACEOF
21683/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021684#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021685int
21686main ()
21687{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021688
21689 FILE *f = fopen("/dev/null", "r");
21690 flockfile(f);
21691 getc_unlocked(f);
21692 funlockfile(f);
21693
Martin v. Löwis11437992002-04-12 09:54:03 +000021694 ;
21695 return 0;
21696}
21697_ACEOF
21698rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021699if { (ac_try="$ac_link"
21700case "(($ac_try" in
21701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21702 *) ac_try_echo=$ac_try;;
21703esac
21704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21705 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021707 grep -v '^ *+' conftest.er1 >conftest.err
21708 rm -f conftest.er1
21709 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021711 (exit $ac_status); } && {
21712 test -z "$ac_c_werror_flag" ||
21713 test ! -s conftest.err
21714 } && test -s conftest$ac_exeext &&
21715 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021716 ac_cv_have_getc_unlocked=yes
21717else
Martin v. Löwis11437992002-04-12 09:54:03 +000021718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021719sed 's/^/| /' conftest.$ac_ext >&5
21720
Martin v. Löwiseba40652007-08-30 20:10:57 +000021721 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021723
21724rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021725 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021726fi
21727
Martin v. Löwiseba40652007-08-30 20:10:57 +000021728{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
21729echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021730if test "$ac_cv_have_getc_unlocked" = yes
21731then
Martin v. Löwis11437992002-04-12 09:54:03 +000021732
21733cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021734#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021735_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021736
21737fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021738
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021739# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000021740# save the value of LIBS so we don't actually link Python with readline
21741LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021742
Martin v. Löwiseba40652007-08-30 20:10:57 +000021743{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
21744echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021745if test "${ac_cv_lib_readline_readline+set}" = set; then
21746 echo $ECHO_N "(cached) $ECHO_C" >&6
21747else
21748 ac_check_lib_save_LIBS=$LIBS
21749LIBS="-lreadline $LIBS"
21750cat >conftest.$ac_ext <<_ACEOF
21751/* confdefs.h. */
21752_ACEOF
21753cat confdefs.h >>conftest.$ac_ext
21754cat >>conftest.$ac_ext <<_ACEOF
21755/* end confdefs.h. */
21756
Martin v. Löwiseba40652007-08-30 20:10:57 +000021757/* Override any GCC internal prototype to avoid an error.
21758 Use char because int might match the return type of a GCC
21759 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021760#ifdef __cplusplus
21761extern "C"
21762#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021763char readline ();
21764int
21765main ()
21766{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021767return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021768 ;
21769 return 0;
21770}
21771_ACEOF
21772rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021773if { (ac_try="$ac_link"
21774case "(($ac_try" in
21775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21776 *) ac_try_echo=$ac_try;;
21777esac
21778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21779 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021780 ac_status=$?
21781 grep -v '^ *+' conftest.er1 >conftest.err
21782 rm -f conftest.er1
21783 cat conftest.err >&5
21784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021785 (exit $ac_status); } && {
21786 test -z "$ac_c_werror_flag" ||
21787 test ! -s conftest.err
21788 } && test -s conftest$ac_exeext &&
21789 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021790 ac_cv_lib_readline_readline=yes
21791else
21792 echo "$as_me: failed program was:" >&5
21793sed 's/^/| /' conftest.$ac_ext >&5
21794
Martin v. Löwiseba40652007-08-30 20:10:57 +000021795 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021796fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021797
21798rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021799 conftest$ac_exeext conftest.$ac_ext
21800LIBS=$ac_check_lib_save_LIBS
21801fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021802{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
21803echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021804if test $ac_cv_lib_readline_readline = yes; then
21805 cat >>confdefs.h <<_ACEOF
21806#define HAVE_LIBREADLINE 1
21807_ACEOF
21808
21809 LIBS="-lreadline $LIBS"
21810
21811fi
21812
21813if test "$ac_cv_have_readline_readline" = no
21814then
21815
Martin v. Löwiseba40652007-08-30 20:10:57 +000021816{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
21817echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021818if test "${ac_cv_lib_termcap_readline+set}" = set; then
21819 echo $ECHO_N "(cached) $ECHO_C" >&6
21820else
21821 ac_check_lib_save_LIBS=$LIBS
21822LIBS="-ltermcap $LIBS"
21823cat >conftest.$ac_ext <<_ACEOF
21824/* confdefs.h. */
21825_ACEOF
21826cat confdefs.h >>conftest.$ac_ext
21827cat >>conftest.$ac_ext <<_ACEOF
21828/* end confdefs.h. */
21829
Martin v. Löwiseba40652007-08-30 20:10:57 +000021830/* Override any GCC internal prototype to avoid an error.
21831 Use char because int might match the return type of a GCC
21832 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021833#ifdef __cplusplus
21834extern "C"
21835#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021836char readline ();
21837int
21838main ()
21839{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021840return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021841 ;
21842 return 0;
21843}
21844_ACEOF
21845rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021846if { (ac_try="$ac_link"
21847case "(($ac_try" in
21848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21849 *) ac_try_echo=$ac_try;;
21850esac
21851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21852 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021853 ac_status=$?
21854 grep -v '^ *+' conftest.er1 >conftest.err
21855 rm -f conftest.er1
21856 cat conftest.err >&5
21857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021858 (exit $ac_status); } && {
21859 test -z "$ac_c_werror_flag" ||
21860 test ! -s conftest.err
21861 } && test -s conftest$ac_exeext &&
21862 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021863 ac_cv_lib_termcap_readline=yes
21864else
21865 echo "$as_me: failed program was:" >&5
21866sed 's/^/| /' conftest.$ac_ext >&5
21867
Martin v. Löwiseba40652007-08-30 20:10:57 +000021868 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021870
21871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021872 conftest$ac_exeext conftest.$ac_ext
21873LIBS=$ac_check_lib_save_LIBS
21874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021875{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
21876echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021877if test $ac_cv_lib_termcap_readline = yes; then
21878 cat >>confdefs.h <<_ACEOF
21879#define HAVE_LIBTERMCAP 1
21880_ACEOF
21881
21882 LIBS="-ltermcap $LIBS"
21883
21884fi
21885
21886fi
21887
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021888# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000021889{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
21890echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021891if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
21892 echo $ECHO_N "(cached) $ECHO_C" >&6
21893else
21894 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021895LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021896cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021897/* confdefs.h. */
21898_ACEOF
21899cat confdefs.h >>conftest.$ac_ext
21900cat >>conftest.$ac_ext <<_ACEOF
21901/* end confdefs.h. */
21902
Martin v. Löwiseba40652007-08-30 20:10:57 +000021903/* Override any GCC internal prototype to avoid an error.
21904 Use char because int might match the return type of a GCC
21905 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021906#ifdef __cplusplus
21907extern "C"
21908#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021909char rl_callback_handler_install ();
21910int
21911main ()
21912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021913return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021914 ;
21915 return 0;
21916}
21917_ACEOF
21918rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021919if { (ac_try="$ac_link"
21920case "(($ac_try" in
21921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21922 *) ac_try_echo=$ac_try;;
21923esac
21924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21925 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021927 grep -v '^ *+' conftest.er1 >conftest.err
21928 rm -f conftest.er1
21929 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021931 (exit $ac_status); } && {
21932 test -z "$ac_c_werror_flag" ||
21933 test ! -s conftest.err
21934 } && test -s conftest$ac_exeext &&
21935 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021936 ac_cv_lib_readline_rl_callback_handler_install=yes
21937else
21938 echo "$as_me: failed program was:" >&5
21939sed 's/^/| /' conftest.$ac_ext >&5
21940
Martin v. Löwiseba40652007-08-30 20:10:57 +000021941 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021943
21944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021945 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021946LIBS=$ac_check_lib_save_LIBS
21947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021948{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
21949echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021950if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
21951
21952cat >>confdefs.h <<\_ACEOF
21953#define HAVE_RL_CALLBACK 1
21954_ACEOF
21955
21956fi
21957
21958
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021959# check for readline 2.2
21960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021961/* confdefs.h. */
21962_ACEOF
21963cat confdefs.h >>conftest.$ac_ext
21964cat >>conftest.$ac_ext <<_ACEOF
21965/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021966#include <readline/readline.h>
21967_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021968if { (ac_try="$ac_cpp conftest.$ac_ext"
21969case "(($ac_try" in
21970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21971 *) ac_try_echo=$ac_try;;
21972esac
21973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21974 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021975 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021976 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021977 rm -f conftest.er1
21978 cat conftest.err >&5
21979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021980 (exit $ac_status); } >/dev/null && {
21981 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21982 test ! -s conftest.err
21983 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021984 have_readline=yes
21985else
21986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021987sed 's/^/| /' conftest.$ac_ext >&5
21988
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021989 have_readline=no
21990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021991
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021992rm -f conftest.err conftest.$ac_ext
21993if test $have_readline = yes
21994then
21995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021996/* confdefs.h. */
21997_ACEOF
21998cat confdefs.h >>conftest.$ac_ext
21999cat >>conftest.$ac_ext <<_ACEOF
22000/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022001#include <readline/readline.h>
22002
22003_ACEOF
22004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022005 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022006
22007cat >>confdefs.h <<\_ACEOF
22008#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22009_ACEOF
22010
22011fi
22012rm -f conftest*
22013
22014fi
22015
Martin v. Löwis0daad592001-09-30 21:09:59 +000022016# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022017{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22018echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022019if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22020 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022021else
Martin v. Löwis11437992002-04-12 09:54:03 +000022022 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022023LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022024cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022025/* confdefs.h. */
22026_ACEOF
22027cat confdefs.h >>conftest.$ac_ext
22028cat >>conftest.$ac_ext <<_ACEOF
22029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022030
Martin v. Löwiseba40652007-08-30 20:10:57 +000022031/* Override any GCC internal prototype to avoid an error.
22032 Use char because int might match the return type of a GCC
22033 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022034#ifdef __cplusplus
22035extern "C"
22036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022037char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022038int
22039main ()
22040{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022041return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022042 ;
22043 return 0;
22044}
22045_ACEOF
22046rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022047if { (ac_try="$ac_link"
22048case "(($ac_try" in
22049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22050 *) ac_try_echo=$ac_try;;
22051esac
22052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22053 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022055 grep -v '^ *+' conftest.er1 >conftest.err
22056 rm -f conftest.er1
22057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022059 (exit $ac_status); } && {
22060 test -z "$ac_c_werror_flag" ||
22061 test ! -s conftest.err
22062 } && test -s conftest$ac_exeext &&
22063 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022064 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022065else
Martin v. Löwis11437992002-04-12 09:54:03 +000022066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022067sed 's/^/| /' conftest.$ac_ext >&5
22068
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022071
22072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022073 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022074LIBS=$ac_check_lib_save_LIBS
22075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022076{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22077echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022078if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022079
Martin v. Löwis11437992002-04-12 09:54:03 +000022080cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022081#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022082_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022083
Martin v. Löwis0daad592001-09-30 21:09:59 +000022084fi
22085
Michael W. Hudson54241132001-12-07 15:38:26 +000022086
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022087# also in 4.0
22088{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22089echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22090if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22091 echo $ECHO_N "(cached) $ECHO_C" >&6
22092else
22093 ac_check_lib_save_LIBS=$LIBS
22094LIBS="-lreadline $LIBS"
22095cat >conftest.$ac_ext <<_ACEOF
22096/* confdefs.h. */
22097_ACEOF
22098cat confdefs.h >>conftest.$ac_ext
22099cat >>conftest.$ac_ext <<_ACEOF
22100/* end confdefs.h. */
22101
22102/* Override any GCC internal prototype to avoid an error.
22103 Use char because int might match the return type of a GCC
22104 builtin and then its argument prototype would still apply. */
22105#ifdef __cplusplus
22106extern "C"
22107#endif
22108char rl_completion_display_matches_hook ();
22109int
22110main ()
22111{
22112return rl_completion_display_matches_hook ();
22113 ;
22114 return 0;
22115}
22116_ACEOF
22117rm -f conftest.$ac_objext conftest$ac_exeext
22118if { (ac_try="$ac_link"
22119case "(($ac_try" in
22120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22121 *) ac_try_echo=$ac_try;;
22122esac
22123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22124 (eval "$ac_link") 2>conftest.er1
22125 ac_status=$?
22126 grep -v '^ *+' conftest.er1 >conftest.err
22127 rm -f conftest.er1
22128 cat conftest.err >&5
22129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22130 (exit $ac_status); } && {
22131 test -z "$ac_c_werror_flag" ||
22132 test ! -s conftest.err
22133 } && test -s conftest$ac_exeext &&
22134 $as_test_x conftest$ac_exeext; then
22135 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22136else
22137 echo "$as_me: failed program was:" >&5
22138sed 's/^/| /' conftest.$ac_ext >&5
22139
22140 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22141fi
22142
22143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22144 conftest$ac_exeext conftest.$ac_ext
22145LIBS=$ac_check_lib_save_LIBS
22146fi
22147{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22148echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22149if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22150
22151cat >>confdefs.h <<\_ACEOF
22152#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22153_ACEOF
22154
22155fi
22156
22157
Martin v. Löwis0daad592001-09-30 21:09:59 +000022158# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022159{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22160echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022161if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22162 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022163else
Martin v. Löwis11437992002-04-12 09:54:03 +000022164 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022165LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022166cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022167/* confdefs.h. */
22168_ACEOF
22169cat confdefs.h >>conftest.$ac_ext
22170cat >>conftest.$ac_ext <<_ACEOF
22171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022172
Martin v. Löwiseba40652007-08-30 20:10:57 +000022173/* Override any GCC internal prototype to avoid an error.
22174 Use char because int might match the return type of a GCC
22175 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022176#ifdef __cplusplus
22177extern "C"
22178#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022179char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022180int
22181main ()
22182{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022184 ;
22185 return 0;
22186}
22187_ACEOF
22188rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022189if { (ac_try="$ac_link"
22190case "(($ac_try" in
22191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22192 *) ac_try_echo=$ac_try;;
22193esac
22194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22195 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022197 grep -v '^ *+' conftest.er1 >conftest.err
22198 rm -f conftest.er1
22199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022201 (exit $ac_status); } && {
22202 test -z "$ac_c_werror_flag" ||
22203 test ! -s conftest.err
22204 } && test -s conftest$ac_exeext &&
22205 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022206 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022207else
Martin v. Löwis11437992002-04-12 09:54:03 +000022208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022209sed 's/^/| /' conftest.$ac_ext >&5
22210
Martin v. Löwiseba40652007-08-30 20:10:57 +000022211 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022213
22214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022215 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022216LIBS=$ac_check_lib_save_LIBS
22217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022218{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22219echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022220if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022221
Martin v. Löwis11437992002-04-12 09:54:03 +000022222cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022223#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022224_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022225
Guido van Rossum353ae582001-07-10 16:45:32 +000022226fi
22227
Jack Jansendd19cf82001-12-06 22:36:17 +000022228
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022229# also in readline 4.2
22230cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022231/* confdefs.h. */
22232_ACEOF
22233cat confdefs.h >>conftest.$ac_ext
22234cat >>conftest.$ac_ext <<_ACEOF
22235/* end confdefs.h. */
22236#include <readline/readline.h>
22237_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022238if { (ac_try="$ac_cpp conftest.$ac_ext"
22239case "(($ac_try" in
22240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22241 *) ac_try_echo=$ac_try;;
22242esac
22243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22244 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022245 ac_status=$?
22246 grep -v '^ *+' conftest.er1 >conftest.err
22247 rm -f conftest.er1
22248 cat conftest.err >&5
22249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022250 (exit $ac_status); } >/dev/null && {
22251 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22252 test ! -s conftest.err
22253 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022254 have_readline=yes
22255else
22256 echo "$as_me: failed program was:" >&5
22257sed 's/^/| /' conftest.$ac_ext >&5
22258
22259 have_readline=no
22260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022261
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022262rm -f conftest.err conftest.$ac_ext
22263if test $have_readline = yes
22264then
22265 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022266/* confdefs.h. */
22267_ACEOF
22268cat confdefs.h >>conftest.$ac_ext
22269cat >>conftest.$ac_ext <<_ACEOF
22270/* end confdefs.h. */
22271#include <readline/readline.h>
22272
22273_ACEOF
22274if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22275 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22276
22277cat >>confdefs.h <<\_ACEOF
22278#define HAVE_RL_CATCH_SIGNAL 1
22279_ACEOF
22280
22281fi
22282rm -f conftest*
22283
22284fi
22285
Martin v. Löwis82bca632006-02-10 20:49:30 +000022286# End of readline checks: restore LIBS
22287LIBS=$LIBS_no_readline
22288
Martin v. Löwiseba40652007-08-30 20:10:57 +000022289{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22290echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022291if test "${ac_cv_broken_nice+set}" = set; then
22292 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022293else
Martin v. Löwis11437992002-04-12 09:54:03 +000022294
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022295if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022296 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022297else
Martin v. Löwis11437992002-04-12 09:54:03 +000022298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022299/* confdefs.h. */
22300_ACEOF
22301cat confdefs.h >>conftest.$ac_ext
22302cat >>conftest.$ac_ext <<_ACEOF
22303/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022304
22305int main()
22306{
22307 int val1 = nice(1);
22308 if (val1 != -1 && val1 == nice(2))
22309 exit(0);
22310 exit(1);
22311}
22312
Martin v. Löwis11437992002-04-12 09:54:03 +000022313_ACEOF
22314rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315if { (ac_try="$ac_link"
22316case "(($ac_try" in
22317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22318 *) ac_try_echo=$ac_try;;
22319esac
22320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22321 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022322 ac_status=$?
22323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325 { (case "(($ac_try" in
22326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22327 *) ac_try_echo=$ac_try;;
22328esac
22329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22330 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022331 ac_status=$?
22332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22333 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022334 ac_cv_broken_nice=yes
22335else
Martin v. Löwis11437992002-04-12 09:54:03 +000022336 echo "$as_me: program exited with status $ac_status" >&5
22337echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022338sed 's/^/| /' conftest.$ac_ext >&5
22339
Martin v. Löwis11437992002-04-12 09:54:03 +000022340( exit $ac_status )
22341ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343rm -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 +000022344fi
22345
Martin v. Löwiseba40652007-08-30 20:10:57 +000022346
22347fi
22348
22349{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22350echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022351if test "$ac_cv_broken_nice" = yes
22352then
Martin v. Löwis11437992002-04-12 09:54:03 +000022353
22354cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022355#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022356_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022357
22358fi
22359
Martin v. Löwiseba40652007-08-30 20:10:57 +000022360{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22361echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022362if test "$cross_compiling" = yes; then
22363 ac_cv_broken_poll=no
22364else
22365 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022366/* confdefs.h. */
22367_ACEOF
22368cat confdefs.h >>conftest.$ac_ext
22369cat >>conftest.$ac_ext <<_ACEOF
22370/* end confdefs.h. */
22371
22372#include <poll.h>
22373
22374int main (void)
22375 {
22376 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22377
22378 close (42);
22379
22380 int poll_test = poll (&poll_struct, 1, 0);
22381
22382 if (poll_test < 0)
22383 {
22384 exit(0);
22385 }
22386 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22387 {
22388 exit(0);
22389 }
22390 else
22391 {
22392 exit(1);
22393 }
22394 }
22395
22396_ACEOF
22397rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022398if { (ac_try="$ac_link"
22399case "(($ac_try" in
22400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22401 *) ac_try_echo=$ac_try;;
22402esac
22403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22404 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022405 ac_status=$?
22406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22407 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022408 { (case "(($ac_try" in
22409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22410 *) ac_try_echo=$ac_try;;
22411esac
22412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22413 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022414 ac_status=$?
22415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22416 (exit $ac_status); }; }; then
22417 ac_cv_broken_poll=yes
22418else
22419 echo "$as_me: program exited with status $ac_status" >&5
22420echo "$as_me: failed program was:" >&5
22421sed 's/^/| /' conftest.$ac_ext >&5
22422
22423( exit $ac_status )
22424ac_cv_broken_poll=no
22425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022426rm -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 +000022427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022428
22429
22430{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22431echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022432if test "$ac_cv_broken_poll" = yes
22433then
22434
22435cat >>confdefs.h <<\_ACEOF
22436#define HAVE_BROKEN_POLL 1
22437_ACEOF
22438
22439fi
22440
Brett Cannon43802422005-02-10 20:48:03 +000022441# 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 +000022442# (which is not required by ISO C or UNIX spec) and/or if we support
22443# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022444{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22445echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022446if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22447 echo $ECHO_N "(cached) $ECHO_C" >&6
22448else
22449 cat >conftest.$ac_ext <<_ACEOF
22450/* confdefs.h. */
22451_ACEOF
22452cat confdefs.h >>conftest.$ac_ext
22453cat >>conftest.$ac_ext <<_ACEOF
22454/* end confdefs.h. */
22455#include <sys/types.h>
22456#include <$ac_cv_struct_tm>
22457
22458
22459int
22460main ()
22461{
22462static struct tm ac_aggr;
22463if (ac_aggr.tm_zone)
22464return 0;
22465 ;
22466 return 0;
22467}
22468_ACEOF
22469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022470if { (ac_try="$ac_compile"
22471case "(($ac_try" in
22472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22473 *) ac_try_echo=$ac_try;;
22474esac
22475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22476 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022477 ac_status=$?
22478 grep -v '^ *+' conftest.er1 >conftest.err
22479 rm -f conftest.er1
22480 cat conftest.err >&5
22481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022482 (exit $ac_status); } && {
22483 test -z "$ac_c_werror_flag" ||
22484 test ! -s conftest.err
22485 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022486 ac_cv_member_struct_tm_tm_zone=yes
22487else
22488 echo "$as_me: failed program was:" >&5
22489sed 's/^/| /' conftest.$ac_ext >&5
22490
Martin v. Löwiseba40652007-08-30 20:10:57 +000022491 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022492/* confdefs.h. */
22493_ACEOF
22494cat confdefs.h >>conftest.$ac_ext
22495cat >>conftest.$ac_ext <<_ACEOF
22496/* end confdefs.h. */
22497#include <sys/types.h>
22498#include <$ac_cv_struct_tm>
22499
22500
22501int
22502main ()
22503{
22504static struct tm ac_aggr;
22505if (sizeof ac_aggr.tm_zone)
22506return 0;
22507 ;
22508 return 0;
22509}
22510_ACEOF
22511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022512if { (ac_try="$ac_compile"
22513case "(($ac_try" in
22514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22515 *) ac_try_echo=$ac_try;;
22516esac
22517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22518 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022519 ac_status=$?
22520 grep -v '^ *+' conftest.er1 >conftest.err
22521 rm -f conftest.er1
22522 cat conftest.err >&5
22523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524 (exit $ac_status); } && {
22525 test -z "$ac_c_werror_flag" ||
22526 test ! -s conftest.err
22527 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022528 ac_cv_member_struct_tm_tm_zone=yes
22529else
22530 echo "$as_me: failed program was:" >&5
22531sed 's/^/| /' conftest.$ac_ext >&5
22532
Martin v. Löwiseba40652007-08-30 20:10:57 +000022533 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000022534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022535
22536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022538
22539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000022540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022541{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
22542echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022543if test $ac_cv_member_struct_tm_tm_zone = yes; then
22544
22545cat >>confdefs.h <<_ACEOF
22546#define HAVE_STRUCT_TM_TM_ZONE 1
22547_ACEOF
22548
22549
22550fi
22551
22552if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
22553
22554cat >>confdefs.h <<\_ACEOF
22555#define HAVE_TM_ZONE 1
22556_ACEOF
22557
22558else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022559 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
22560echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
22561if test "${ac_cv_have_decl_tzname+set}" = set; then
22562 echo $ECHO_N "(cached) $ECHO_C" >&6
22563else
22564 cat >conftest.$ac_ext <<_ACEOF
22565/* confdefs.h. */
22566_ACEOF
22567cat confdefs.h >>conftest.$ac_ext
22568cat >>conftest.$ac_ext <<_ACEOF
22569/* end confdefs.h. */
22570#include <time.h>
22571
22572int
22573main ()
22574{
22575#ifndef tzname
22576 (void) tzname;
22577#endif
22578
22579 ;
22580 return 0;
22581}
22582_ACEOF
22583rm -f conftest.$ac_objext
22584if { (ac_try="$ac_compile"
22585case "(($ac_try" in
22586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22587 *) ac_try_echo=$ac_try;;
22588esac
22589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22590 (eval "$ac_compile") 2>conftest.er1
22591 ac_status=$?
22592 grep -v '^ *+' conftest.er1 >conftest.err
22593 rm -f conftest.er1
22594 cat conftest.err >&5
22595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22596 (exit $ac_status); } && {
22597 test -z "$ac_c_werror_flag" ||
22598 test ! -s conftest.err
22599 } && test -s conftest.$ac_objext; then
22600 ac_cv_have_decl_tzname=yes
22601else
22602 echo "$as_me: failed program was:" >&5
22603sed 's/^/| /' conftest.$ac_ext >&5
22604
22605 ac_cv_have_decl_tzname=no
22606fi
22607
22608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22609fi
22610{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
22611echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
22612if test $ac_cv_have_decl_tzname = yes; then
22613
22614cat >>confdefs.h <<_ACEOF
22615#define HAVE_DECL_TZNAME 1
22616_ACEOF
22617
22618
22619else
22620 cat >>confdefs.h <<_ACEOF
22621#define HAVE_DECL_TZNAME 0
22622_ACEOF
22623
22624
22625fi
22626
22627
22628 { echo "$as_me:$LINENO: checking for tzname" >&5
22629echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022630if test "${ac_cv_var_tzname+set}" = set; then
22631 echo $ECHO_N "(cached) $ECHO_C" >&6
22632else
22633 cat >conftest.$ac_ext <<_ACEOF
22634/* confdefs.h. */
22635_ACEOF
22636cat confdefs.h >>conftest.$ac_ext
22637cat >>conftest.$ac_ext <<_ACEOF
22638/* end confdefs.h. */
22639#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000022640#if !HAVE_DECL_TZNAME
22641extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000022642#endif
22643
22644int
22645main ()
22646{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022647return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000022648 ;
22649 return 0;
22650}
22651_ACEOF
22652rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022653if { (ac_try="$ac_link"
22654case "(($ac_try" in
22655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22656 *) ac_try_echo=$ac_try;;
22657esac
22658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22659 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022660 ac_status=$?
22661 grep -v '^ *+' conftest.er1 >conftest.err
22662 rm -f conftest.er1
22663 cat conftest.err >&5
22664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022665 (exit $ac_status); } && {
22666 test -z "$ac_c_werror_flag" ||
22667 test ! -s conftest.err
22668 } && test -s conftest$ac_exeext &&
22669 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000022670 ac_cv_var_tzname=yes
22671else
22672 echo "$as_me: failed program was:" >&5
22673sed 's/^/| /' conftest.$ac_ext >&5
22674
Martin v. Löwiseba40652007-08-30 20:10:57 +000022675 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000022676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022677
22678rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000022679 conftest$ac_exeext conftest.$ac_ext
22680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022681{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
22682echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022683 if test $ac_cv_var_tzname = yes; then
22684
22685cat >>confdefs.h <<\_ACEOF
22686#define HAVE_TZNAME 1
22687_ACEOF
22688
22689 fi
22690fi
22691
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022692
Martin v. Löwis1d459062005-03-14 21:23:33 +000022693# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000022694{ echo "$as_me:$LINENO: checking for working tzset()" >&5
22695echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022696if test "${ac_cv_working_tzset+set}" = set; then
22697 echo $ECHO_N "(cached) $ECHO_C" >&6
22698else
22699
22700if test "$cross_compiling" = yes; then
22701 ac_cv_working_tzset=no
22702else
22703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022704/* confdefs.h. */
22705_ACEOF
22706cat confdefs.h >>conftest.$ac_ext
22707cat >>conftest.$ac_ext <<_ACEOF
22708/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022709
22710#include <stdlib.h>
22711#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000022712#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000022713
22714#if HAVE_TZNAME
22715extern char *tzname[];
22716#endif
22717
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022718int main()
22719{
Brett Cannon18367812003-09-19 00:59:16 +000022720 /* Note that we need to ensure that not only does tzset(3)
22721 do 'something' with localtime, but it works as documented
22722 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000022723 This includes making sure that tzname is set properly if
22724 tm->tm_zone does not exist since it is the alternative way
22725 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000022726
22727 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000022728 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000022729 */
22730
Martin v. Löwis1d459062005-03-14 21:23:33 +000022731 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000022732 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
22733
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022734 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022735 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022736 if (localtime(&groundhogday)->tm_hour != 0)
22737 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022738#if HAVE_TZNAME
22739 /* For UTC, tzname[1] is sometimes "", sometimes " " */
22740 if (strcmp(tzname[0], "UTC") ||
22741 (tzname[1][0] != 0 && tzname[1][0] != ' '))
22742 exit(1);
22743#endif
Brett Cannon18367812003-09-19 00:59:16 +000022744
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022745 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022746 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022747 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022748 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022749#if HAVE_TZNAME
22750 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
22751 exit(1);
22752#endif
Brett Cannon18367812003-09-19 00:59:16 +000022753
22754 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
22755 tzset();
22756 if (localtime(&groundhogday)->tm_hour != 11)
22757 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022758#if HAVE_TZNAME
22759 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
22760 exit(1);
22761#endif
22762
22763#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000022764 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
22765 exit(1);
22766 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
22767 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022768#endif
Brett Cannon18367812003-09-19 00:59:16 +000022769
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022770 exit(0);
22771}
22772
22773_ACEOF
22774rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022775if { (ac_try="$ac_link"
22776case "(($ac_try" in
22777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22778 *) ac_try_echo=$ac_try;;
22779esac
22780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22781 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022782 ac_status=$?
22783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22784 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022785 { (case "(($ac_try" in
22786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22787 *) ac_try_echo=$ac_try;;
22788esac
22789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22790 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022791 ac_status=$?
22792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22793 (exit $ac_status); }; }; then
22794 ac_cv_working_tzset=yes
22795else
22796 echo "$as_me: program exited with status $ac_status" >&5
22797echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022798sed 's/^/| /' conftest.$ac_ext >&5
22799
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022800( exit $ac_status )
22801ac_cv_working_tzset=no
22802fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022803rm -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 +000022804fi
22805
Martin v. Löwiseba40652007-08-30 20:10:57 +000022806
22807fi
22808
22809{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
22810echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022811if test "$ac_cv_working_tzset" = yes
22812then
22813
22814cat >>confdefs.h <<\_ACEOF
22815#define HAVE_WORKING_TZSET 1
22816_ACEOF
22817
22818fi
22819
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022820# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022821{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
22822echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022823if test "${ac_cv_stat_tv_nsec+set}" = set; then
22824 echo $ECHO_N "(cached) $ECHO_C" >&6
22825else
22826 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022827/* confdefs.h. */
22828_ACEOF
22829cat confdefs.h >>conftest.$ac_ext
22830cat >>conftest.$ac_ext <<_ACEOF
22831/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022832#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022833int
22834main ()
22835{
22836
22837struct stat st;
22838st.st_mtim.tv_nsec = 1;
22839
22840 ;
22841 return 0;
22842}
22843_ACEOF
22844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022845if { (ac_try="$ac_compile"
22846case "(($ac_try" in
22847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22848 *) ac_try_echo=$ac_try;;
22849esac
22850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022853 grep -v '^ *+' conftest.er1 >conftest.err
22854 rm -f conftest.er1
22855 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022857 (exit $ac_status); } && {
22858 test -z "$ac_c_werror_flag" ||
22859 test ! -s conftest.err
22860 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000022861 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022862else
22863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022864sed 's/^/| /' conftest.$ac_ext >&5
22865
Martin v. Löwiseba40652007-08-30 20:10:57 +000022866 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022867fi
22868
Martin v. Löwiseba40652007-08-30 20:10:57 +000022869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22870fi
22871
22872{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
22873echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022874if test "$ac_cv_stat_tv_nsec" = yes
22875then
22876
22877cat >>confdefs.h <<\_ACEOF
22878#define HAVE_STAT_TV_NSEC 1
22879_ACEOF
22880
22881fi
22882
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022883# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000022884{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
22885echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022886if test "${ac_cv_stat_tv_nsec2+set}" = set; then
22887 echo $ECHO_N "(cached) $ECHO_C" >&6
22888else
22889 cat >conftest.$ac_ext <<_ACEOF
22890/* confdefs.h. */
22891_ACEOF
22892cat confdefs.h >>conftest.$ac_ext
22893cat >>conftest.$ac_ext <<_ACEOF
22894/* end confdefs.h. */
22895#include <sys/stat.h>
22896int
22897main ()
22898{
22899
22900struct stat st;
22901st.st_mtimespec.tv_nsec = 1;
22902
22903 ;
22904 return 0;
22905}
22906_ACEOF
22907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022908if { (ac_try="$ac_compile"
22909case "(($ac_try" in
22910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22911 *) ac_try_echo=$ac_try;;
22912esac
22913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022915 ac_status=$?
22916 grep -v '^ *+' conftest.er1 >conftest.err
22917 rm -f conftest.er1
22918 cat conftest.err >&5
22919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022920 (exit $ac_status); } && {
22921 test -z "$ac_c_werror_flag" ||
22922 test ! -s conftest.err
22923 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022924 ac_cv_stat_tv_nsec2=yes
22925else
22926 echo "$as_me: failed program was:" >&5
22927sed 's/^/| /' conftest.$ac_ext >&5
22928
Martin v. Löwiseba40652007-08-30 20:10:57 +000022929 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022930fi
22931
Martin v. Löwiseba40652007-08-30 20:10:57 +000022932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22933fi
22934
22935{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
22936echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022937if test "$ac_cv_stat_tv_nsec2" = yes
22938then
22939
22940cat >>confdefs.h <<\_ACEOF
22941#define HAVE_STAT_TV_NSEC2 1
22942_ACEOF
22943
22944fi
22945
Jack Jansen666b1e72001-10-31 12:11:48 +000022946# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000022947{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
22948echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022949if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
22950 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022951else
Martin v. Löwis11437992002-04-12 09:54:03 +000022952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022953/* confdefs.h. */
22954_ACEOF
22955cat confdefs.h >>conftest.$ac_ext
22956cat >>conftest.$ac_ext <<_ACEOF
22957/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022958#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022959int
22960main ()
22961{
Jack Jansen666b1e72001-10-31 12:11:48 +000022962
22963 int rtn;
22964 rtn = mvwdelch(0,0,0);
22965
Martin v. Löwis11437992002-04-12 09:54:03 +000022966 ;
22967 return 0;
22968}
22969_ACEOF
22970rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022971if { (ac_try="$ac_compile"
22972case "(($ac_try" in
22973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22974 *) ac_try_echo=$ac_try;;
22975esac
22976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022979 grep -v '^ *+' conftest.er1 >conftest.err
22980 rm -f conftest.er1
22981 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022983 (exit $ac_status); } && {
22984 test -z "$ac_c_werror_flag" ||
22985 test ! -s conftest.err
22986 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022987 ac_cv_mvwdelch_is_expression=yes
22988else
Martin v. Löwis11437992002-04-12 09:54:03 +000022989 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022990sed 's/^/| /' conftest.$ac_ext >&5
22991
Martin v. Löwiseba40652007-08-30 20:10:57 +000022992 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000022993fi
22994
Martin v. Löwiseba40652007-08-30 20:10:57 +000022995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22996fi
22997
22998{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
22999echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023000
23001if test "$ac_cv_mvwdelch_is_expression" = yes
23002then
Martin v. Löwis11437992002-04-12 09:54:03 +000023003
23004cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023005#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023006_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023007
23008fi
23009
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23011echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023012if test "${ac_cv_window_has_flags+set}" = set; then
23013 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023014else
Martin v. Löwis11437992002-04-12 09:54:03 +000023015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023016/* confdefs.h. */
23017_ACEOF
23018cat confdefs.h >>conftest.$ac_ext
23019cat >>conftest.$ac_ext <<_ACEOF
23020/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023021#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023022int
23023main ()
23024{
Jack Jansen666b1e72001-10-31 12:11:48 +000023025
23026 WINDOW *w;
23027 w->_flags = 0;
23028
Martin v. Löwis11437992002-04-12 09:54:03 +000023029 ;
23030 return 0;
23031}
23032_ACEOF
23033rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023034if { (ac_try="$ac_compile"
23035case "(($ac_try" in
23036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23037 *) ac_try_echo=$ac_try;;
23038esac
23039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023042 grep -v '^ *+' conftest.er1 >conftest.err
23043 rm -f conftest.er1
23044 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023046 (exit $ac_status); } && {
23047 test -z "$ac_c_werror_flag" ||
23048 test ! -s conftest.err
23049 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023050 ac_cv_window_has_flags=yes
23051else
Martin v. Löwis11437992002-04-12 09:54:03 +000023052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023053sed 's/^/| /' conftest.$ac_ext >&5
23054
Martin v. Löwiseba40652007-08-30 20:10:57 +000023055 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023056fi
23057
Martin v. Löwiseba40652007-08-30 20:10:57 +000023058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23059fi
23060
23061{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23062echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023063
Jack Jansen666b1e72001-10-31 12:11:48 +000023064
23065if test "$ac_cv_window_has_flags" = yes
23066then
Martin v. Löwis11437992002-04-12 09:54:03 +000023067
23068cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023069#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023070_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023071
23072fi
23073
Martin v. Löwiseba40652007-08-30 20:10:57 +000023074{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23075echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023076cat >conftest.$ac_ext <<_ACEOF
23077/* confdefs.h. */
23078_ACEOF
23079cat confdefs.h >>conftest.$ac_ext
23080cat >>conftest.$ac_ext <<_ACEOF
23081/* end confdefs.h. */
23082#include <curses.h>
23083int
23084main ()
23085{
23086void *x=is_term_resized
23087 ;
23088 return 0;
23089}
23090_ACEOF
23091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023092if { (ac_try="$ac_compile"
23093case "(($ac_try" in
23094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23095 *) ac_try_echo=$ac_try;;
23096esac
23097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23098 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023099 ac_status=$?
23100 grep -v '^ *+' conftest.er1 >conftest.err
23101 rm -f conftest.er1
23102 cat conftest.err >&5
23103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023104 (exit $ac_status); } && {
23105 test -z "$ac_c_werror_flag" ||
23106 test ! -s conftest.err
23107 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023108
23109cat >>confdefs.h <<\_ACEOF
23110#define HAVE_CURSES_IS_TERM_RESIZED 1
23111_ACEOF
23112
Martin v. Löwiseba40652007-08-30 20:10:57 +000023113 { echo "$as_me:$LINENO: result: yes" >&5
23114echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023115else
23116 echo "$as_me: failed program was:" >&5
23117sed 's/^/| /' conftest.$ac_ext >&5
23118
Martin v. Löwiseba40652007-08-30 20:10:57 +000023119 { echo "$as_me:$LINENO: result: no" >&5
23120echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023121
23122fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023123
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23125
23126{ echo "$as_me:$LINENO: checking for resize_term" >&5
23127echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023128cat >conftest.$ac_ext <<_ACEOF
23129/* confdefs.h. */
23130_ACEOF
23131cat confdefs.h >>conftest.$ac_ext
23132cat >>conftest.$ac_ext <<_ACEOF
23133/* end confdefs.h. */
23134#include <curses.h>
23135int
23136main ()
23137{
23138void *x=resize_term
23139 ;
23140 return 0;
23141}
23142_ACEOF
23143rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144if { (ac_try="$ac_compile"
23145case "(($ac_try" in
23146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23147 *) ac_try_echo=$ac_try;;
23148esac
23149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23150 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023151 ac_status=$?
23152 grep -v '^ *+' conftest.er1 >conftest.err
23153 rm -f conftest.er1
23154 cat conftest.err >&5
23155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023156 (exit $ac_status); } && {
23157 test -z "$ac_c_werror_flag" ||
23158 test ! -s conftest.err
23159 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023160
23161cat >>confdefs.h <<\_ACEOF
23162#define HAVE_CURSES_RESIZE_TERM 1
23163_ACEOF
23164
Martin v. Löwiseba40652007-08-30 20:10:57 +000023165 { echo "$as_me:$LINENO: result: yes" >&5
23166echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023167else
23168 echo "$as_me: failed program was:" >&5
23169sed 's/^/| /' conftest.$ac_ext >&5
23170
Martin v. Löwiseba40652007-08-30 20:10:57 +000023171 { echo "$as_me:$LINENO: result: no" >&5
23172echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023173
23174fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023175
Martin v. Löwiseba40652007-08-30 20:10:57 +000023176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23177
23178{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23179echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023180cat >conftest.$ac_ext <<_ACEOF
23181/* confdefs.h. */
23182_ACEOF
23183cat confdefs.h >>conftest.$ac_ext
23184cat >>conftest.$ac_ext <<_ACEOF
23185/* end confdefs.h. */
23186#include <curses.h>
23187int
23188main ()
23189{
23190void *x=resizeterm
23191 ;
23192 return 0;
23193}
23194_ACEOF
23195rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023196if { (ac_try="$ac_compile"
23197case "(($ac_try" in
23198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23199 *) ac_try_echo=$ac_try;;
23200esac
23201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23202 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023203 ac_status=$?
23204 grep -v '^ *+' conftest.er1 >conftest.err
23205 rm -f conftest.er1
23206 cat conftest.err >&5
23207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023208 (exit $ac_status); } && {
23209 test -z "$ac_c_werror_flag" ||
23210 test ! -s conftest.err
23211 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023212
23213cat >>confdefs.h <<\_ACEOF
23214#define HAVE_CURSES_RESIZETERM 1
23215_ACEOF
23216
Martin v. Löwiseba40652007-08-30 20:10:57 +000023217 { echo "$as_me:$LINENO: result: yes" >&5
23218echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023219else
23220 echo "$as_me: failed program was:" >&5
23221sed 's/^/| /' conftest.$ac_ext >&5
23222
Martin v. Löwiseba40652007-08-30 20:10:57 +000023223 { echo "$as_me:$LINENO: result: no" >&5
23224echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023225
23226fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023227
Martin v. Löwiseba40652007-08-30 20:10:57 +000023228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23229
23230{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23231echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023232
23233if test -r /dev/ptmx
23234then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023235 { echo "$as_me:$LINENO: result: yes" >&5
23236echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023237
23238cat >>confdefs.h <<\_ACEOF
23239#define HAVE_DEV_PTMX 1
23240_ACEOF
23241
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023242else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023243 { echo "$as_me:$LINENO: result: no" >&5
23244echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023245fi
23246
Martin v. Löwiseba40652007-08-30 20:10:57 +000023247{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23248echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023249
23250if test -r /dev/ptc
23251then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252 { echo "$as_me:$LINENO: result: yes" >&5
23253echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023254
23255cat >>confdefs.h <<\_ACEOF
23256#define HAVE_DEV_PTC 1
23257_ACEOF
23258
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023259else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023260 { echo "$as_me:$LINENO: result: no" >&5
23261echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023262fi
23263
Martin v. Löwiseba40652007-08-30 20:10:57 +000023264{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23265echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023266if test "$cross_compiling" = yes; then
23267 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23268See \`config.log' for more details." >&5
23269echo "$as_me: error: cannot run test program while cross compiling
23270See \`config.log' for more details." >&2;}
23271 { (exit 1); exit 1; }; }
23272else
23273 cat >conftest.$ac_ext <<_ACEOF
23274/* confdefs.h. */
23275_ACEOF
23276cat confdefs.h >>conftest.$ac_ext
23277cat >>conftest.$ac_ext <<_ACEOF
23278/* end confdefs.h. */
23279#include <stdio.h>
23280#include <stddef.h>
23281#include <string.h>
23282
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023283#ifdef HAVE_SYS_TYPES_H
23284#include <sys/types.h>
23285#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023286
23287#ifdef HAVE_SSIZE_T
23288typedef ssize_t Py_ssize_t;
23289#elif SIZEOF_VOID_P == SIZEOF_LONG
23290typedef long Py_ssize_t;
23291#else
23292typedef int Py_ssize_t;
23293#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023294
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023295int main()
23296{
23297 char buffer[256];
23298
Brett Cannon09d12362006-05-11 05:11:33 +000023299 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23300 return 1;
23301
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023302 if (strcmp(buffer, "123"))
23303 return 1;
23304
23305 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23306 return 1;
23307
23308 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023309 return 1;
23310
23311 return 0;
23312}
23313_ACEOF
23314rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023315if { (ac_try="$ac_link"
23316case "(($ac_try" in
23317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23318 *) ac_try_echo=$ac_try;;
23319esac
23320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23321 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023322 ac_status=$?
23323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023325 { (case "(($ac_try" in
23326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23327 *) ac_try_echo=$ac_try;;
23328esac
23329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23330 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023331 ac_status=$?
23332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23333 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023334 { echo "$as_me:$LINENO: result: yes" >&5
23335echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023336
23337cat >>confdefs.h <<\_ACEOF
23338#define PY_FORMAT_SIZE_T "z"
23339_ACEOF
23340
23341else
23342 echo "$as_me: program exited with status $ac_status" >&5
23343echo "$as_me: failed program was:" >&5
23344sed 's/^/| /' conftest.$ac_ext >&5
23345
23346( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023347{ echo "$as_me:$LINENO: result: no" >&5
23348echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023350rm -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 +000023351fi
23352
Martin v. Löwiseba40652007-08-30 20:10:57 +000023353
23354
23355{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23356echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023357if test "${ac_cv_type_socklen_t+set}" = set; then
23358 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023359else
Martin v. Löwis11437992002-04-12 09:54:03 +000023360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023361/* confdefs.h. */
23362_ACEOF
23363cat confdefs.h >>conftest.$ac_ext
23364cat >>conftest.$ac_ext <<_ACEOF
23365/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023366
23367#ifdef HAVE_SYS_TYPES_H
23368#include <sys/types.h>
23369#endif
23370#ifdef HAVE_SYS_SOCKET_H
23371#include <sys/socket.h>
23372#endif
23373
23374
Martin v. Löwiseba40652007-08-30 20:10:57 +000023375typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023376int
23377main ()
23378{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023379if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023380 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023381if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023382 return 0;
23383 ;
23384 return 0;
23385}
23386_ACEOF
23387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023388if { (ac_try="$ac_compile"
23389case "(($ac_try" in
23390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23391 *) ac_try_echo=$ac_try;;
23392esac
23393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023396 grep -v '^ *+' conftest.er1 >conftest.err
23397 rm -f conftest.er1
23398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023400 (exit $ac_status); } && {
23401 test -z "$ac_c_werror_flag" ||
23402 test ! -s conftest.err
23403 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023404 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023405else
Martin v. Löwis11437992002-04-12 09:54:03 +000023406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023407sed 's/^/| /' conftest.$ac_ext >&5
23408
Martin v. Löwiseba40652007-08-30 20:10:57 +000023409 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023411
23412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023414{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23415echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023416if test $ac_cv_type_socklen_t = yes; then
23417 :
23418else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023419
Martin v. Löwis01c04012002-11-11 14:58:44 +000023420cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023421#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023422_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023423
23424fi
23425
Michael W. Hudson54241132001-12-07 15:38:26 +000023426
Michael W. Hudson54241132001-12-07 15:38:26 +000023427
23428
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023429for h in `(cd $srcdir;echo Python/thread_*.h)`
23430do
23431 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23432done
23433
Michael W. Hudson54241132001-12-07 15:38:26 +000023434
Neal Norwitzd24499d2005-12-18 21:36:39 +000023435SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023436{ echo "$as_me:$LINENO: checking for build directories" >&5
23437echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023438for dir in $SRCDIRS; do
23439 if test ! -d $dir; then
23440 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023441 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023442done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023443{ echo "$as_me:$LINENO: result: done" >&5
23444echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023445
Guido van Rossum627b2d71993-12-24 10:39:16 +000023446# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023447ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023448
Martin v. Löwis11437992002-04-12 09:54:03 +000023449cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023450# This file is a shell script that caches the results of configure
23451# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023452# scripts and configure runs, see configure's option --config-cache.
23453# It is not useful on other systems. If it contains results you don't
23454# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023455#
Martin v. Löwis11437992002-04-12 09:54:03 +000023456# config.status only pays attention to the cache file if you give it
23457# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023458#
Skip Montanaro6dead952003-09-25 14:50:04 +000023459# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023460# loading this file, other *unset* `ac_cv_foo' will be assigned the
23461# following values.
23462
23463_ACEOF
23464
Guido van Rossumf78abae1997-01-21 22:02:36 +000023465# The following way of writing the cache mishandles newlines in values,
23466# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023467# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023468# Ultrix sh set writes to stderr and can't be redirected directly,
23469# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023470(
23471 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23472 eval ac_val=\$$ac_var
23473 case $ac_val in #(
23474 *${as_nl}*)
23475 case $ac_var in #(
23476 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23477echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23478 esac
23479 case $ac_var in #(
23480 _ | IFS | as_nl) ;; #(
23481 *) $as_unset $ac_var ;;
23482 esac ;;
23483 esac
23484 done
23485
Martin v. Löwis11437992002-04-12 09:54:03 +000023486 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023487 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23488 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023489 # `set' does not quote correctly, so add quotes (double-quote
23490 # substitution turns \\\\ into \\, and sed turns \\ into \).
23491 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023492 "s/'/'\\\\''/g;
23493 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023494 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023495 *)
23496 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023497 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023498 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023499 esac |
23500 sort
23501) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023502 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023503 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023504 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023505 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023506 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23507 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023508 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23509 :end' >>confcache
23510if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23511 if test -w "$cache_file"; then
23512 test "x$cache_file" != "x/dev/null" &&
23513 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23514echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023515 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023516 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023517 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23518echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023519 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023520fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023521rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023522
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023523test "x$prefix" = xNONE && prefix=$ac_default_prefix
23524# Let make expand exec_prefix.
23525test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000023526
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023527DEFS=-DHAVE_CONFIG_H
23528
Skip Montanaro6dead952003-09-25 14:50:04 +000023529ac_libobjs=
23530ac_ltlibobjs=
23531for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23532 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023533 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23534 ac_i=`echo "$ac_i" | sed "$ac_script"`
23535 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23536 # will be set to the directory where LIBOBJS objects are built.
23537 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23538 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000023539done
23540LIBOBJS=$ac_libobjs
23541
23542LTLIBOBJS=$ac_ltlibobjs
23543
23544
Martin v. Löwis11437992002-04-12 09:54:03 +000023545
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023546: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000023547ac_clean_files_save=$ac_clean_files
23548ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23549{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
23550echo "$as_me: creating $CONFIG_STATUS" >&6;}
23551cat >$CONFIG_STATUS <<_ACEOF
23552#! $SHELL
23553# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023554# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023555# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000023556# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000023557
Martin v. Löwis11437992002-04-12 09:54:03 +000023558debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000023559ac_cs_recheck=false
23560ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023561SHELL=\${CONFIG_SHELL-$SHELL}
23562_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000023563
Martin v. Löwis11437992002-04-12 09:54:03 +000023564cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023565## --------------------- ##
23566## M4sh Initialization. ##
23567## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000023568
Martin v. Löwiseba40652007-08-30 20:10:57 +000023569# Be more Bourne compatible
23570DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023571if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23572 emulate sh
23573 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023574 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23575 # is contrary to our usage. Disable this feature.
23576 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023577 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000023578else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023579 case `(set -o) 2>/dev/null` in
23580 *posix*) set -o posix ;;
23581esac
23582
Martin v. Löwis11437992002-04-12 09:54:03 +000023583fi
Michael W. Hudson54241132001-12-07 15:38:26 +000023584
Skip Montanaro6dead952003-09-25 14:50:04 +000023585
Martin v. Löwis11437992002-04-12 09:54:03 +000023586
23587
Martin v. Löwiseba40652007-08-30 20:10:57 +000023588# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000023589# Avoid depending upon Character Ranges.
23590as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23591as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23592as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23593as_cr_digits='0123456789'
23594as_cr_alnum=$as_cr_Letters$as_cr_digits
23595
23596# The user is always right.
23597if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023598 echo "#! /bin/sh" >conf$$.sh
23599 echo "exit 0" >>conf$$.sh
23600 chmod +x conf$$.sh
23601 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023602 PATH_SEPARATOR=';'
23603 else
23604 PATH_SEPARATOR=:
23605 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023606 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023607fi
23608
Martin v. Löwiseba40652007-08-30 20:10:57 +000023609# Support unset when possible.
23610if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
23611 as_unset=unset
23612else
23613 as_unset=false
23614fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023615
Martin v. Löwiseba40652007-08-30 20:10:57 +000023616
23617# IFS
23618# We need space, tab and new line, in precisely that order. Quoting is
23619# there to prevent editors from complaining about space-tab.
23620# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23621# splitting by setting IFS to empty value.)
23622as_nl='
23623'
23624IFS=" "" $as_nl"
23625
23626# Find who we are. Look in the path if we contain no directory separator.
23627case $0 in
23628 *[\\/]* ) as_myself=$0 ;;
23629 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000023630for as_dir in $PATH
23631do
23632 IFS=$as_save_IFS
23633 test -z "$as_dir" && as_dir=.
23634 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23635done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023636IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000023637
Martin v. Löwiseba40652007-08-30 20:10:57 +000023638 ;;
23639esac
23640# We did not find ourselves, most probably we were run as `sh COMMAND'
23641# in which case we are not to be found in the path.
23642if test "x$as_myself" = x; then
23643 as_myself=$0
23644fi
23645if test ! -f "$as_myself"; then
23646 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23647 { (exit 1); exit 1; }
23648fi
23649
23650# Work around bugs in pre-3.0 UWIN ksh.
23651for as_var in ENV MAIL MAILPATH
23652do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23653done
23654PS1='$ '
23655PS2='> '
23656PS4='+ '
23657
23658# NLS nuisances.
23659for as_var in \
23660 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23661 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23662 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000023663do
Martin v. Löwiseba40652007-08-30 20:10:57 +000023664 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
23665 eval $as_var=C; export $as_var
23666 else
23667 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23668 fi
23669done
23670
23671# Required to use basename.
23672if expr a : '\(a\)' >/dev/null 2>&1 &&
23673 test "X`expr 00001 : '.*\(...\)'`" = X001; then
23674 as_expr=expr
23675else
23676 as_expr=false
23677fi
23678
23679if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
23680 as_basename=basename
23681else
23682 as_basename=false
23683fi
23684
23685
23686# Name of the executable.
23687as_me=`$as_basename -- "$0" ||
23688$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23689 X"$0" : 'X\(//\)$' \| \
23690 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
23691echo X/"$0" |
23692 sed '/^.*\/\([^/][^/]*\)\/*$/{
23693 s//\1/
23694 q
23695 }
23696 /^X\/\(\/\/\)$/{
23697 s//\1/
23698 q
23699 }
23700 /^X\/\(\/\).*/{
23701 s//\1/
23702 q
23703 }
23704 s/.*/./; q'`
23705
23706# CDPATH.
23707$as_unset CDPATH
23708
23709
23710
Martin v. Löwis11437992002-04-12 09:54:03 +000023711 as_lineno_1=$LINENO
23712 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000023713 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023714 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000023715
Martin v. Löwis11437992002-04-12 09:54:03 +000023716 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23717 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718 # line-number line after each line using $LINENO; the second 'sed'
23719 # does the real work. The second script uses 'N' to pair each
23720 # line-number line with the line containing $LINENO, and appends
23721 # trailing '-' during substitution so that $LINENO is not a special
23722 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000023723 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023724 # scripts with optimization help from Paolo Bonzini. Blame Lee
23725 # E. McMahon (1931-1989) for sed's syntax. :-)
23726 sed -n '
23727 p
23728 /[$]LINENO/=
23729 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000023730 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731 s/[$]LINENO.*/&-/
23732 t lineno
23733 b
23734 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000023735 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000023736 :loop
23737 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000023738 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000023739 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000023740 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000023741 chmod +x "$as_me.lineno" ||
23742 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023743 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023744
Martin v. Löwis11437992002-04-12 09:54:03 +000023745 # Don't try to exec as it changes $[0], causing all sort of problems
23746 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000023747 # original and so on. Autoconf is especially sensitive to this).
23748 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000023749 # Exit status is that of the last command.
23750 exit
23751}
23752
23753
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23755 as_dirname=dirname
23756else
23757 as_dirname=false
23758fi
23759
23760ECHO_C= ECHO_N= ECHO_T=
23761case `echo -n x` in
23762-n*)
23763 case `echo 'x\c'` in
23764 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23765 *) ECHO_C='\c';;
23766 esac;;
23767*)
23768 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000023769esac
23770
Martin v. Löwiseba40652007-08-30 20:10:57 +000023771if expr a : '\(a\)' >/dev/null 2>&1 &&
23772 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023773 as_expr=expr
23774else
23775 as_expr=false
23776fi
23777
23778rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000023779if test -d conf$$.dir; then
23780 rm -f conf$$.dir/conf$$.file
23781else
23782 rm -f conf$$.dir
23783 mkdir conf$$.dir
23784fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023785echo >conf$$.file
23786if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023787 as_ln_s='ln -s'
23788 # ... but there are two gotchas:
23789 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23790 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23791 # In both cases, we have to default to `cp -p'.
23792 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023793 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000023794elif ln conf$$.file conf$$ 2>/dev/null; then
23795 as_ln_s=ln
23796else
23797 as_ln_s='cp -p'
23798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023799rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23800rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000023801
Skip Montanaro6dead952003-09-25 14:50:04 +000023802if mkdir -p . 2>/dev/null; then
23803 as_mkdir_p=:
23804else
Skip Montanarof0d5f792004-08-15 14:08:23 +000023805 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000023806 as_mkdir_p=false
23807fi
23808
Martin v. Löwiseba40652007-08-30 20:10:57 +000023809if test -x / >/dev/null 2>&1; then
23810 as_test_x='test -x'
23811else
23812 if ls -dL / >/dev/null 2>&1; then
23813 as_ls_L_option=L
23814 else
23815 as_ls_L_option=
23816 fi
23817 as_test_x='
23818 eval sh -c '\''
23819 if test -d "$1"; then
23820 test -d "$1/.";
23821 else
23822 case $1 in
23823 -*)set "./$1";;
23824 esac;
23825 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23826 ???[sx]*):;;*)false;;esac;fi
23827 '\'' sh
23828 '
23829fi
23830as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000023831
23832# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023833as_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 +000023834
23835# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023836as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000023837
23838
Martin v. Löwis11437992002-04-12 09:54:03 +000023839exec 6>&1
23840
Martin v. Löwiseba40652007-08-30 20:10:57 +000023841# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000023842# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000023843# values after options handling.
23844ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000023845This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000023846generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000023847
23848 CONFIG_FILES = $CONFIG_FILES
23849 CONFIG_HEADERS = $CONFIG_HEADERS
23850 CONFIG_LINKS = $CONFIG_LINKS
23851 CONFIG_COMMANDS = $CONFIG_COMMANDS
23852 $ $0 $@
23853
Martin v. Löwiseba40652007-08-30 20:10:57 +000023854on `(hostname || uname -n) 2>/dev/null | sed 1q`
23855"
23856
Martin v. Löwis11437992002-04-12 09:54:03 +000023857_ACEOF
23858
Martin v. Löwiseba40652007-08-30 20:10:57 +000023859cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023860# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023861config_files="$ac_config_files"
23862config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000023863
Martin v. Löwiseba40652007-08-30 20:10:57 +000023864_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023865
23866cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023867ac_cs_usage="\
23868\`$as_me' instantiates files from templates according to the
23869current configuration.
23870
23871Usage: $0 [OPTIONS] [FILE]...
23872
23873 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000023874 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000023875 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000023876 -d, --debug don't remove temporary files
23877 --recheck update $as_me by reconfiguring in the same conditions
23878 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023879 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023880 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023881 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023882
23883Configuration files:
23884$config_files
23885
23886Configuration headers:
23887$config_headers
23888
23889Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000023890
Martin v. Löwiseba40652007-08-30 20:10:57 +000023891_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023892cat >>$CONFIG_STATUS <<_ACEOF
23893ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000023894python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000023895configured by $0, generated by GNU Autoconf 2.61,
23896 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000023897
Martin v. Löwiseba40652007-08-30 20:10:57 +000023898Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000023899This config.status script is free software; the Free Software Foundation
23900gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000023901
23902ac_pwd='$ac_pwd'
23903srcdir='$srcdir'
23904INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000023905_ACEOF
23906
23907cat >>$CONFIG_STATUS <<\_ACEOF
23908# If no file are specified by the user, then we need to provide default
23909# value. By we need to know if files were specified by the user.
23910ac_need_defaults=:
23911while test $# != 0
23912do
23913 case $1 in
23914 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000023915 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23916 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023917 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000023918 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023919 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023920 ac_option=$1
23921 ac_optarg=$2
23922 ac_shift=shift
23923 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023924 esac
23925
Skip Montanaro6dead952003-09-25 14:50:04 +000023926 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000023927 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000023928 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23929 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023930 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23931 echo "$ac_cs_version"; exit ;;
23932 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000023933 debug=: ;;
23934 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000023935 $ac_shift
23936 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023937 ac_need_defaults=false;;
23938 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000023939 $ac_shift
23940 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023941 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023942 --he | --h)
23943 # Conflict between --help and --header
23944 { echo "$as_me: error: ambiguous option: $1
23945Try \`$0 --help' for more information." >&2
23946 { (exit 1); exit 1; }; };;
23947 --help | --hel | -h )
23948 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000023949 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23950 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23951 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023952
23953 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023954 -*) { echo "$as_me: error: unrecognized option: $1
23955Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023956 { (exit 1); exit 1; }; } ;;
23957
Martin v. Löwiseba40652007-08-30 20:10:57 +000023958 *) ac_config_targets="$ac_config_targets $1"
23959 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023960
23961 esac
23962 shift
23963done
23964
Skip Montanaro6dead952003-09-25 14:50:04 +000023965ac_configure_extra_args=
23966
23967if $ac_cs_silent; then
23968 exec 6>/dev/null
23969 ac_configure_extra_args="$ac_configure_extra_args --silent"
23970fi
23971
23972_ACEOF
23973cat >>$CONFIG_STATUS <<_ACEOF
23974if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023975 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23976 CONFIG_SHELL=$SHELL
23977 export CONFIG_SHELL
23978 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000023979fi
23980
Martin v. Löwis11437992002-04-12 09:54:03 +000023981_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023982cat >>$CONFIG_STATUS <<\_ACEOF
23983exec 5>>config.log
23984{
23985 echo
23986 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23987## Running $as_me. ##
23988_ASBOX
23989 echo "$ac_log"
23990} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023991
Martin v. Löwiseba40652007-08-30 20:10:57 +000023992_ACEOF
23993cat >>$CONFIG_STATUS <<_ACEOF
23994_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023995
23996cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023997
23998# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000023999for ac_config_target in $ac_config_targets
24000do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024001 case $ac_config_target in
24002 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24003 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24004 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24005 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24006 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24007 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24008
Martin v. Löwis11437992002-04-12 09:54:03 +000024009 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24010echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24011 { (exit 1); exit 1; }; };;
24012 esac
24013done
24014
Martin v. Löwiseba40652007-08-30 20:10:57 +000024015
Martin v. Löwis11437992002-04-12 09:54:03 +000024016# If the user did not use the arguments to specify the items to instantiate,
24017# then the envvar interface is used. Set only those that are not.
24018# We use the long form for the default assignment because of an extremely
24019# bizarre bug on SunOS 4.1.3.
24020if $ac_need_defaults; then
24021 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24022 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24023fi
24024
Skip Montanaro6dead952003-09-25 14:50:04 +000024025# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024026# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024027# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024028# Hook for its removal unless debugging.
24029# Note that there is a small window in which the directory will not be cleaned:
24030# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024031$debug ||
24032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024033 tmp=
24034 trap 'exit_status=$?
24035 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24036' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024037 trap '{ (exit 1); exit 1; }' 1 2 13 15
24038}
Martin v. Löwis11437992002-04-12 09:54:03 +000024039# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024040
Martin v. Löwis11437992002-04-12 09:54:03 +000024041{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024042 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024043 test -n "$tmp" && test -d "$tmp"
24044} ||
24045{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024046 tmp=./conf$$-$RANDOM
24047 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024048} ||
24049{
Skip Montanaro6dead952003-09-25 14:50:04 +000024050 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024051 { (exit 1); exit 1; }
24052}
24053
Martin v. Löwis11437992002-04-12 09:54:03 +000024054#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024055# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024056#
24057
24058# No need to generate the scripts if there are no CONFIG_FILES.
24059# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024060if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024061
24062_ACEOF
24063
Martin v. Löwiseba40652007-08-30 20:10:57 +000024064
24065
24066ac_delim='%!_!# '
24067for ac_last_try in false false false false false :; do
24068 cat >conf$$subs.sed <<_ACEOF
24069SHELL!$SHELL$ac_delim
24070PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24071PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24072PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24073PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24074PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24075PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24076exec_prefix!$exec_prefix$ac_delim
24077prefix!$prefix$ac_delim
24078program_transform_name!$program_transform_name$ac_delim
24079bindir!$bindir$ac_delim
24080sbindir!$sbindir$ac_delim
24081libexecdir!$libexecdir$ac_delim
24082datarootdir!$datarootdir$ac_delim
24083datadir!$datadir$ac_delim
24084sysconfdir!$sysconfdir$ac_delim
24085sharedstatedir!$sharedstatedir$ac_delim
24086localstatedir!$localstatedir$ac_delim
24087includedir!$includedir$ac_delim
24088oldincludedir!$oldincludedir$ac_delim
24089docdir!$docdir$ac_delim
24090infodir!$infodir$ac_delim
24091htmldir!$htmldir$ac_delim
24092dvidir!$dvidir$ac_delim
24093pdfdir!$pdfdir$ac_delim
24094psdir!$psdir$ac_delim
24095libdir!$libdir$ac_delim
24096localedir!$localedir$ac_delim
24097mandir!$mandir$ac_delim
24098DEFS!$DEFS$ac_delim
24099ECHO_C!$ECHO_C$ac_delim
24100ECHO_N!$ECHO_N$ac_delim
24101ECHO_T!$ECHO_T$ac_delim
24102LIBS!$LIBS$ac_delim
24103build_alias!$build_alias$ac_delim
24104host_alias!$host_alias$ac_delim
24105target_alias!$target_alias$ac_delim
24106VERSION!$VERSION$ac_delim
24107SOVERSION!$SOVERSION$ac_delim
24108CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24109UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24110PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24111PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24112PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24113PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24114FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24115FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24116FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24117FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24118FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24119MACHDEP!$MACHDEP$ac_delim
24120SGI_ABI!$SGI_ABI$ac_delim
24121EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24122EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24123CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24124EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24125CC!$CC$ac_delim
24126CFLAGS!$CFLAGS$ac_delim
24127LDFLAGS!$LDFLAGS$ac_delim
24128CPPFLAGS!$CPPFLAGS$ac_delim
24129ac_ct_CC!$ac_ct_CC$ac_delim
24130EXEEXT!$EXEEXT$ac_delim
24131OBJEXT!$OBJEXT$ac_delim
24132CXX!$CXX$ac_delim
24133MAINCC!$MAINCC$ac_delim
24134CPP!$CPP$ac_delim
24135GREP!$GREP$ac_delim
24136EGREP!$EGREP$ac_delim
24137BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24138LIBRARY!$LIBRARY$ac_delim
24139LDLIBRARY!$LDLIBRARY$ac_delim
24140DLLLIBRARY!$DLLLIBRARY$ac_delim
24141BLDLIBRARY!$BLDLIBRARY$ac_delim
24142LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24143INSTSONAME!$INSTSONAME$ac_delim
24144RUNSHARED!$RUNSHARED$ac_delim
24145LINKCC!$LINKCC$ac_delim
24146RANLIB!$RANLIB$ac_delim
24147AR!$AR$ac_delim
24148SVNVERSION!$SVNVERSION$ac_delim
24149INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24150INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24151INSTALL_DATA!$INSTALL_DATA$ac_delim
24152LN!$LN$ac_delim
24153OPT!$OPT$ac_delim
24154BASECFLAGS!$BASECFLAGS$ac_delim
24155OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24156LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24157SO!$SO$ac_delim
24158LDSHARED!$LDSHARED$ac_delim
24159BLDSHARED!$BLDSHARED$ac_delim
24160CCSHARED!$CCSHARED$ac_delim
24161LINKFORSHARED!$LINKFORSHARED$ac_delim
24162CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24163SHLIBS!$SHLIBS$ac_delim
24164USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24165SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24166_ACEOF
24167
24168 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24169 break
24170 elif $ac_last_try; then
24171 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24172echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24173 { (exit 1); exit 1; }; }
24174 else
24175 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024176 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024177done
24178
24179ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24180if test -n "$ac_eof"; then
24181 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24182 ac_eof=`expr $ac_eof + 1`
24183fi
24184
24185cat >>$CONFIG_STATUS <<_ACEOF
24186cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24187/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24188_ACEOF
24189sed '
24190s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24191s/^/s,@/; s/!/@,|#_!!_#|/
24192:n
24193t n
24194s/'"$ac_delim"'$/,g/; t
24195s/$/\\/; p
24196N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24197' >>$CONFIG_STATUS <conf$$subs.sed
24198rm -f conf$$subs.sed
24199cat >>$CONFIG_STATUS <<_ACEOF
24200CEOF$ac_eof
24201_ACEOF
24202
24203
24204ac_delim='%!_!# '
24205for ac_last_try in false false false false false :; do
24206 cat >conf$$subs.sed <<_ACEOF
24207USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24208LDLAST!$LDLAST$ac_delim
24209THREADOBJ!$THREADOBJ$ac_delim
24210DLINCLDIR!$DLINCLDIR$ac_delim
24211DYNLOADFILE!$DYNLOADFILE$ac_delim
24212MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24213TRUE!$TRUE$ac_delim
24214LIBOBJS!$LIBOBJS$ac_delim
24215HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24216HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24217HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24218HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24219HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24220LIBM!$LIBM$ac_delim
24221LIBC!$LIBC$ac_delim
24222UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24223THREADHEADERS!$THREADHEADERS$ac_delim
24224SRCDIRS!$SRCDIRS$ac_delim
24225LTLIBOBJS!$LTLIBOBJS$ac_delim
24226_ACEOF
24227
24228 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24229 break
24230 elif $ac_last_try; then
24231 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24232echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24233 { (exit 1); exit 1; }; }
24234 else
24235 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24236 fi
24237done
24238
24239ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24240if test -n "$ac_eof"; then
24241 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24242 ac_eof=`expr $ac_eof + 1`
24243fi
24244
24245cat >>$CONFIG_STATUS <<_ACEOF
24246cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24247/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24248_ACEOF
24249sed '
24250s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24251s/^/s,@/; s/!/@,|#_!!_#|/
24252:n
24253t n
24254s/'"$ac_delim"'$/,g/; t
24255s/$/\\/; p
24256N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24257' >>$CONFIG_STATUS <conf$$subs.sed
24258rm -f conf$$subs.sed
24259cat >>$CONFIG_STATUS <<_ACEOF
24260:end
24261s/|#_!!_#|//g
24262CEOF$ac_eof
24263_ACEOF
24264
24265
24266# VPATH may cause trouble with some makes, so we remove $(srcdir),
24267# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24268# trailing colons and then remove the whole line if VPATH becomes empty
24269# (actually we leave an empty line to preserve line numbers).
24270if test "x$srcdir" = x.; then
24271 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24272s/:*\$(srcdir):*/:/
24273s/:*\${srcdir}:*/:/
24274s/:*@srcdir@:*/:/
24275s/^\([^=]*=[ ]*\):*/\1/
24276s/:*$//
24277s/^[^=]*=[ ]*$//
24278}'
24279fi
24280
24281cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024282fi # test -n "$CONFIG_FILES"
24283
Martin v. Löwiseba40652007-08-30 20:10:57 +000024284
24285for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24286do
24287 case $ac_tag in
24288 :[FHLC]) ac_mode=$ac_tag; continue;;
24289 esac
24290 case $ac_mode$ac_tag in
24291 :[FHL]*:*);;
24292 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24293echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24294 { (exit 1); exit 1; }; };;
24295 :[FH]-) ac_tag=-:-;;
24296 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24297 esac
24298 ac_save_IFS=$IFS
24299 IFS=:
24300 set x $ac_tag
24301 IFS=$ac_save_IFS
24302 shift
24303 ac_file=$1
24304 shift
24305
24306 case $ac_mode in
24307 :L) ac_source=$1;;
24308 :[FH])
24309 ac_file_inputs=
24310 for ac_f
24311 do
24312 case $ac_f in
24313 -) ac_f="$tmp/stdin";;
24314 *) # Look for the file first in the build tree, then in the source tree
24315 # (if the path is not absolute). The absolute path cannot be DOS-style,
24316 # because $ac_f cannot contain `:'.
24317 test -f "$ac_f" ||
24318 case $ac_f in
24319 [\\/$]*) false;;
24320 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24321 esac ||
24322 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24323echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24324 { (exit 1); exit 1; }; };;
24325 esac
24326 ac_file_inputs="$ac_file_inputs $ac_f"
24327 done
24328
24329 # Let's still pretend it is `configure' which instantiates (i.e., don't
24330 # use $as_me), people would be surprised to read:
24331 # /* config.h. Generated by config.status. */
24332 configure_input="Generated from "`IFS=:
24333 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24334 if test x"$ac_file" != x-; then
24335 configure_input="$ac_file. $configure_input"
24336 { echo "$as_me:$LINENO: creating $ac_file" >&5
24337echo "$as_me: creating $ac_file" >&6;}
24338 fi
24339
24340 case $ac_tag in
24341 *:-:* | *:-) cat >"$tmp/stdin";;
24342 esac
24343 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024344 esac
24345
Martin v. Löwiseba40652007-08-30 20:10:57 +000024346 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024347$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024348 X"$ac_file" : 'X\(//\)[^/]' \| \
24349 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024350 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024351echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024352 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24353 s//\1/
24354 q
24355 }
24356 /^X\(\/\/\)[^/].*/{
24357 s//\1/
24358 q
24359 }
24360 /^X\(\/\/\)$/{
24361 s//\1/
24362 q
24363 }
24364 /^X\(\/\).*/{
24365 s//\1/
24366 q
24367 }
24368 s/.*/./; q'`
24369 { as_dir="$ac_dir"
24370 case $as_dir in #(
24371 -*) as_dir=./$as_dir;;
24372 esac
24373 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024374 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024375 while :; do
24376 case $as_dir in #(
24377 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24378 *) as_qdir=$as_dir;;
24379 esac
24380 as_dirs="'$as_qdir' $as_dirs"
24381 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024382$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024383 X"$as_dir" : 'X\(//\)[^/]' \| \
24384 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024385 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024386echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024387 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24388 s//\1/
24389 q
24390 }
24391 /^X\(\/\/\)[^/].*/{
24392 s//\1/
24393 q
24394 }
24395 /^X\(\/\/\)$/{
24396 s//\1/
24397 q
24398 }
24399 /^X\(\/\).*/{
24400 s//\1/
24401 q
24402 }
24403 s/.*/./; q'`
24404 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024405 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024406 test -z "$as_dirs" || eval "mkdir $as_dirs"
24407 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24408echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024409 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024410 ac_builddir=.
24411
Martin v. Löwiseba40652007-08-30 20:10:57 +000024412case "$ac_dir" in
24413.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24414*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024415 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024416 # A ".." for each directory in $ac_dir_suffix.
24417 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24418 case $ac_top_builddir_sub in
24419 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24420 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24421 esac ;;
24422esac
24423ac_abs_top_builddir=$ac_pwd
24424ac_abs_builddir=$ac_pwd$ac_dir_suffix
24425# for backward compatibility:
24426ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024427
24428case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024429 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024430 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024431 ac_top_srcdir=$ac_top_builddir_sub
24432 ac_abs_top_srcdir=$ac_pwd ;;
24433 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024434 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024435 ac_top_srcdir=$srcdir
24436 ac_abs_top_srcdir=$srcdir ;;
24437 *) # Relative name.
24438 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24439 ac_top_srcdir=$ac_top_build_prefix$srcdir
24440 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024441esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024442ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024443
Martin v. Löwis11437992002-04-12 09:54:03 +000024444
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445 case $ac_mode in
24446 :F)
24447 #
24448 # CONFIG_FILE
24449 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024450
24451 case $INSTALL in
24452 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024453 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024454 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024456
24457cat >>$CONFIG_STATUS <<\_ACEOF
24458# If the template does not know about datarootdir, expand it.
24459# FIXME: This hack should be removed a few years after 2.60.
24460ac_datarootdir_hack=; ac_datarootdir_seen=
24461
24462case `sed -n '/datarootdir/ {
24463 p
24464 q
24465}
24466/@datadir@/p
24467/@docdir@/p
24468/@infodir@/p
24469/@localedir@/p
24470/@mandir@/p
24471' $ac_file_inputs` in
24472*datarootdir*) ac_datarootdir_seen=yes;;
24473*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24474 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24475echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24476_ACEOF
24477cat >>$CONFIG_STATUS <<_ACEOF
24478 ac_datarootdir_hack='
24479 s&@datadir@&$datadir&g
24480 s&@docdir@&$docdir&g
24481 s&@infodir@&$infodir&g
24482 s&@localedir@&$localedir&g
24483 s&@mandir@&$mandir&g
24484 s&\\\${datarootdir}&$datarootdir&g' ;;
24485esac
24486_ACEOF
24487
24488# Neutralize VPATH when `$srcdir' = `.'.
24489# Shell code in configure.ac might set extrasub.
24490# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024491cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024492 sed "$ac_vpsub
24493$extrasub
24494_ACEOF
24495cat >>$CONFIG_STATUS <<\_ACEOF
24496:t
24497/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024498s&@configure_input@&$configure_input&;t t
24499s&@top_builddir@&$ac_top_builddir_sub&;t t
24500s&@srcdir@&$ac_srcdir&;t t
24501s&@abs_srcdir@&$ac_abs_srcdir&;t t
24502s&@top_srcdir@&$ac_top_srcdir&;t t
24503s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24504s&@builddir@&$ac_builddir&;t t
24505s&@abs_builddir@&$ac_abs_builddir&;t t
24506s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24507s&@INSTALL@&$ac_INSTALL&;t t
24508$ac_datarootdir_hack
24509" $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 +000024510
Martin v. Löwiseba40652007-08-30 20:10:57 +000024511test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24512 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24513 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24514 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24515which seems to be undefined. Please make sure it is defined." >&5
24516echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24517which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024518
Martin v. Löwiseba40652007-08-30 20:10:57 +000024519 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024520 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024521 -) cat "$tmp/out"; rm -f "$tmp/out";;
24522 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024523 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024524 ;;
24525 :H)
24526 #
24527 # CONFIG_HEADER
24528 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024529_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024530
Martin v. Löwiseba40652007-08-30 20:10:57 +000024531# Transform confdefs.h into a sed script `conftest.defines', that
24532# substitutes the proper values into config.h.in to produce config.h.
24533rm -f conftest.defines conftest.tail
24534# First, append a space to every undef/define line, to ease matching.
24535echo 's/$/ /' >conftest.defines
24536# Then, protect against being on the right side of a sed subst, or in
24537# an unquoted here document, in config.status. If some macros were
24538# called several times there might be several #defines for the same
24539# symbol, which is useless. But do not sort them, since the last
24540# AC_DEFINE must be honored.
24541ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24542# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24543# NAME is the cpp macro being defined, VALUE is the value it is being given.
24544# PARAMS is the parameter list in the macro definition--in most cases, it's
24545# just an empty string.
24546ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24547ac_dB='\\)[ (].*,\\1define\\2'
24548ac_dC=' '
24549ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024550
Martin v. Löwiseba40652007-08-30 20:10:57 +000024551uniq confdefs.h |
24552 sed -n '
24553 t rset
24554 :rset
24555 s/^[ ]*#[ ]*define[ ][ ]*//
24556 t ok
24557 d
24558 :ok
24559 s/[\\&,]/\\&/g
24560 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24561 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24562 ' >>conftest.defines
24563
24564# Remove the space that was appended to ease matching.
24565# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024566# example, in the case of _POSIX_SOURCE, which is predefined and required
24567# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024568# (The regexp can be short, since the line contains either #define or #undef.)
24569echo 's/ $//
24570s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000024571
Martin v. Löwiseba40652007-08-30 20:10:57 +000024572# Break up conftest.defines:
24573ac_max_sed_lines=50
24574
24575# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24576# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24577# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24578# et cetera.
24579ac_in='$ac_file_inputs'
24580ac_out='"$tmp/out1"'
24581ac_nxt='"$tmp/out2"'
24582
24583while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000024584do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024585 # Write a here document:
24586 cat >>$CONFIG_STATUS <<_ACEOF
24587 # First, check the format of the line:
24588 cat >"\$tmp/defines.sed" <<\\CEOF
24589/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24590/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24591b
24592:def
24593_ACEOF
24594 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000024595 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024596 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24597 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24598 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24599 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000024600 rm -f conftest.defines
24601 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000024602done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024603rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000024604
Martin v. Löwiseba40652007-08-30 20:10:57 +000024605echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024606cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024607 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024608 echo "/* $configure_input */" >"$tmp/config.h"
24609 cat "$ac_result" >>"$tmp/config.h"
24610 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024611 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
24612echo "$as_me: $ac_file is unchanged" >&6;}
24613 else
Martin v. Löwis11437992002-04-12 09:54:03 +000024614 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024615 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000024616 fi
24617 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618 echo "/* $configure_input */"
24619 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000024620 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024621 rm -f "$tmp/out12"
24622 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000024623
Martin v. Löwiseba40652007-08-30 20:10:57 +000024624
24625 esac
24626
24627done # for ac_tag
24628
Guido van Rossum627b2d71993-12-24 10:39:16 +000024629
Martin v. Löwis11437992002-04-12 09:54:03 +000024630{ (exit 0); exit 0; }
24631_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024632chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000024633ac_clean_files=$ac_clean_files_save
24634
24635
24636# configure is writing to config.log, and then calls config.status.
24637# config.status does its own redirection, appending to config.log.
24638# Unfortunately, on DOS this fails, as config.log is still kept open
24639# by configure, so config.status won't be able to write to it; its
24640# output is simply discarded. So we exec the FD to /dev/null,
24641# effectively closing config.log, so it can be properly (re)opened and
24642# appended to by config.status. When coming back to configure, we
24643# need to make the FD available again.
24644if test "$no_create" != yes; then
24645 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024646 ac_config_status_args=
24647 test "$silent" = yes &&
24648 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000024649 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000024650 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024651 exec 5>>config.log
24652 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24653 # would make configure fail if this is the last instruction.
24654 $ac_cs_success || { (exit 1); exit 1; }
24655fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000024656
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024657
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024658echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024659if test ! -f Modules/Setup
24660then
24661 cp $srcdir/Modules/Setup.dist Modules/Setup
24662fi
24663
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024664echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024665if test ! -f Modules/Setup.local
24666then
24667 echo "# Edit this file for local setup changes" >Modules/Setup.local
24668fi
24669
24670echo "creating Makefile"
24671$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
24672 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000024673 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000024674
24675case $ac_sys_system in
24676BeOS)
24677 { echo "$as_me:$LINENO: WARNING:
24678
24679 Support for BeOS is deprecated as of Python 2.6.
24680 See PEP 11 for the gory details.
24681 " >&5
24682echo "$as_me: WARNING:
24683
24684 Support for BeOS is deprecated as of Python 2.6.
24685 See PEP 11 for the gory details.
24686 " >&2;}
24687 ;;
24688*) ;;
24689esac
24690
Neil Schemenauerc761fc82001-02-19 04:50:49 +000024691mv config.c Modules