blob: 6c19b2c458c1e3d80046894f145dda0156037467 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002# From configure.in Revision: 62499 .
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
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000661PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000662PYTHONFRAMEWORKDIR
663PYTHONFRAMEWORKPREFIX
664PYTHONFRAMEWORKINSTALLDIR
665FRAMEWORKINSTALLFIRST
666FRAMEWORKINSTALLLAST
667FRAMEWORKALTINSTALLFIRST
668FRAMEWORKALTINSTALLLAST
669FRAMEWORKUNIXTOOLSPREFIX
670MACHDEP
671SGI_ABI
672EXTRAPLATDIR
673EXTRAMACHDEPPATH
674CONFIGURE_MACOSX_DEPLOYMENT_TARGET
675EXPORT_MACOSX_DEPLOYMENT_TARGET
676CC
677CFLAGS
678LDFLAGS
679CPPFLAGS
680ac_ct_CC
681EXEEXT
682OBJEXT
683CXX
684MAINCC
685CPP
686GREP
687EGREP
688BUILDEXEEXT
689LIBRARY
690LDLIBRARY
691DLLLIBRARY
692BLDLIBRARY
693LDLIBRARYDIR
694INSTSONAME
695RUNSHARED
696LINKCC
697RANLIB
698AR
699SVNVERSION
700INSTALL_PROGRAM
701INSTALL_SCRIPT
702INSTALL_DATA
703LN
704OPT
705BASECFLAGS
706OTHER_LIBTOOL_OPT
707LIBTOOL_CRUFT
708SO
709LDSHARED
710BLDSHARED
711CCSHARED
712LINKFORSHARED
713CFLAGSFORSHARED
714SHLIBS
715USE_SIGNAL_MODULE
716SIGNAL_OBJS
717USE_THREAD_MODULE
718LDLAST
719THREADOBJ
720DLINCLDIR
721DYNLOADFILE
722MACHDEP_OBJS
723TRUE
724LIBOBJS
725HAVE_GETHOSTBYNAME_R_6_ARG
726HAVE_GETHOSTBYNAME_R_5_ARG
727HAVE_GETHOSTBYNAME_R_3_ARG
728HAVE_GETHOSTBYNAME_R
729HAVE_GETHOSTBYNAME
730LIBM
731LIBC
732UNICODE_OBJS
733THREADHEADERS
734SRCDIRS
735LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000736ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000737 ac_precious_vars='build_alias
738host_alias
739target_alias
740CC
741CFLAGS
742LDFLAGS
743LIBS
744CPPFLAGS
745CPP'
746
Guido van Rossum627b2d71993-12-24 10:39:16 +0000747
Guido van Rossum7f43da71994-08-01 12:15:30 +0000748# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000749ac_init_help=
750ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751# The variables have the same names as the options, with
752# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000754exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756no_recursion=
757prefix=NONE
758program_prefix=NONE
759program_suffix=NONE
760program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000761silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000762site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000765x_includes=NONE
766x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000767
768# Installation directory options.
769# These are left unexpanded so users can "make install exec_prefix=/foo"
770# and all the variables that are supposed to be based on exec_prefix
771# by default will actually change.
772# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000773# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000774bindir='${exec_prefix}/bin'
775sbindir='${exec_prefix}/sbin'
776libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777datarootdir='${prefix}/share'
778datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000779sysconfdir='${prefix}/etc'
780sharedstatedir='${prefix}/com'
781localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000782includedir='${prefix}/include'
783oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000784docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
785infodir='${datarootdir}/info'
786htmldir='${docdir}'
787dvidir='${docdir}'
788pdfdir='${docdir}'
789psdir='${docdir}'
790libdir='${exec_prefix}/lib'
791localedir='${datarootdir}/locale'
792mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000793
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000795ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000797do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798 # If the previous option needs an argument, assign it.
799 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000800 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 ac_prev=
802 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804
Martin v. Löwiseba40652007-08-30 20:10:57 +0000805 case $ac_option in
806 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
807 *) ac_optarg=yes ;;
808 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000810 # Accept the important Cygnus configure options, so we can diagnose typos.
811
Martin v. Löwiseba40652007-08-30 20:10:57 +0000812 case $ac_dashdash$ac_option in
813 --)
814 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000816 -bindir | --bindir | --bindi | --bind | --bin | --bi)
817 ac_prev=bindir ;;
818 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000819 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820
821 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000822 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000823 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000826 -cache-file | --cache-file | --cache-fil | --cache-fi \
827 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
828 ac_prev=cache_file ;;
829 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
830 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000831 cache_file=$ac_optarg ;;
832
833 --config-cache | -C)
834 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835
Martin v. Löwiseba40652007-08-30 20:10:57 +0000836 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000839 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
842 | --dataroo | --dataro | --datar)
843 ac_prev=datarootdir ;;
844 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
845 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
846 datarootdir=$ac_optarg ;;
847
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000849 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000851 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000852 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
853 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000854 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
855 eval enable_$ac_feature=no ;;
856
857 -docdir | --docdir | --docdi | --doc | --do)
858 ac_prev=docdir ;;
859 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
860 docdir=$ac_optarg ;;
861
862 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
863 ac_prev=dvidir ;;
864 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
865 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
867 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000868 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000871 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
872 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000873 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
874 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
877 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
878 | --exec | --exe | --ex)
879 ac_prev=exec_prefix ;;
880 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
881 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
882 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
885 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886 # Obsolete; use --with-gas.
887 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 -help | --help | --hel | --he | -h)
890 ac_init_help=long ;;
891 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
892 ac_init_help=recursive ;;
893 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
894 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895
896 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900
Martin v. Löwiseba40652007-08-30 20:10:57 +0000901 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
902 ac_prev=htmldir ;;
903 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
904 | --ht=*)
905 htmldir=$ac_optarg ;;
906
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -includedir | --includedir | --includedi | --included | --include \
908 | --includ | --inclu | --incl | --inc)
909 ac_prev=includedir ;;
910 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
911 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913
914 -infodir | --infodir | --infodi | --infod | --info | --inf)
915 ac_prev=infodir ;;
916 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
919 -libdir | --libdir | --libdi | --libd)
920 ac_prev=libdir ;;
921 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000922 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923
924 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
925 | --libexe | --libex | --libe)
926 ac_prev=libexecdir ;;
927 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
928 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
Martin v. Löwiseba40652007-08-30 20:10:57 +0000931 -localedir | --localedir | --localedi | --localed | --locale)
932 ac_prev=localedir ;;
933 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
934 localedir=$ac_optarg ;;
935
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000937 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 ac_prev=localstatedir ;;
939 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942
943 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
944 ac_prev=mandir ;;
945 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 # Obsolete; use --without-fp.
950 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000953 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954 no_create=yes ;;
955
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
957 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
958 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000960 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
961 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
962 | --oldin | --oldi | --old | --ol | --o)
963 ac_prev=oldincludedir ;;
964 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
965 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
966 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000967 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
970 ac_prev=prefix ;;
971 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
974 -program-prefix | --program-prefix | --program-prefi | --program-pref \
975 | --program-pre | --program-pr | --program-p)
976 ac_prev=program_prefix ;;
977 -program-prefix=* | --program-prefix=* | --program-prefi=* \
978 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -program-suffix | --program-suffix | --program-suffi | --program-suff \
982 | --program-suf | --program-su | --program-s)
983 ac_prev=program_suffix ;;
984 -program-suffix=* | --program-suffix=* | --program-suffi=* \
985 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -program-transform-name | --program-transform-name \
989 | --program-transform-nam | --program-transform-na \
990 | --program-transform-n | --program-transform- \
991 | --program-transform | --program-transfor \
992 | --program-transfo | --program-transf \
993 | --program-trans | --program-tran \
994 | --progr-tra | --program-tr | --program-t)
995 ac_prev=program_transform_name ;;
996 -program-transform-name=* | --program-transform-name=* \
997 | --program-transform-nam=* | --program-transform-na=* \
998 | --program-transform-n=* | --program-transform-=* \
999 | --program-transform=* | --program-transfor=* \
1000 | --program-transfo=* | --program-transf=* \
1001 | --program-trans=* | --program-tran=* \
1002 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004
Martin v. Löwiseba40652007-08-30 20:10:57 +00001005 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1006 ac_prev=pdfdir ;;
1007 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1008 pdfdir=$ac_optarg ;;
1009
1010 -psdir | --psdir | --psdi | --psd | --ps)
1011 ac_prev=psdir ;;
1012 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1013 psdir=$ac_optarg ;;
1014
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1016 | -silent | --silent | --silen | --sile | --sil)
1017 silent=yes ;;
1018
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1020 ac_prev=sbindir ;;
1021 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1022 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001024
1025 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1026 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1027 | --sharedst | --shareds | --shared | --share | --shar \
1028 | --sha | --sh)
1029 ac_prev=sharedstatedir ;;
1030 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1031 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1032 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1033 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001036 -site | --site | --sit)
1037 ac_prev=site ;;
1038 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1042 ac_prev=srcdir ;;
1043 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1047 | --syscon | --sysco | --sysc | --sys | --sy)
1048 ac_prev=sysconfdir ;;
1049 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1050 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
1058 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1059 verbose=yes ;;
1060
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 -version | --version | --versio | --versi | --vers | -V)
1062 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001066 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001067 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 { echo "$as_me: error: invalid package name: $ac_package" >&2
1069 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001070 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1071 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001076 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 { echo "$as_me: error: invalid package name: $ac_package" >&2
1078 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001079 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1080 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 --x)
1083 # Obsolete; use --with-x.
1084 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1087 | --x-incl | --x-inc | --x-in | --x-i)
1088 ac_prev=x_includes ;;
1089 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1090 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092
1093 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1094 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1095 ac_prev=x_libraries ;;
1096 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1097 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 -*) { echo "$as_me: error: unrecognized option: $ac_option
1101Try \`$0 --help' for more information." >&2
1102 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103 ;;
1104
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 *=*)
1106 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1107 # Reject names that are not valid shell variable names.
1108 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1109 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1110 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001111 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 export $ac_envvar ;;
1113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 # FIXME: should be removed in autoconf 3.0.
1116 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1117 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1118 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1119 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120 ;;
1121
1122 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001123done
1124
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1127 { echo "$as_me: error: missing argument to $ac_option" >&2
1128 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129fi
1130
Martin v. Löwiseba40652007-08-30 20:10:57 +00001131# Be sure to have absolute directory names.
1132for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1133 datadir sysconfdir sharedstatedir localstatedir includedir \
1134 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1135 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001137 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 [\\/$]* | ?:[\\/]* ) continue;;
1140 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001142 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1143 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001144done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001145
Martin v. Löwis11437992002-04-12 09:54:03 +00001146# There might be people who depend on the old broken behavior: `$host'
1147# used to hold the argument of --host etc.
1148# FIXME: To remove some day.
1149build=$build_alias
1150host=$host_alias
1151target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153# FIXME: To remove some day.
1154if test "x$host_alias" != x; then
1155 if test "x$build_alias" = x; then
1156 cross_compiling=maybe
1157 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1158 If a cross compiler is detected then cross compile mode will be used." >&2
1159 elif test "x$build_alias" != "x$host_alias"; then
1160 cross_compiling=yes
1161 fi
1162fi
1163
1164ac_tool_prefix=
1165test -n "$host_alias" && ac_tool_prefix=$host_alias-
1166
1167test "$silent" = yes && exec 6>/dev/null
1168
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169
Martin v. Löwiseba40652007-08-30 20:10:57 +00001170ac_pwd=`pwd` && test -n "$ac_pwd" &&
1171ac_ls_di=`ls -di .` &&
1172ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1173 { echo "$as_me: error: Working directory cannot be determined" >&2
1174 { (exit 1); exit 1; }; }
1175test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1176 { echo "$as_me: error: pwd does not report name of working directory" >&2
1177 { (exit 1); exit 1; }; }
1178
1179
Guido van Rossum627b2d71993-12-24 10:39:16 +00001180# Find the source files, if location was not specified.
1181if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001183 # Try the directory containing this script, then the parent directory.
1184 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001185$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001186 X"$0" : 'X\(//\)[^/]' \| \
1187 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001188 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001189echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1191 s//\1/
1192 q
1193 }
1194 /^X\(\/\/\)[^/].*/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\).*/{
1203 s//\1/
1204 q
1205 }
1206 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001208 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001209 srcdir=..
1210 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001211else
1212 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001214if test ! -r "$srcdir/$ac_unique_file"; then
1215 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1216 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001219ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1220ac_abs_confdir=`(
1221 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001222 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223 pwd)`
1224# When building in place, set srcdir=.
1225if test "$ac_abs_confdir" = "$ac_pwd"; then
1226 srcdir=.
1227fi
1228# Remove unnecessary trailing slashes from srcdir.
1229# Double slashes in file names in object file debugging info
1230# mess up M-x gdb in Emacs.
1231case $srcdir in
1232*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1233esac
1234for ac_var in $ac_precious_vars; do
1235 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1236 eval ac_env_${ac_var}_value=\$${ac_var}
1237 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1239done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240
Martin v. Löwis11437992002-04-12 09:54:03 +00001241#
1242# Report the --help message.
1243#
1244if test "$ac_init_help" = "long"; then
1245 # Omit some internal or obsolete options to make the list less imposing.
1246 # This message is too long to be a string in the A/UX 3.1 sh.
1247 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001248\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001249
1250Usage: $0 [OPTION]... [VAR=VALUE]...
1251
1252To assign environment variables (e.g., CC, CFLAGS...), specify them as
1253VAR=VALUE. See below for descriptions of some of the useful variables.
1254
1255Defaults for the options are specified in brackets.
1256
1257Configuration:
1258 -h, --help display this help and exit
1259 --help=short display options specific to this package
1260 --help=recursive display the short help of all the included packages
1261 -V, --version display version information and exit
1262 -q, --quiet, --silent do not print \`checking...' messages
1263 --cache-file=FILE cache test results in FILE [disabled]
1264 -C, --config-cache alias for \`--cache-file=config.cache'
1265 -n, --no-create do not create output files
1266 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1267
Martin v. Löwis11437992002-04-12 09:54:03 +00001268Installation directories:
1269 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001270 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001271 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273
1274By default, \`make install' will install all the files in
1275\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1276an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1277for instance \`--prefix=\$HOME'.
1278
1279For better control, use the options below.
1280
1281Fine tuning of the installation directories:
1282 --bindir=DIR user executables [EPREFIX/bin]
1283 --sbindir=DIR system admin executables [EPREFIX/sbin]
1284 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001285 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1286 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1287 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1288 --libdir=DIR object code libraries [EPREFIX/lib]
1289 --includedir=DIR C header files [PREFIX/include]
1290 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1292 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1293 --infodir=DIR info documentation [DATAROOTDIR/info]
1294 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1295 --mandir=DIR man documentation [DATAROOTDIR/man]
1296 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1297 --htmldir=DIR html documentation [DOCDIR]
1298 --dvidir=DIR dvi documentation [DOCDIR]
1299 --pdfdir=DIR pdf documentation [DOCDIR]
1300 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001301_ACEOF
1302
1303 cat <<\_ACEOF
1304_ACEOF
1305fi
1306
1307if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001308 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001309 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001311 cat <<\_ACEOF
1312
1313Optional Features:
1314 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1315 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001316 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001317 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001318 --enable-framework[=INSTALLDIR]
1319 Build (MacOSX|Darwin) framework
1320 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001321 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1323 --enable-ipv6 Enable ipv6 (with ipv4) support
1324 --disable-ipv6 Disable ipv6 support
1325 --enable-unicode[=ucs[24]]
1326 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001327
1328Optional Packages:
1329 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1330 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001331 --with-framework-name=FRAMEWORK
1332 specify an alternate name of the framework built
1333 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001335 --with-cxx-main=<compiler>
1336 compile main() and link python executable with C++
1337 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-suffix=.exe set executable suffix
1339 --with-pydebug build with Py_DEBUG defined
1340 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001341 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001342 --with-signal-module disable/enable signal module
1343 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1344 --with(out)-threads[=DIRECTORY]
1345 disable/enable thread support
1346 --with(out)-thread[=DIRECTORY]
1347 deprecated; use --with(out)-threads
1348 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001350 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001351 --with(out)-pymalloc disable/enable specialized mallocs
1352 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001353 --with-fpectl enable SIGFPE catching
1354 --with-libm=STRING math library
1355 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001356
1357Some influential environment variables:
1358 CC C compiler command
1359 CFLAGS C compiler flags
1360 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1361 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001362 LIBS libraries to pass to the linker, e.g. -l<library>
1363 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1364 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001365 CPP C preprocessor
1366
1367Use these variables to override the choices made by `configure' or to help
1368it to find libraries and programs with nonstandard names/locations.
1369
Martin v. Löwis1d459062005-03-14 21:23:33 +00001370Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001371_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001372ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001373fi
1374
1375if test "$ac_init_help" = "recursive"; then
1376 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001378 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001379 ac_builddir=.
1380
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381case "$ac_dir" in
1382.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1383*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385 # A ".." for each directory in $ac_dir_suffix.
1386 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1387 case $ac_top_builddir_sub in
1388 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1389 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1390 esac ;;
1391esac
1392ac_abs_top_builddir=$ac_pwd
1393ac_abs_builddir=$ac_pwd$ac_dir_suffix
1394# for backward compatibility:
1395ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001396
1397case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$ac_top_builddir_sub
1401 ac_abs_top_srcdir=$ac_pwd ;;
1402 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001403 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001404 ac_top_srcdir=$srcdir
1405 ac_abs_top_srcdir=$srcdir ;;
1406 *) # Relative name.
1407 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1408 ac_top_srcdir=$ac_top_build_prefix$srcdir
1409 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001410esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001412
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 cd "$ac_dir" || { ac_status=$?; continue; }
1414 # Check for guested configure.
1415 if test -f "$ac_srcdir/configure.gnu"; then
1416 echo &&
1417 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1418 elif test -f "$ac_srcdir/configure"; then
1419 echo &&
1420 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 else
1422 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001423 fi || ac_status=$?
1424 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 done
1426fi
1427
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001429if $ac_init_version; then
1430 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001431python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001432generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001433
Martin v. Löwiseba40652007-08-30 20:10:57 +00001434Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14352002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001436This configure script is free software; the Free Software Foundation
1437gives unlimited permission to copy, distribute and modify it.
1438_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001442This file contains any messages produced by compilers while
1443running configure, to aid debugging if configure makes a mistake.
1444
Neal Norwitz9be57322006-08-18 05:39:20 +00001445It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001447
1448 $ $0 $@
1449
1450_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001452{
1453cat <<_ASUNAME
1454## --------- ##
1455## Platform. ##
1456## --------- ##
1457
1458hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1459uname -m = `(uname -m) 2>/dev/null || echo unknown`
1460uname -r = `(uname -r) 2>/dev/null || echo unknown`
1461uname -s = `(uname -s) 2>/dev/null || echo unknown`
1462uname -v = `(uname -v) 2>/dev/null || echo unknown`
1463
1464/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1465/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1466
1467/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1468/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1469/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001470/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001471/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1472/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1473/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1474
1475_ASUNAME
1476
1477as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1478for as_dir in $PATH
1479do
1480 IFS=$as_save_IFS
1481 test -z "$as_dir" && as_dir=.
1482 echo "PATH: $as_dir"
1483done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001484IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486} >&5
1487
1488cat >&5 <<_ACEOF
1489
1490
1491## ----------- ##
1492## Core tests. ##
1493## ----------- ##
1494
1495_ACEOF
1496
1497
1498# Keep a trace of the command line.
1499# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001500# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001501# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001502# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001503ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001504ac_configure_args0=
1505ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001506ac_must_keep_next=false
1507for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001508do
Skip Montanaro6dead952003-09-25 14:50:04 +00001509 for ac_arg
1510 do
1511 case $ac_arg in
1512 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1513 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1514 | -silent | --silent | --silen | --sile | --sil)
1515 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001517 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1518 esac
1519 case $ac_pass in
1520 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1521 2)
1522 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1523 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001525 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001526 case $ac_arg in
1527 *=* | --config-cache | -C | -disable-* | --disable-* \
1528 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1529 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1530 | -with-* | --with-* | -without-* | --without-* | --x)
1531 case "$ac_configure_args0 " in
1532 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1533 esac
1534 ;;
1535 -* ) ac_must_keep_next=true ;;
1536 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001537 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001539 ;;
1540 esac
1541 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001542done
Skip Montanaro6dead952003-09-25 14:50:04 +00001543$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1544$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 +00001545
1546# When interrupted or exit'd, cleanup temporary files, and complete
1547# config.log. We remove comments because anyway the quotes in there
1548# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549# WARNING: Use '\'' to represent an apostrophe within the trap.
1550# 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 +00001551trap 'exit_status=$?
1552 # Save into config.log some information that might help in debugging.
1553 {
1554 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001555
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 cat <<\_ASBOX
1557## ---------------- ##
1558## Cache variables. ##
1559## ---------------- ##
1560_ASBOX
1561 echo
1562 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563(
1564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1565 eval ac_val=\$$ac_var
1566 case $ac_val in #(
1567 *${as_nl}*)
1568 case $ac_var in #(
1569 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1570echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1571 esac
1572 case $ac_var in #(
1573 _ | IFS | as_nl) ;; #(
1574 *) $as_unset $ac_var ;;
1575 esac ;;
1576 esac
1577 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001578 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001579 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1580 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 "s/'\''/'\''\\\\'\'''\''/g;
1583 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1584 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001585 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001586 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001587 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001588 esac |
1589 sort
1590)
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001592
1593 cat <<\_ASBOX
1594## ----------------- ##
1595## Output variables. ##
1596## ----------------- ##
1597_ASBOX
1598 echo
1599 for ac_var in $ac_subst_vars
1600 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 eval ac_val=\$$ac_var
1602 case $ac_val in
1603 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1604 esac
1605 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001606 done | sort
1607 echo
1608
1609 if test -n "$ac_subst_files"; then
1610 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001611## ------------------- ##
1612## File substitutions. ##
1613## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001614_ASBOX
1615 echo
1616 for ac_var in $ac_subst_files
1617 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001618 eval ac_val=\$$ac_var
1619 case $ac_val in
1620 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1621 esac
1622 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001623 done | sort
1624 echo
1625 fi
1626
Martin v. Löwis11437992002-04-12 09:54:03 +00001627 if test -s confdefs.h; then
1628 cat <<\_ASBOX
1629## ----------- ##
1630## confdefs.h. ##
1631## ----------- ##
1632_ASBOX
1633 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001635 echo
1636 fi
1637 test "$ac_signal" != 0 &&
1638 echo "$as_me: caught signal $ac_signal"
1639 echo "$as_me: exit $exit_status"
1640 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001641 rm -f core *.core core.conftest.* &&
1642 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001644' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001645for ac_signal in 1 2 13 15; do
1646 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1647done
1648ac_signal=0
1649
1650# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001651rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001652
1653# Predefined preprocessor variables.
1654
1655cat >>confdefs.h <<_ACEOF
1656#define PACKAGE_NAME "$PACKAGE_NAME"
1657_ACEOF
1658
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_VERSION "$PACKAGE_VERSION"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_STRING "$PACKAGE_STRING"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1677_ACEOF
1678
1679
1680# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001681# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001682if test -n "$CONFIG_SITE"; then
1683 set x "$CONFIG_SITE"
1684elif test "x$prefix" != xNONE; then
1685 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1686else
1687 set x "$ac_default_prefix/share/config.site" \
1688 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001690shift
1691for ac_site_file
1692do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001694 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1695echo "$as_me: loading site script $ac_site_file" >&6;}
1696 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001697 . "$ac_site_file"
1698 fi
1699done
1700
1701if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 # Some versions of bash will fail to source /dev/null (special
1703 # files actually), so we avoid doing that.
1704 if test -f "$cache_file"; then
1705 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1706echo "$as_me: loading cache $cache_file" >&6;}
1707 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001708 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1709 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001710 esac
1711 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001712else
Martin v. Löwis11437992002-04-12 09:54:03 +00001713 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1714echo "$as_me: creating cache $cache_file" >&6;}
1715 >$cache_file
1716fi
1717
1718# Check that the precious variables saved in the cache have kept the same
1719# value.
1720ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1723 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001724 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1725 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001726 case $ac_old_set,$ac_new_set in
1727 set,)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,set)
1732 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1733echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1734 ac_cache_corrupted=: ;;
1735 ,);;
1736 *)
1737 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001741echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001742 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001743echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001744 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 fi;;
1746 esac
1747 # Pass precious variables to config.status.
1748 if test "$ac_new_set" = set; then
1749 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001750 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 *) ac_arg=$ac_var=$ac_new_val ;;
1752 esac
1753 case " $ac_configure_args " in
1754 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1755 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1756 esac
1757 fi
1758done
1759if $ac_cache_corrupted; then
1760 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1761echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1762 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1763echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1764 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001765fi
1766
Martin v. Löwiseba40652007-08-30 20:10:57 +00001767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
Guido van Rossum7f43da71994-08-01 12:15:30 +00001791ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001793ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1794ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1795ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001796
Guido van Rossum627b2d71993-12-24 10:39:16 +00001797
Michael W. Hudson54241132001-12-07 15:38:26 +00001798
Martin v. Löwiseba40652007-08-30 20:10:57 +00001799ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001800
1801
Martin v. Löwis11437992002-04-12 09:54:03 +00001802
1803
1804
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001805
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001806
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001807# We don't use PACKAGE_ variables, and they cause conflicts
1808# with other autoconf-based packages that include Python.h
1809grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1810rm confdefs.h
1811mv confdefs.h.new confdefs.h
1812
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001813
Neal Norwitz9be57322006-08-18 05:39:20 +00001814VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001815
Martin v. Löwis1142de32002-03-29 16:28:31 +00001816
1817SOVERSION=1.0
1818
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001819# The later defininition of _XOPEN_SOURCE disables certain features
1820# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1821
1822cat >>confdefs.h <<\_ACEOF
1823#define _GNU_SOURCE 1
1824_ACEOF
1825
1826
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001827# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1828# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1829# them.
1830
1831cat >>confdefs.h <<\_ACEOF
1832#define _NETBSD_SOURCE 1
1833_ACEOF
1834
1835
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001836# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1837# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1838# them.
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define __BSD_VISIBLE 1
1842_ACEOF
1843
1844
Martin v. Löwisd6320502004-08-12 13:45:08 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1847
1848cat >>confdefs.h <<\_ACEOF
1849#define _BSD_TYPES 1
1850_ACEOF
1851
1852
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001853define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001854
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001855# Arguments passed to configure.
1856
1857CONFIG_ARGS="$ac_configure_args"
1858
Martin v. Löwiseba40652007-08-30 20:10:57 +00001859# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001860if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001861 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001862 case $enableval in
1863 yes)
1864 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1865 ;;
1866 esac
1867 case $enableval in
1868 no)
1869 UNIVERSALSDK=
1870 enable_universalsdk=
1871 ;;
1872 *)
1873 UNIVERSALSDK=$enableval
1874 ;;
1875 esac
1876
1877else
1878
1879 UNIVERSALSDK=
1880 enable_universalsdk=
1881
Martin v. Löwiseba40652007-08-30 20:10:57 +00001882fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001883
1884
Martin v. Löwiseba40652007-08-30 20:10:57 +00001885
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001886
1887# Check whether --with-framework-name was given.
1888if test "${with_framework_name+set}" = set; then
1889 withval=$with_framework_name;
1890 PYTHONFRAMEWORK=${withval}
1891 PYTHONFRAMEWORKDIR=${withval}.framework
1892 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1893
1894else
1895
1896 PYTHONFRAMEWORK=Python
1897 PYTHONFRAMEWORKDIR=Python.framework
1898 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1899
1900fi
1901
Martin v. Löwiseba40652007-08-30 20:10:57 +00001902# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001903if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001904 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001905 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001907 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001908 esac
1909 case $enableval in
1910 no)
1911 PYTHONFRAMEWORK=
1912 PYTHONFRAMEWORKDIR=no-framework
1913 PYTHONFRAMEWORKPREFIX=
1914 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001915 FRAMEWORKINSTALLFIRST=
1916 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001917 FRAMEWORKALTINSTALLFIRST=
1918 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001919 if test "x${prefix}" = "xNONE"; then
1920 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1921 else
1922 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1923 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001924 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001925 ;;
1926 *)
1927 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001928 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001929 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1930 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001931 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1932 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001933 if test "x${prefix}" = "xNONE" ; then
1934 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1935 else
1936 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1937 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001938 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001939
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001940 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001941 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001942 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001943
Martin v. Löwiseba40652007-08-30 20:10:57 +00001944 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001945
Martin v. Löwiseba40652007-08-30 20:10:57 +00001946 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001947
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001948 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1949
1950 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1951
Jack Jansene578a632001-08-15 01:27:14 +00001952 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001953
Guido van Rossum563e7081996-09-10 18:20:48 +00001954else
Martin v. Löwis11437992002-04-12 09:54:03 +00001955
Jack Jansene578a632001-08-15 01:27:14 +00001956 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001957 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001958 PYTHONFRAMEWORKPREFIX=
1959 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001960 FRAMEWORKINSTALLFIRST=
1961 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001962 FRAMEWORKALTINSTALLFIRST=
1963 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001964 if test "x${prefix}" = "xNONE" ; then
1965 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1966 else
1967 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1968 fi
Jack Jansene578a632001-08-15 01:27:14 +00001969 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001970
Martin v. Löwiseba40652007-08-30 20:10:57 +00001971fi
1972
Michael W. Hudson54241132001-12-07 15:38:26 +00001973
1974
1975
1976
Jack Jansene578a632001-08-15 01:27:14 +00001977
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001978
1979
Ronald Oussoren5b787322006-06-06 19:50:24 +00001980
1981
1982
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001983
Jack Jansene578a632001-08-15 01:27:14 +00001984##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001985## AC_HELP_STRING(--with-dyld,
1986## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001987##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001988# Set name for machine-dependent library files
1989
Martin v. Löwiseba40652007-08-30 20:10:57 +00001990{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1991echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001992if test -z "$MACHDEP"
1993then
Guido van Rossum563e7081996-09-10 18:20:48 +00001994 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001995 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1996 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001997 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001998 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001999 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002000 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002001 ac_md_system=`echo $ac_sys_system |
2002 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2003 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002004 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002005 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002006
Guido van Rossum07397971997-04-29 21:49:50 +00002007 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002008 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002009 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002010 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002011 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002012 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002013 esac
2014fi
Guido van Rossum91922671997-10-09 20:24:13 +00002015
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002016# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2017# disable features if it is defined, without any means to access these
2018# features as extensions. For these systems, we skip the definition of
2019# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2020# some feature, make sure there is no alternative way to access this
2021# feature. Also, when using wildcards, make sure you have verified the
2022# need for not defining _XOPEN_SOURCE on all systems matching the
2023# wildcard, and that the wildcard does not include future systems
2024# (which may remove their limitations).
2025case $ac_sys_system/$ac_sys_release in
2026 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2027 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002028 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002029 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002030 define_xopen_source=no
2031 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2032 # also defined. This can be overridden by defining _BSD_SOURCE
2033 # As this has a different meaning on Linux, only define it on OpenBSD
2034
2035cat >>confdefs.h <<\_ACEOF
2036#define _BSD_SOURCE 1
2037_ACEOF
2038
2039 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002040 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2041 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2042 # Marc Recht
2043 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2044 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002045 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2046 # of union __?sigval. Reported by Stuart Bishop.
2047 SunOS/5.6)
2048 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002049 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2050 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002051 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002052 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002053 define_xopen_source=no;;
2054 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002055 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002056 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002057 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002058 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2059 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2060 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2061 # This should hopefully be fixed in FreeBSD 4.9
2062 FreeBSD/4.8* | Darwin/6* )
2063 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002064 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2065 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2066 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002067 AIX/4)
2068 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002069 AIX/5)
2070 if test `uname -r` -eq 1; then
2071 define_xopen_source=no
2072 fi
2073 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002074 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2075 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002076 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002077 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002078 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002079 define_xopen_source=no
2080 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002081
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002082esac
2083
2084if test $define_xopen_source = yes
2085then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002086 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2087 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2089 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002090 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002091 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002092
2093cat >>confdefs.h <<\_ACEOF
2094#define _XOPEN_SOURCE 500
2095_ACEOF
2096
2097 ;;
2098 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002099
2100cat >>confdefs.h <<\_ACEOF
2101#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002102_ACEOF
2103
Skip Montanarof0d5f792004-08-15 14:08:23 +00002104 ;;
2105 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002106
2107 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2108 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2109 # several APIs are not declared. Since this is also needed in some
2110 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002111 # except for Solaris 10, where it must not be defined,
2112 # as it implies XPG4.2
2113 case $ac_sys_system/$ac_sys_release in
2114 SunOS/5.10)
2115 ;;
2116 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002117
2118cat >>confdefs.h <<\_ACEOF
2119#define _XOPEN_SOURCE_EXTENDED 1
2120_ACEOF
2121
Martin v. Löwis7dece662005-11-26 11:38:24 +00002122 ;;
2123 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002124
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002125
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002126cat >>confdefs.h <<\_ACEOF
2127#define _POSIX_C_SOURCE 200112L
2128_ACEOF
2129
2130
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002131fi
2132
Guido van Rossum91922671997-10-09 20:24:13 +00002133#
2134# SGI compilers allow the specification of the both the ABI and the
2135# ISA on the command line. Depending on the values of these switches,
2136# different and often incompatable code will be generated.
2137#
2138# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2139# thus supply support for various ABI/ISA combinations. The MACHDEP
2140# variable is also adjusted.
2141#
2142
2143if test ! -z "$SGI_ABI"
2144then
2145 CC="cc $SGI_ABI"
2146 LDFLAGS="$SGI_ABI $LDFLAGS"
2147 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002149{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2150echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002151
Jack Jansen83f898c2002-12-30 22:23:40 +00002152# And add extra plat-mac for darwin
2153
Jack Jansen7b59b422003-03-17 15:44:10 +00002154
Martin v. Löwiseba40652007-08-30 20:10:57 +00002155{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2156echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002157if test -z "$EXTRAPLATDIR"
2158then
2159 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002160 darwin)
2161 EXTRAPLATDIR="\$(PLATMACDIRS)"
2162 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2163 ;;
2164 *)
2165 EXTRAPLATDIR=""
2166 EXTRAMACHDEPPATH=""
2167 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002168 esac
2169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002170{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2171echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002172
Jack Jansen6b08a402004-06-03 12:41:45 +00002173# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2174# it may influence the way we can build extensions, so distutils
2175# needs to check it
2176
Ronald Oussoren988117f2006-04-29 11:31:35 +00002177
Jack Jansen6b08a402004-06-03 12:41:45 +00002178CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002179EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002180
Mark Dickinson65134662008-04-25 16:11:04 +00002181{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2182echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2183ac_sys_machine=`uname -m`
2184{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2185echo "${ECHO_T}$ac_sys_machine" >&6; }
2186
Guido van Rossum627b2d71993-12-24 10:39:16 +00002187# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002188
2189# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2190# for debug/optimization stuff. BASECFLAGS is for flags that are required
2191# just to get things to compile and link. Users are free to override OPT
2192# when running configure or make. The build should not break if they do.
2193# BASECFLAGS should generally not be messed with, however.
2194
2195# XXX shouldn't some/most/all of this code be merged with the stuff later
2196# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002197{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2198echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002199
Martin v. Löwiseba40652007-08-30 20:10:57 +00002200# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002201if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002202 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002203 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002204 no) CC=cc
2205 without_gcc=yes;;
2206 yes) CC=gcc
2207 without_gcc=no;;
2208 *) CC=$withval
2209 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002210 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002211else
Martin v. Löwis11437992002-04-12 09:54:03 +00002212
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002213 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002214 AIX*) CC=cc_r
2215 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002216 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002217 case $BE_HOST_CPU in
2218 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002219 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002220 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002221 BASECFLAGS="$BASECFLAGS -export pragma"
2222 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002223 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002224 ;;
2225 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002226 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002227 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002228 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002229 ;;
2230 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002231 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2232echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2233 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002234 ;;
2235 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002236 AR="\$(srcdir)/Modules/ar_beos"
2237 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002238 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002239 Monterey*)
2240 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002241 without_gcc=;;
2242 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002243 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002244fi
2245
2246{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2247echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002248
Guido van Rossum8b131c51995-03-09 14:10:13 +00002249# If the user switches compilers, we can't believe the cache
2250if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2251then
Martin v. Löwis11437992002-04-12 09:54:03 +00002252 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2253(it is also a good idea to do 'make clean' before compiling)" >&5
2254echo "$as_me: error: cached CC is different -- throw away $cache_file
2255(it is also a good idea to do 'make clean' before compiling)" >&2;}
2256 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002257fi
2258
Martin v. Löwis11437992002-04-12 09:54:03 +00002259ac_ext=c
2260ac_cpp='$CPP $CPPFLAGS'
2261ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2262ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2263ac_compiler_gnu=$ac_cv_c_compiler_gnu
2264if test -n "$ac_tool_prefix"; then
2265 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2266set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002267{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2268echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002269if test "${ac_cv_prog_CC+set}" = set; then
2270 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002271else
2272 if test -n "$CC"; then
2273 ac_cv_prog_CC="$CC" # Let the user override the test.
2274else
Martin v. Löwis11437992002-04-12 09:54:03 +00002275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2276for as_dir in $PATH
2277do
2278 IFS=$as_save_IFS
2279 test -z "$as_dir" && as_dir=.
2280 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002281 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 +00002282 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2283 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2284 break 2
2285 fi
2286done
2287done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002288IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002289
Jack Jansendd19cf82001-12-06 22:36:17 +00002290fi
2291fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002292CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002293if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002294 { echo "$as_me:$LINENO: result: $CC" >&5
2295echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002296else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002297 { echo "$as_me:$LINENO: result: no" >&5
2298echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002299fi
2300
Martin v. Löwiseba40652007-08-30 20:10:57 +00002301
Martin v. Löwis11437992002-04-12 09:54:03 +00002302fi
2303if test -z "$ac_cv_prog_CC"; then
2304 ac_ct_CC=$CC
2305 # Extract the first word of "gcc", so it can be a program name with args.
2306set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002307{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2308echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002309if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2310 echo $ECHO_N "(cached) $ECHO_C" >&6
2311else
2312 if test -n "$ac_ct_CC"; then
2313 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2314else
2315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2316for as_dir in $PATH
2317do
2318 IFS=$as_save_IFS
2319 test -z "$as_dir" && as_dir=.
2320 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002321 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 +00002322 ac_cv_prog_ac_ct_CC="gcc"
2323 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2324 break 2
2325 fi
2326done
2327done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002328IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002329
2330fi
2331fi
2332ac_ct_CC=$ac_cv_prog_ac_ct_CC
2333if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002334 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2335echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002336else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002337 { echo "$as_me:$LINENO: result: no" >&5
2338echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002339fi
2340
Martin v. Löwiseba40652007-08-30 20:10:57 +00002341 if test "x$ac_ct_CC" = x; then
2342 CC=""
2343 else
2344 case $cross_compiling:$ac_tool_warned in
2345yes:)
2346{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2347whose name does not start with the host triplet. If you think this
2348configuration is useful to you, please write to autoconf@gnu.org." >&5
2349echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2350whose name does not start with the host triplet. If you think this
2351configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2352ac_tool_warned=yes ;;
2353esac
2354 CC=$ac_ct_CC
2355 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002356else
2357 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002358fi
2359
Jack Jansendd19cf82001-12-06 22:36:17 +00002360if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002361 if test -n "$ac_tool_prefix"; then
2362 # 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 +00002363set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002364{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2365echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002366if test "${ac_cv_prog_CC+set}" = set; then
2367 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002368else
2369 if test -n "$CC"; then
2370 ac_cv_prog_CC="$CC" # Let the user override the test.
2371else
Martin v. Löwis11437992002-04-12 09:54:03 +00002372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2373for as_dir in $PATH
2374do
2375 IFS=$as_save_IFS
2376 test -z "$as_dir" && as_dir=.
2377 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002378 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002379 ac_cv_prog_CC="${ac_tool_prefix}cc"
2380 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2381 break 2
2382 fi
2383done
2384done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002385IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002386
2387fi
2388fi
2389CC=$ac_cv_prog_CC
2390if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002391 { echo "$as_me:$LINENO: result: $CC" >&5
2392echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002393else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002394 { echo "$as_me:$LINENO: result: no" >&5
2395echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002396fi
2397
Martin v. Löwiseba40652007-08-30 20:10:57 +00002398
Martin v. Löwis11437992002-04-12 09:54:03 +00002399 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002400fi
2401if test -z "$CC"; then
2402 # Extract the first word of "cc", so it can be a program name with args.
2403set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002404{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2405echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002406if test "${ac_cv_prog_CC+set}" = set; then
2407 echo $ECHO_N "(cached) $ECHO_C" >&6
2408else
2409 if test -n "$CC"; then
2410 ac_cv_prog_CC="$CC" # Let the user override the test.
2411else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002412 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2414for as_dir in $PATH
2415do
2416 IFS=$as_save_IFS
2417 test -z "$as_dir" && as_dir=.
2418 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 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 +00002420 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2421 ac_prog_rejected=yes
2422 continue
2423 fi
2424 ac_cv_prog_CC="cc"
2425 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2426 break 2
2427 fi
2428done
2429done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002431
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002432if test $ac_prog_rejected = yes; then
2433 # We found a bogon in the path, so make sure we never use it.
2434 set dummy $ac_cv_prog_CC
2435 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002436 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002437 # We chose a different compiler from the bogus one.
2438 # However, it has the same basename, so the bogon will be chosen
2439 # first if we set CC to just the basename; use the full file name.
2440 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002441 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002442 fi
2443fi
2444fi
2445fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002446CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002447if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 { echo "$as_me:$LINENO: result: $CC" >&5
2449echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002450else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451 { echo "$as_me:$LINENO: result: no" >&5
2452echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002453fi
2454
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455
Martin v. Löwis11437992002-04-12 09:54:03 +00002456fi
2457if test -z "$CC"; then
2458 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002460 do
2461 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002463{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002465if test "${ac_cv_prog_CC+set}" = set; then
2466 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002467else
2468 if test -n "$CC"; then
2469 ac_cv_prog_CC="$CC" # Let the user override the test.
2470else
Martin v. Löwis11437992002-04-12 09:54:03 +00002471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2472for as_dir in $PATH
2473do
2474 IFS=$as_save_IFS
2475 test -z "$as_dir" && as_dir=.
2476 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002477 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 +00002478 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2479 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2480 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002482done
2483done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002484IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002485
2486fi
2487fi
2488CC=$ac_cv_prog_CC
2489if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002490 { echo "$as_me:$LINENO: result: $CC" >&5
2491echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002492else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002493 { echo "$as_me:$LINENO: result: no" >&5
2494echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002495fi
2496
Martin v. Löwiseba40652007-08-30 20:10:57 +00002497
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 test -n "$CC" && break
2499 done
2500fi
2501if test -z "$CC"; then
2502 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002503 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002504do
2505 # Extract the first word of "$ac_prog", so it can be a program name with args.
2506set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2508echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002509if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2510 echo $ECHO_N "(cached) $ECHO_C" >&6
2511else
2512 if test -n "$ac_ct_CC"; then
2513 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2514else
2515as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2516for as_dir in $PATH
2517do
2518 IFS=$as_save_IFS
2519 test -z "$as_dir" && as_dir=.
2520 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002521 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 +00002522 ac_cv_prog_ac_ct_CC="$ac_prog"
2523 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2524 break 2
2525 fi
2526done
2527done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002528IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002529
Martin v. Löwis11437992002-04-12 09:54:03 +00002530fi
2531fi
2532ac_ct_CC=$ac_cv_prog_ac_ct_CC
2533if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002534 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2535echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002536else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002537 { echo "$as_me:$LINENO: result: no" >&5
2538echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002539fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002540
Martin v. Löwiseba40652007-08-30 20:10:57 +00002541
Martin v. Löwis11437992002-04-12 09:54:03 +00002542 test -n "$ac_ct_CC" && break
2543done
Michael W. Hudson54241132001-12-07 15:38:26 +00002544
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545 if test "x$ac_ct_CC" = x; then
2546 CC=""
2547 else
2548 case $cross_compiling:$ac_tool_warned in
2549yes:)
2550{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2551whose name does not start with the host triplet. If you think this
2552configuration is useful to you, please write to autoconf@gnu.org." >&5
2553echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2554whose name does not start with the host triplet. If you think this
2555configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2556ac_tool_warned=yes ;;
2557esac
2558 CC=$ac_ct_CC
2559 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002560fi
2561
2562fi
2563
2564
Skip Montanaro6dead952003-09-25 14:50:04 +00002565test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2566See \`config.log' for more details." >&5
2567echo "$as_me: error: no acceptable C compiler found in \$PATH
2568See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 { (exit 1); exit 1; }; }
2570
2571# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002573ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002574{ (ac_try="$ac_compiler --version >&5"
2575case "(($ac_try" in
2576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2577 *) ac_try_echo=$ac_try;;
2578esac
2579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2580 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 ac_status=$?
2582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2583 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584{ (ac_try="$ac_compiler -v >&5"
2585case "(($ac_try" in
2586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2587 *) ac_try_echo=$ac_try;;
2588esac
2589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2590 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 ac_status=$?
2592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2593 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002594{ (ac_try="$ac_compiler -V >&5"
2595case "(($ac_try" in
2596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2597 *) ac_try_echo=$ac_try;;
2598esac
2599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2600 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002601 ac_status=$?
2602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2603 (exit $ac_status); }
2604
2605cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002606/* confdefs.h. */
2607_ACEOF
2608cat confdefs.h >>conftest.$ac_ext
2609cat >>conftest.$ac_ext <<_ACEOF
2610/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612int
2613main ()
2614{
2615
2616 ;
2617 return 0;
2618}
2619_ACEOF
2620ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002621ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002622# Try to create an executable without -o first, disregard a.out.
2623# It will help us diagnose broken compilers, and finding out an intuition
2624# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2626echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002627ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628#
2629# List of possible output files, starting from the most likely.
2630# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2631# only as a last resort. b.out is created by i960 compilers.
2632ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2633#
2634# The IRIX 6 linker writes into existing files which may not be
2635# executable, retaining their permissions. Remove them first so a
2636# subsequent execution test works.
2637ac_rmfiles=
2638for ac_file in $ac_files
2639do
2640 case $ac_file in
2641 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2642 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2643 esac
2644done
2645rm -f $ac_rmfiles
2646
2647if { (ac_try="$ac_link_default"
2648case "(($ac_try" in
2649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2650 *) ac_try_echo=$ac_try;;
2651esac
2652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2653 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 ac_status=$?
2655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2656 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002657 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2658# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2659# in a Makefile. We should not override ac_cv_exeext if it was cached,
2660# so that the user can short-circuit this test for compilers unknown to
2661# Autoconf.
2662for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002663do
2664 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002666 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002667 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002668 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002669 # We found the default executable, but exeext='' is most
2670 # certainly right.
2671 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002672 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002673 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2674 then :; else
2675 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2676 fi
2677 # We set ac_cv_exeext here because the later test for it is not
2678 # safe: cross compilers may not add the suffix if given an `-o'
2679 # argument, so we may need to know it at that point already.
2680 # Even if this section looks crufty: it has the advantage of
2681 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002682 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002683 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002684 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 esac
2686done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687test "$ac_cv_exeext" = no && ac_cv_exeext=
2688
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002689else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002690 ac_file=''
2691fi
2692
2693{ echo "$as_me:$LINENO: result: $ac_file" >&5
2694echo "${ECHO_T}$ac_file" >&6; }
2695if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002697sed 's/^/| /' conftest.$ac_ext >&5
2698
2699{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2700See \`config.log' for more details." >&5
2701echo "$as_me: error: C compiler cannot create executables
2702See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002704fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002707
Martin v. Löwiseba40652007-08-30 20:10:57 +00002708# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002709# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002710{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2711echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002712# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2713# If not cross compiling, check that we can run a simple program.
2714if test "$cross_compiling" != yes; then
2715 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716 { (case "(($ac_try" in
2717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2718 *) ac_try_echo=$ac_try;;
2719esac
2720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2721 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 ac_status=$?
2723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2724 (exit $ac_status); }; }; then
2725 cross_compiling=no
2726 else
2727 if test "$cross_compiling" = maybe; then
2728 cross_compiling=yes
2729 else
2730 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002731If you meant to cross compile, use \`--host'.
2732See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002734If you meant to cross compile, use \`--host'.
2735See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 { (exit 1); exit 1; }; }
2737 fi
2738 fi
2739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002740{ echo "$as_me:$LINENO: result: yes" >&5
2741echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002742
Skip Montanaro6dead952003-09-25 14:50:04 +00002743rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002744ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002745# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002746# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002747{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2748echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2749{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2750echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002751
Martin v. Löwiseba40652007-08-30 20:10:57 +00002752{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2753echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2754if { (ac_try="$ac_link"
2755case "(($ac_try" in
2756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2757 *) ac_try_echo=$ac_try;;
2758esac
2759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2760 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_status=$?
2762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2763 (exit $ac_status); }; then
2764 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2765# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2766# work properly (i.e., refer to `conftest.exe'), while it won't with
2767# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002768for ac_file in conftest.exe conftest conftest.*; do
2769 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002771 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002772 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002773 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 * ) break;;
2775 esac
2776done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002777else
Skip Montanaro6dead952003-09-25 14:50:04 +00002778 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2779See \`config.log' for more details." >&5
2780echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2781See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002783fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002784
Martin v. Löwis11437992002-04-12 09:54:03 +00002785rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2787echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002788
2789rm -f conftest.$ac_ext
2790EXEEXT=$ac_cv_exeext
2791ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002792{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2793echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002794if test "${ac_cv_objext+set}" = set; then
2795 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002796else
Martin v. Löwis11437992002-04-12 09:54:03 +00002797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002798/* confdefs.h. */
2799_ACEOF
2800cat confdefs.h >>conftest.$ac_ext
2801cat >>conftest.$ac_ext <<_ACEOF
2802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002803
Martin v. Löwis11437992002-04-12 09:54:03 +00002804int
2805main ()
2806{
2807
2808 ;
2809 return 0;
2810}
2811_ACEOF
2812rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002813if { (ac_try="$ac_compile"
2814case "(($ac_try" in
2815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2816 *) ac_try_echo=$ac_try;;
2817esac
2818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2819 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002820 ac_status=$?
2821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2822 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002823 for ac_file in conftest.o conftest.obj conftest.*; do
2824 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002825 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002826 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002827 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2828 break;;
2829 esac
2830done
2831else
2832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002833sed 's/^/| /' conftest.$ac_ext >&5
2834
2835{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2836See \`config.log' for more details." >&5
2837echo "$as_me: error: cannot compute suffix of object files: cannot compile
2838See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 { (exit 1); exit 1; }; }
2840fi
2841
2842rm -f conftest.$ac_cv_objext conftest.$ac_ext
2843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002844{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2845echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002846OBJEXT=$ac_cv_objext
2847ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002848{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2849echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002850if test "${ac_cv_c_compiler_gnu+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
2852else
2853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002854/* confdefs.h. */
2855_ACEOF
2856cat confdefs.h >>conftest.$ac_ext
2857cat >>conftest.$ac_ext <<_ACEOF
2858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002859
Martin v. Löwis11437992002-04-12 09:54:03 +00002860int
2861main ()
2862{
2863#ifndef __GNUC__
2864 choke me
2865#endif
2866
2867 ;
2868 return 0;
2869}
2870_ACEOF
2871rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002872if { (ac_try="$ac_compile"
2873case "(($ac_try" in
2874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2875 *) ac_try_echo=$ac_try;;
2876esac
2877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002880 grep -v '^ *+' conftest.er1 >conftest.err
2881 rm -f conftest.er1
2882 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002884 (exit $ac_status); } && {
2885 test -z "$ac_c_werror_flag" ||
2886 test ! -s conftest.err
2887 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 ac_compiler_gnu=yes
2889else
2890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002891sed 's/^/| /' conftest.$ac_ext >&5
2892
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002895
2896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002897ac_cv_c_compiler_gnu=$ac_compiler_gnu
2898
2899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002900{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2901echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002902GCC=`test $ac_compiler_gnu = yes && echo yes`
2903ac_test_CFLAGS=${CFLAGS+set}
2904ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002905{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2906echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002907if test "${ac_cv_prog_cc_g+set}" = set; then
2908 echo $ECHO_N "(cached) $ECHO_C" >&6
2909else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002910 ac_save_c_werror_flag=$ac_c_werror_flag
2911 ac_c_werror_flag=yes
2912 ac_cv_prog_cc_g=no
2913 CFLAGS="-g"
2914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002915/* confdefs.h. */
2916_ACEOF
2917cat confdefs.h >>conftest.$ac_ext
2918cat >>conftest.$ac_ext <<_ACEOF
2919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002920
Martin v. Löwis11437992002-04-12 09:54:03 +00002921int
2922main ()
2923{
2924
2925 ;
2926 return 0;
2927}
2928_ACEOF
2929rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002930if { (ac_try="$ac_compile"
2931case "(($ac_try" in
2932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933 *) ac_try_echo=$ac_try;;
2934esac
2935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002938 grep -v '^ *+' conftest.er1 >conftest.err
2939 rm -f conftest.er1
2940 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002942 (exit $ac_status); } && {
2943 test -z "$ac_c_werror_flag" ||
2944 test ! -s conftest.err
2945 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002946 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002947else
Martin v. Löwis11437992002-04-12 09:54:03 +00002948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002949sed 's/^/| /' conftest.$ac_ext >&5
2950
Martin v. Löwiseba40652007-08-30 20:10:57 +00002951 CFLAGS=""
2952 cat >conftest.$ac_ext <<_ACEOF
2953/* confdefs.h. */
2954_ACEOF
2955cat confdefs.h >>conftest.$ac_ext
2956cat >>conftest.$ac_ext <<_ACEOF
2957/* end confdefs.h. */
2958
2959int
2960main ()
2961{
2962
2963 ;
2964 return 0;
2965}
2966_ACEOF
2967rm -f conftest.$ac_objext
2968if { (ac_try="$ac_compile"
2969case "(($ac_try" in
2970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2971 *) ac_try_echo=$ac_try;;
2972esac
2973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2974 (eval "$ac_compile") 2>conftest.er1
2975 ac_status=$?
2976 grep -v '^ *+' conftest.er1 >conftest.err
2977 rm -f conftest.er1
2978 cat conftest.err >&5
2979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2980 (exit $ac_status); } && {
2981 test -z "$ac_c_werror_flag" ||
2982 test ! -s conftest.err
2983 } && test -s conftest.$ac_objext; then
2984 :
2985else
2986 echo "$as_me: failed program was:" >&5
2987sed 's/^/| /' conftest.$ac_ext >&5
2988
2989 ac_c_werror_flag=$ac_save_c_werror_flag
2990 CFLAGS="-g"
2991 cat >conftest.$ac_ext <<_ACEOF
2992/* confdefs.h. */
2993_ACEOF
2994cat confdefs.h >>conftest.$ac_ext
2995cat >>conftest.$ac_ext <<_ACEOF
2996/* end confdefs.h. */
2997
2998int
2999main ()
3000{
3001
3002 ;
3003 return 0;
3004}
3005_ACEOF
3006rm -f conftest.$ac_objext
3007if { (ac_try="$ac_compile"
3008case "(($ac_try" in
3009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3010 *) ac_try_echo=$ac_try;;
3011esac
3012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3013 (eval "$ac_compile") 2>conftest.er1
3014 ac_status=$?
3015 grep -v '^ *+' conftest.er1 >conftest.err
3016 rm -f conftest.er1
3017 cat conftest.err >&5
3018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3019 (exit $ac_status); } && {
3020 test -z "$ac_c_werror_flag" ||
3021 test ! -s conftest.err
3022 } && test -s conftest.$ac_objext; then
3023 ac_cv_prog_cc_g=yes
3024else
3025 echo "$as_me: failed program was:" >&5
3026sed 's/^/| /' conftest.$ac_ext >&5
3027
3028
Guido van Rossum627b2d71993-12-24 10:39:16 +00003029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003030
3031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033
3034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3035fi
3036
3037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3038 ac_c_werror_flag=$ac_save_c_werror_flag
3039fi
3040{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3041echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003042if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003043 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003044elif test $ac_cv_prog_cc_g = yes; then
3045 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003046 CFLAGS="-g -O2"
3047 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003048 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003049 fi
3050else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003051 if test "$GCC" = yes; then
3052 CFLAGS="-O2"
3053 else
3054 CFLAGS=
3055 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003057{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3058echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3059if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003060 echo $ECHO_N "(cached) $ECHO_C" >&6
3061else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003062 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003063ac_save_CC=$CC
3064cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003065/* confdefs.h. */
3066_ACEOF
3067cat confdefs.h >>conftest.$ac_ext
3068cat >>conftest.$ac_ext <<_ACEOF
3069/* end confdefs.h. */
3070#include <stdarg.h>
3071#include <stdio.h>
3072#include <sys/types.h>
3073#include <sys/stat.h>
3074/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3075struct buf { int x; };
3076FILE * (*rcsopen) (struct buf *, struct stat *, int);
3077static char *e (p, i)
3078 char **p;
3079 int i;
3080{
3081 return p[i];
3082}
3083static char *f (char * (*g) (char **, int), char **p, ...)
3084{
3085 char *s;
3086 va_list v;
3087 va_start (v,p);
3088 s = g (p, va_arg (v,int));
3089 va_end (v);
3090 return s;
3091}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003092
3093/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3094 function prototypes and stuff, but not '\xHH' hex character constants.
3095 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003097 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3098 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003100int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3101
Martin v. Löwiseba40652007-08-30 20:10:57 +00003102/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3103 inside strings and character constants. */
3104#define FOO(x) 'x'
3105int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3106
Skip Montanaro6dead952003-09-25 14:50:04 +00003107int test (int i, double x);
3108struct s1 {int (*f) (int a);};
3109struct s2 {int (*f) (double a);};
3110int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3111int argc;
3112char **argv;
3113int
3114main ()
3115{
3116return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3117 ;
3118 return 0;
3119}
3120_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003121for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3122 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003123do
3124 CC="$ac_save_CC $ac_arg"
3125 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003126if { (ac_try="$ac_compile"
3127case "(($ac_try" in
3128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3129 *) ac_try_echo=$ac_try;;
3130esac
3131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3132 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003134 grep -v '^ *+' conftest.er1 >conftest.err
3135 rm -f conftest.er1
3136 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003138 (exit $ac_status); } && {
3139 test -z "$ac_c_werror_flag" ||
3140 test ! -s conftest.err
3141 } && test -s conftest.$ac_objext; then
3142 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003143else
3144 echo "$as_me: failed program was:" >&5
3145sed 's/^/| /' conftest.$ac_ext >&5
3146
Martin v. Löwiseba40652007-08-30 20:10:57 +00003147
Skip Montanaro6dead952003-09-25 14:50:04 +00003148fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003149
3150rm -f core conftest.err conftest.$ac_objext
3151 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003152done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003153rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003154CC=$ac_save_CC
3155
3156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157# AC_CACHE_VAL
3158case "x$ac_cv_prog_cc_c89" in
3159 x)
3160 { echo "$as_me:$LINENO: result: none needed" >&5
3161echo "${ECHO_T}none needed" >&6; } ;;
3162 xno)
3163 { echo "$as_me:$LINENO: result: unsupported" >&5
3164echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003165 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003166 CC="$CC $ac_cv_prog_cc_c89"
3167 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3168echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003169esac
3170
Skip Montanaro6dead952003-09-25 14:50:04 +00003171
Martin v. Löwis11437992002-04-12 09:54:03 +00003172ac_ext=c
3173ac_cpp='$CPP $CPPFLAGS'
3174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3176ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003177
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003178
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003179
3180
Martin v. Löwiseba40652007-08-30 20:10:57 +00003181{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3182echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003183
Martin v. Löwiseba40652007-08-30 20:10:57 +00003184# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003185if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003186 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003187
3188 case $withval in
3189 no) with_cxx_main=no
3190 MAINCC='$(CC)';;
3191 yes) with_cxx_main=yes
3192 MAINCC='$(CXX)';;
3193 *) with_cxx_main=yes
3194 MAINCC=$withval
3195 if test -z "$CXX"
3196 then
3197 CXX=$withval
3198 fi;;
3199 esac
3200else
3201
3202 with_cxx_main=no
3203 MAINCC='$(CC)'
3204
Martin v. Löwiseba40652007-08-30 20:10:57 +00003205fi
3206
3207{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3208echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003209
3210preset_cxx="$CXX"
3211if test -z "$CXX"
3212then
3213 case "$CC" in
3214 gcc) # Extract the first word of "g++", so it can be a program name with args.
3215set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3217echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003218if test "${ac_cv_path_CXX+set}" = set; then
3219 echo $ECHO_N "(cached) $ECHO_C" >&6
3220else
3221 case $CXX in
3222 [\\/]* | ?:[\\/]*)
3223 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3224 ;;
3225 *)
3226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3227for as_dir in notfound
3228do
3229 IFS=$as_save_IFS
3230 test -z "$as_dir" && as_dir=.
3231 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232 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 +00003233 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3234 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3235 break 2
3236 fi
3237done
3238done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003239IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003240
3241 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3242 ;;
3243esac
3244fi
3245CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003246if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003247 { echo "$as_me:$LINENO: result: $CXX" >&5
3248echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003249else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250 { echo "$as_me:$LINENO: result: no" >&5
3251echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003253
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003254 ;;
3255 cc) # Extract the first word of "c++", so it can be a program name with args.
3256set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003257{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3258echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003259if test "${ac_cv_path_CXX+set}" = set; then
3260 echo $ECHO_N "(cached) $ECHO_C" >&6
3261else
3262 case $CXX in
3263 [\\/]* | ?:[\\/]*)
3264 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3265 ;;
3266 *)
3267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268for as_dir in notfound
3269do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
3272 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003273 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 +00003274 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3275 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3276 break 2
3277 fi
3278done
3279done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003280IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281
3282 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3283 ;;
3284esac
3285fi
3286CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003287if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003288 { echo "$as_me:$LINENO: result: $CXX" >&5
3289echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003290else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003291 { echo "$as_me:$LINENO: result: no" >&5
3292echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003294
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003295 ;;
3296 esac
3297 if test "$CXX" = "notfound"
3298 then
3299 CXX=""
3300 fi
3301fi
3302if test -z "$CXX"
3303then
3304 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3305do
3306 # Extract the first word of "$ac_prog", so it can be a program name with args.
3307set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003308{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003310if test "${ac_cv_prog_CXX+set}" = set; then
3311 echo $ECHO_N "(cached) $ECHO_C" >&6
3312else
3313 if test -n "$CXX"; then
3314 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3315else
3316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3317for as_dir in $PATH
3318do
3319 IFS=$as_save_IFS
3320 test -z "$as_dir" && as_dir=.
3321 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003322 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 +00003323 ac_cv_prog_CXX="$ac_prog"
3324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3325 break 2
3326 fi
3327done
3328done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003329IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003330
3331fi
3332fi
3333CXX=$ac_cv_prog_CXX
3334if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003335 { echo "$as_me:$LINENO: result: $CXX" >&5
3336echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003337else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003338 { echo "$as_me:$LINENO: result: no" >&5
3339echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003340fi
3341
Martin v. Löwiseba40652007-08-30 20:10:57 +00003342
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003343 test -n "$CXX" && break
3344done
3345test -n "$CXX" || CXX="notfound"
3346
3347 if test "$CXX" = "notfound"
3348 then
3349 CXX=""
3350 fi
3351fi
3352if test "$preset_cxx" != "$CXX"
3353then
3354 { echo "$as_me:$LINENO: WARNING:
3355
3356 By default, distutils will build C++ extension modules with \"$CXX\".
3357 If this is not intended, then set CXX on the configure command line.
3358 " >&5
3359echo "$as_me: WARNING:
3360
3361 By default, distutils will build C++ extension modules with \"$CXX\".
3362 If this is not intended, then set CXX on the configure command line.
3363 " >&2;}
3364fi
3365
3366
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003367# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003368
3369ac_ext=c
3370ac_cpp='$CPP $CPPFLAGS'
3371ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3372ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3373ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003374{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3375echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003376# On Suns, sometimes $CPP names a directory.
3377if test -n "$CPP" && test -d "$CPP"; then
3378 CPP=
3379fi
3380if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003381 if test "${ac_cv_prog_CPP+set}" = set; then
3382 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003383else
Martin v. Löwis11437992002-04-12 09:54:03 +00003384 # Double quotes because CPP needs to be expanded
3385 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3386 do
3387 ac_preproc_ok=false
3388for ac_c_preproc_warn_flag in '' yes
3389do
3390 # Use a header file that comes with gcc, so configuring glibc
3391 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003392 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3393 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003394 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003395 # not just through cpp. "Syntax error" is here to catch this case.
3396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003397/* confdefs.h. */
3398_ACEOF
3399cat confdefs.h >>conftest.$ac_ext
3400cat >>conftest.$ac_ext <<_ACEOF
3401/* end confdefs.h. */
3402#ifdef __STDC__
3403# include <limits.h>
3404#else
3405# include <assert.h>
3406#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003407 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003408_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003409if { (ac_try="$ac_cpp conftest.$ac_ext"
3410case "(($ac_try" in
3411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3412 *) ac_try_echo=$ac_try;;
3413esac
3414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3415 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003416 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003417 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003418 rm -f conftest.er1
3419 cat conftest.err >&5
3420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003421 (exit $ac_status); } >/dev/null && {
3422 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3423 test ! -s conftest.err
3424 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003425 :
3426else
Martin v. Löwis11437992002-04-12 09:54:03 +00003427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003428sed 's/^/| /' conftest.$ac_ext >&5
3429
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 # Broken: fails on valid input.
3431continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003433
Martin v. Löwis11437992002-04-12 09:54:03 +00003434rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003435
Martin v. Löwiseba40652007-08-30 20:10:57 +00003436 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 # can be detected and how.
3438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003439/* confdefs.h. */
3440_ACEOF
3441cat confdefs.h >>conftest.$ac_ext
3442cat >>conftest.$ac_ext <<_ACEOF
3443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003444#include <ac_nonexistent.h>
3445_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003446if { (ac_try="$ac_cpp conftest.$ac_ext"
3447case "(($ac_try" in
3448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3449 *) ac_try_echo=$ac_try;;
3450esac
3451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3452 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003453 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003454 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003455 rm -f conftest.er1
3456 cat conftest.err >&5
3457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003458 (exit $ac_status); } >/dev/null && {
3459 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3460 test ! -s conftest.err
3461 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003462 # Broken: success on invalid input.
3463continue
3464else
3465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003466sed 's/^/| /' conftest.$ac_ext >&5
3467
Martin v. Löwis11437992002-04-12 09:54:03 +00003468 # Passes both tests.
3469ac_preproc_ok=:
3470break
3471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003472
Martin v. Löwis11437992002-04-12 09:54:03 +00003473rm -f conftest.err conftest.$ac_ext
3474
3475done
3476# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3477rm -f conftest.err conftest.$ac_ext
3478if $ac_preproc_ok; then
3479 break
3480fi
3481
3482 done
3483 ac_cv_prog_CPP=$CPP
3484
3485fi
3486 CPP=$ac_cv_prog_CPP
3487else
3488 ac_cv_prog_CPP=$CPP
3489fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003490{ echo "$as_me:$LINENO: result: $CPP" >&5
3491echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003492ac_preproc_ok=false
3493for ac_c_preproc_warn_flag in '' yes
3494do
3495 # Use a header file that comes with gcc, so configuring glibc
3496 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003497 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3498 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 # On the NeXT, cc -E runs the code through the compiler's parser,
3500 # not just through cpp. "Syntax error" is here to catch this case.
3501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003502/* confdefs.h. */
3503_ACEOF
3504cat confdefs.h >>conftest.$ac_ext
3505cat >>conftest.$ac_ext <<_ACEOF
3506/* end confdefs.h. */
3507#ifdef __STDC__
3508# include <limits.h>
3509#else
3510# include <assert.h>
3511#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003512 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003513_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514if { (ac_try="$ac_cpp conftest.$ac_ext"
3515case "(($ac_try" in
3516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3517 *) ac_try_echo=$ac_try;;
3518esac
3519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3520 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003522 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 rm -f conftest.er1
3524 cat conftest.err >&5
3525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003526 (exit $ac_status); } >/dev/null && {
3527 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3528 test ! -s conftest.err
3529 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 :
3531else
3532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003533sed 's/^/| /' conftest.$ac_ext >&5
3534
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 # Broken: fails on valid input.
3536continue
3537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003538
Martin v. Löwis11437992002-04-12 09:54:03 +00003539rm -f conftest.err conftest.$ac_ext
3540
Martin v. Löwiseba40652007-08-30 20:10:57 +00003541 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # can be detected and how.
3543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003544/* confdefs.h. */
3545_ACEOF
3546cat confdefs.h >>conftest.$ac_ext
3547cat >>conftest.$ac_ext <<_ACEOF
3548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003549#include <ac_nonexistent.h>
3550_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003551if { (ac_try="$ac_cpp conftest.$ac_ext"
3552case "(($ac_try" in
3553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3554 *) ac_try_echo=$ac_try;;
3555esac
3556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3557 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003558 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003559 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003560 rm -f conftest.er1
3561 cat conftest.err >&5
3562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003563 (exit $ac_status); } >/dev/null && {
3564 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3565 test ! -s conftest.err
3566 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003567 # Broken: success on invalid input.
3568continue
3569else
3570 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003571sed 's/^/| /' conftest.$ac_ext >&5
3572
Martin v. Löwis11437992002-04-12 09:54:03 +00003573 # Passes both tests.
3574ac_preproc_ok=:
3575break
3576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003577
Martin v. Löwis11437992002-04-12 09:54:03 +00003578rm -f conftest.err conftest.$ac_ext
3579
3580done
3581# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3582rm -f conftest.err conftest.$ac_ext
3583if $ac_preproc_ok; then
3584 :
3585else
Skip Montanaro6dead952003-09-25 14:50:04 +00003586 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3587See \`config.log' for more details." >&5
3588echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3589See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003590 { (exit 1); exit 1; }; }
3591fi
3592
3593ac_ext=c
3594ac_cpp='$CPP $CPPFLAGS'
3595ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3596ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3597ac_compiler_gnu=$ac_cv_c_compiler_gnu
3598
3599
Martin v. Löwiseba40652007-08-30 20:10:57 +00003600{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3601echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3602if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003603 echo $ECHO_N "(cached) $ECHO_C" >&6
3604else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003605 # Extract the first word of "grep ggrep" to use in msg output
3606if test -z "$GREP"; then
3607set dummy grep ggrep; ac_prog_name=$2
3608if test "${ac_cv_path_GREP+set}" = set; then
3609 echo $ECHO_N "(cached) $ECHO_C" >&6
3610else
3611 ac_path_GREP_found=false
3612# Loop through the user's path and test for each of PROGNAME-LIST
3613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3614for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3615do
3616 IFS=$as_save_IFS
3617 test -z "$as_dir" && as_dir=.
3618 for ac_prog in grep ggrep; do
3619 for ac_exec_ext in '' $ac_executable_extensions; do
3620 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3621 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3622 # Check for GNU ac_path_GREP and select it if it is found.
3623 # Check for GNU $ac_path_GREP
3624case `"$ac_path_GREP" --version 2>&1` in
3625*GNU*)
3626 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3627*)
3628 ac_count=0
3629 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3630 while :
3631 do
3632 cat "conftest.in" "conftest.in" >"conftest.tmp"
3633 mv "conftest.tmp" "conftest.in"
3634 cp "conftest.in" "conftest.nl"
3635 echo 'GREP' >> "conftest.nl"
3636 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3637 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3638 ac_count=`expr $ac_count + 1`
3639 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3640 # Best one so far, save it but keep looking for a better one
3641 ac_cv_path_GREP="$ac_path_GREP"
3642 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003643 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003644 # 10*(2^10) chars as input seems more than enough
3645 test $ac_count -gt 10 && break
3646 done
3647 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3648esac
3649
3650
3651 $ac_path_GREP_found && break 3
3652 done
3653done
3654
3655done
3656IFS=$as_save_IFS
3657
3658
Skip Montanaro6dead952003-09-25 14:50:04 +00003659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003660
3661GREP="$ac_cv_path_GREP"
3662if test -z "$GREP"; then
3663 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3664echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3665 { (exit 1); exit 1; }; }
3666fi
3667
3668else
3669 ac_cv_path_GREP=$GREP
3670fi
3671
3672
3673fi
3674{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3675echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3676 GREP="$ac_cv_path_GREP"
3677
3678
3679{ echo "$as_me:$LINENO: checking for egrep" >&5
3680echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3681if test "${ac_cv_path_EGREP+set}" = set; then
3682 echo $ECHO_N "(cached) $ECHO_C" >&6
3683else
3684 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3685 then ac_cv_path_EGREP="$GREP -E"
3686 else
3687 # Extract the first word of "egrep" to use in msg output
3688if test -z "$EGREP"; then
3689set dummy egrep; ac_prog_name=$2
3690if test "${ac_cv_path_EGREP+set}" = set; then
3691 echo $ECHO_N "(cached) $ECHO_C" >&6
3692else
3693 ac_path_EGREP_found=false
3694# Loop through the user's path and test for each of PROGNAME-LIST
3695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3696for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3697do
3698 IFS=$as_save_IFS
3699 test -z "$as_dir" && as_dir=.
3700 for ac_prog in egrep; do
3701 for ac_exec_ext in '' $ac_executable_extensions; do
3702 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3703 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3704 # Check for GNU ac_path_EGREP and select it if it is found.
3705 # Check for GNU $ac_path_EGREP
3706case `"$ac_path_EGREP" --version 2>&1` in
3707*GNU*)
3708 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3709*)
3710 ac_count=0
3711 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3712 while :
3713 do
3714 cat "conftest.in" "conftest.in" >"conftest.tmp"
3715 mv "conftest.tmp" "conftest.in"
3716 cp "conftest.in" "conftest.nl"
3717 echo 'EGREP' >> "conftest.nl"
3718 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3719 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3720 ac_count=`expr $ac_count + 1`
3721 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3722 # Best one so far, save it but keep looking for a better one
3723 ac_cv_path_EGREP="$ac_path_EGREP"
3724 ac_path_EGREP_max=$ac_count
3725 fi
3726 # 10*(2^10) chars as input seems more than enough
3727 test $ac_count -gt 10 && break
3728 done
3729 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3730esac
3731
3732
3733 $ac_path_EGREP_found && break 3
3734 done
3735done
3736
3737done
3738IFS=$as_save_IFS
3739
3740
3741fi
3742
3743EGREP="$ac_cv_path_EGREP"
3744if test -z "$EGREP"; then
3745 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3746echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3747 { (exit 1); exit 1; }; }
3748fi
3749
3750else
3751 ac_cv_path_EGREP=$EGREP
3752fi
3753
3754
3755 fi
3756fi
3757{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3758echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3759 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003760
3761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763{ echo "$as_me:$LINENO: checking for AIX" >&5
3764echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003766/* confdefs.h. */
3767_ACEOF
3768cat confdefs.h >>conftest.$ac_ext
3769cat >>conftest.$ac_ext <<_ACEOF
3770/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003771#ifdef _AIX
3772 yes
3773#endif
3774
Martin v. Löwis11437992002-04-12 09:54:03 +00003775_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003777 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003778 { echo "$as_me:$LINENO: result: yes" >&5
3779echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003780cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003781#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003782_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003783
3784else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003785 { echo "$as_me:$LINENO: result: no" >&5
3786echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003787fi
3788rm -f conftest*
3789
Michael W. Hudson54241132001-12-07 15:38:26 +00003790
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003791
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003792# Check for unsupported systems
3793case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003794atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003795 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3796 echo See README for details.
3797 exit 1;;
3798esac
3799
Michael W. Hudson54241132001-12-07 15:38:26 +00003800
Martin v. Löwiseba40652007-08-30 20:10:57 +00003801{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3802echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003803
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003805if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003807 case $withval in
3808 no) EXEEXT=;;
3809 yes) EXEEXT=.exe;;
3810 *) EXEEXT=$withval;;
3811 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003812fi
3813
3814{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3815echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003816
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003817# Test whether we're running on a non-case-sensitive system, in which
3818# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003819
Martin v. Löwiseba40652007-08-30 20:10:57 +00003820{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3821echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003822if test ! -d CaseSensitiveTestDir; then
3823mkdir CaseSensitiveTestDir
3824fi
3825
3826if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003827then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003828 { echo "$as_me:$LINENO: result: yes" >&5
3829echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003830 BUILDEXEEXT=.exe
3831else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003832 { echo "$as_me:$LINENO: result: no" >&5
3833echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003834 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003835fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003836rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003837
Guido van Rossumdd997f71998-10-07 19:58:26 +00003838case $MACHDEP in
3839bsdos*)
3840 case $CC in
3841 gcc) CC="$CC -D_HAVE_BSDI";;
3842 esac;;
3843esac
3844
Guido van Rossum24b1e751997-08-21 02:29:16 +00003845case $ac_sys_system in
3846hp*|HP*)
3847 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003848 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003849 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003850Monterey*)
3851 case $CC in
3852 cc) CC="$CC -Wl,-Bexport";;
3853 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003854SunOS*)
3855 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003856
3857cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003858#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003859_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003860
3861 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003862esac
3863
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
3865
Martin v. Löwiseba40652007-08-30 20:10:57 +00003866{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3867echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003868if test -z "$LIBRARY"
3869then
3870 LIBRARY='libpython$(VERSION).a'
3871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003872{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3873echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003874
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003875# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003876# name of the library into which to insert object files). BLDLIBRARY is also
3877# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3878# is blank as the main program is not linked directly against LDLIBRARY.
3879# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3880# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3881# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3882# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003883#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003884# RUNSHARED is used to run shared python without installed libraries
3885#
3886# INSTSONAME is the name of the shared library that will be use to install
3887# on the system - some systems like version suffix, others don't
3888
3889
Michael W. Hudson54241132001-12-07 15:38:26 +00003890
3891
3892
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003893
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003894LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003895BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003896INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003897DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003898LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003899RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003900
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003901# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003902# If CXX is set, and if it is needed to link a main function that was
3903# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3904# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003905# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003906# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003907
Martin v. Löwiseba40652007-08-30 20:10:57 +00003908{ echo "$as_me:$LINENO: checking LINKCC" >&5
3909echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003910if test -z "$LINKCC"
3911then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003912 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003913 case $ac_sys_system in
3914 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003915 exp_extra="\"\""
3916 if test $ac_sys_release -ge 5 -o \
3917 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3918 exp_extra="."
3919 fi
3920 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003921 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003922 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003923 esac
3924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3926echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003927
Martin v. Löwiseba40652007-08-30 20:10:57 +00003928{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3929echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3930# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003931if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003932 enableval=$enable_shared;
3933fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003934
Martin v. Löwis1142de32002-03-29 16:28:31 +00003935
3936if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003937then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003938 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003939 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003940 enable_shared="yes";;
3941 *)
3942 enable_shared="no";;
3943 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003944fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3946echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003947
Martin v. Löwiseba40652007-08-30 20:10:57 +00003948{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3949echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3950# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003951if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003952 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003953 CC="$CC -pg"
3954 if test "$cross_compiling" = yes; then
3955 ac_enable_profiling="no"
3956else
3957 cat >conftest.$ac_ext <<_ACEOF
3958/* confdefs.h. */
3959_ACEOF
3960cat confdefs.h >>conftest.$ac_ext
3961cat >>conftest.$ac_ext <<_ACEOF
3962/* end confdefs.h. */
3963int main() { return 0; }
3964_ACEOF
3965rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003966if { (ac_try="$ac_link"
3967case "(($ac_try" in
3968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3969 *) ac_try_echo=$ac_try;;
3970esac
3971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3972 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003973 ac_status=$?
3974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3975 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003976 { (case "(($ac_try" in
3977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3978 *) ac_try_echo=$ac_try;;
3979esac
3980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3981 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003982 ac_status=$?
3983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3984 (exit $ac_status); }; }; then
3985 ac_enable_profiling="yes"
3986else
3987 echo "$as_me: program exited with status $ac_status" >&5
3988echo "$as_me: failed program was:" >&5
3989sed 's/^/| /' conftest.$ac_ext >&5
3990
3991( exit $ac_status )
3992ac_enable_profiling="no"
3993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003994rm -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 +00003995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003996
3997
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003998 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003999fi
4000
4001{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4002echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004003
4004case "$ac_enable_profiling" in
4005 "yes")
4006 BASECFLAGS="-pg $BASECFLAGS"
4007 LDFLAGS="-pg $LDFLAGS"
4008 ;;
4009esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004010
Martin v. Löwiseba40652007-08-30 20:10:57 +00004011{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4012echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004013
Guido van Rossumb8552162001-09-05 14:58:11 +00004014# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4015# library that we build, but we do not want to link against it (we
4016# will find it with a -framework option). For this reason there is an
4017# extra variable BLDLIBRARY against which Python and the extension
4018# modules are linked, BLDLIBRARY. This is normally the same as
4019# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004020if test "$enable_framework"
4021then
4022 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004023 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004024 BLDLIBRARY=''
4025else
4026 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004027fi
Jack Jansene578a632001-08-15 01:27:14 +00004028
Martin v. Löwis1142de32002-03-29 16:28:31 +00004029# Other platforms follow
4030if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004031
4032cat >>confdefs.h <<\_ACEOF
4033#define Py_ENABLE_SHARED 1
4034_ACEOF
4035
Martin v. Löwis1142de32002-03-29 16:28:31 +00004036 case $ac_sys_system in
4037 BeOS*)
4038 LDLIBRARY='libpython$(VERSION).so'
4039 ;;
4040 CYGWIN*)
4041 LDLIBRARY='libpython$(VERSION).dll.a'
4042 DLLLIBRARY='libpython$(VERSION).dll'
4043 ;;
4044 SunOS*)
4045 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004046 BLDLIBRARY='-Wl,-R,$(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öwis2389c412003-10-31 15:42:07 +00004048 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004049 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004050 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004051 LDLIBRARY='libpython$(VERSION).so'
4052 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004053 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004054 case $ac_sys_system in
4055 FreeBSD*)
4056 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4057 ;;
4058 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004059 INSTSONAME="$LDLIBRARY".$SOVERSION
4060 ;;
4061 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004062 case `uname -m` in
4063 ia64)
4064 LDLIBRARY='libpython$(VERSION).so'
4065 ;;
4066 *)
4067 LDLIBRARY='libpython$(VERSION).sl'
4068 ;;
4069 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004070 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004071 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004072 ;;
4073 OSF*)
4074 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004075 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004076 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004077 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004078 atheos*)
4079 LDLIBRARY='libpython$(VERSION).so'
4080 BLDLIBRARY='-L. -lpython$(VERSION)'
4081 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4082 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004083 esac
Jason Tishler30765592003-09-04 11:04:06 +00004084else # shared is disabled
4085 case $ac_sys_system in
4086 CYGWIN*)
4087 BLDLIBRARY='$(LIBRARY)'
4088 LDLIBRARY='libpython$(VERSION).dll.a'
4089 ;;
4090 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004091fi
4092
Martin v. Löwiseba40652007-08-30 20:10:57 +00004093{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4094echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004095
Martin v. Löwis11437992002-04-12 09:54:03 +00004096if test -n "$ac_tool_prefix"; then
4097 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4098set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004099{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4100echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004101if test "${ac_cv_prog_RANLIB+set}" = set; then
4102 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004103else
4104 if test -n "$RANLIB"; then
4105 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4106else
Martin v. Löwis11437992002-04-12 09:54:03 +00004107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4108for as_dir in $PATH
4109do
4110 IFS=$as_save_IFS
4111 test -z "$as_dir" && as_dir=.
4112 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004113 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 +00004114 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4115 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4116 break 2
4117 fi
4118done
4119done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004120IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004121
Guido van Rossum627b2d71993-12-24 10:39:16 +00004122fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004124RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004125if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004126 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4127echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004128else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004129 { echo "$as_me:$LINENO: result: no" >&5
4130echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004131fi
4132
Martin v. Löwiseba40652007-08-30 20:10:57 +00004133
Martin v. Löwis11437992002-04-12 09:54:03 +00004134fi
4135if test -z "$ac_cv_prog_RANLIB"; then
4136 ac_ct_RANLIB=$RANLIB
4137 # Extract the first word of "ranlib", so it can be a program name with args.
4138set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004139{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4140echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4142 echo $ECHO_N "(cached) $ECHO_C" >&6
4143else
4144 if test -n "$ac_ct_RANLIB"; then
4145 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4146else
4147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4148for as_dir in $PATH
4149do
4150 IFS=$as_save_IFS
4151 test -z "$as_dir" && as_dir=.
4152 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004153 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 +00004154 ac_cv_prog_ac_ct_RANLIB="ranlib"
4155 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4156 break 2
4157 fi
4158done
4159done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004160IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004161
Martin v. Löwis11437992002-04-12 09:54:03 +00004162fi
4163fi
4164ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4165if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004166 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4167echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004168else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004169 { echo "$as_me:$LINENO: result: no" >&5
4170echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
4172
Martin v. Löwiseba40652007-08-30 20:10:57 +00004173 if test "x$ac_ct_RANLIB" = x; then
4174 RANLIB=":"
4175 else
4176 case $cross_compiling:$ac_tool_warned in
4177yes:)
4178{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4179whose name does not start with the host triplet. If you think this
4180configuration is useful to you, please write to autoconf@gnu.org." >&5
4181echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4182whose name does not start with the host triplet. If you think this
4183configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4184ac_tool_warned=yes ;;
4185esac
4186 RANLIB=$ac_ct_RANLIB
4187 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004188else
4189 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004191
4192
Guido van Rossum7f43da71994-08-01 12:15:30 +00004193for ac_prog in ar aal
4194do
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004197{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4198echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004199if test "${ac_cv_prog_AR+set}" = set; then
4200 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201else
4202 if test -n "$AR"; then
4203 ac_cv_prog_AR="$AR" # Let the user override the test.
4204else
Martin v. Löwis11437992002-04-12 09:54:03 +00004205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4206for as_dir in $PATH
4207do
4208 IFS=$as_save_IFS
4209 test -z "$as_dir" && as_dir=.
4210 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211 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 +00004212 ac_cv_prog_AR="$ac_prog"
4213 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4214 break 2
4215 fi
4216done
4217done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004218IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004219
Guido van Rossum7f43da71994-08-01 12:15:30 +00004220fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004222AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004223if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224 { echo "$as_me:$LINENO: result: $AR" >&5
4225echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004226else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227 { echo "$as_me:$LINENO: result: no" >&5
4228echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004230
Martin v. Löwiseba40652007-08-30 20:10:57 +00004231
Martin v. Löwis11437992002-04-12 09:54:03 +00004232 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004233done
4234test -n "$AR" || AR="ar"
4235
Michael W. Hudson54241132001-12-07 15:38:26 +00004236
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004237
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004238# Extract the first word of "svnversion", so it can be a program name with args.
4239set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4241echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004242if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4243 echo $ECHO_N "(cached) $ECHO_C" >&6
4244else
4245 if test -n "$SVNVERSION"; then
4246 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4247else
4248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4249for as_dir in $PATH
4250do
4251 IFS=$as_save_IFS
4252 test -z "$as_dir" && as_dir=.
4253 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004254 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 +00004255 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004256 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4257 break 2
4258 fi
4259done
4260done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004261IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004262
Martin v. Löwisff600232006-04-03 19:12:32 +00004263 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004264fi
4265fi
4266SVNVERSION=$ac_cv_prog_SVNVERSION
4267if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4269echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004270else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271 { echo "$as_me:$LINENO: result: no" >&5
4272echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004273fi
4274
Martin v. Löwiseba40652007-08-30 20:10:57 +00004275
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004276if test $SVNVERSION = found
4277then
4278 SVNVERSION="svnversion \$(srcdir)"
4279else
4280 SVNVERSION="echo exported"
4281fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004282
Neil Schemenauera42c8272001-03-31 00:01:55 +00004283case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004284bsdos*|hp*|HP*)
4285 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004286 if test -z "$INSTALL"
4287 then
4288 INSTALL="${srcdir}/install-sh -c"
4289 fi
4290esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004291ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004292for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4293 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004294 ac_aux_dir=$ac_dir
4295 ac_install_sh="$ac_aux_dir/install-sh -c"
4296 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004297 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004298 ac_aux_dir=$ac_dir
4299 ac_install_sh="$ac_aux_dir/install.sh -c"
4300 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004301 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004302 ac_aux_dir=$ac_dir
4303 ac_install_sh="$ac_aux_dir/shtool install -c"
4304 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305 fi
4306done
4307if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004308 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4309echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004310 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004311fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004312
4313# These three variables are undocumented and unsupported,
4314# and are intended to be withdrawn in a future Autoconf release.
4315# They can cause serious problems if a builder's source tree is in a directory
4316# whose full name contains unusual characters.
4317ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4318ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4319ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4320
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004321
4322# Find a good install program. We prefer a C program (faster),
4323# so one script is as good as another. But avoid the broken or
4324# incompatible versions:
4325# SysV /etc/install, /usr/sbin/install
4326# SunOS /usr/etc/install
4327# IRIX /sbin/install
4328# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004329# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004330# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4331# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4332# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004333# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004334# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4336echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004337if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004338if test "${ac_cv_path_install+set}" = set; then
4339 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004340else
Martin v. Löwis11437992002-04-12 09:54:03 +00004341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4342for as_dir in $PATH
4343do
4344 IFS=$as_save_IFS
4345 test -z "$as_dir" && as_dir=.
4346 # Account for people who put trailing slashes in PATH elements.
4347case $as_dir/ in
4348 ./ | .// | /cC/* | \
4349 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004350 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004351 /usr/ucb/* ) ;;
4352 *)
4353 # OSF1 and SCO ODT 3.0 have their own names for install.
4354 # Don't use installbsd from OSF since it installs stuff as root
4355 # by default.
4356 for ac_prog in ginstall scoinst install; do
4357 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 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 +00004359 if test $ac_prog = install &&
4360 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4361 # AIX install. It has an incompatible calling convention.
4362 :
4363 elif test $ac_prog = install &&
4364 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4365 # program-specific install script used by HP pwplus--don't use.
4366 :
4367 else
4368 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4369 break 3
4370 fi
4371 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004372 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004373 done
4374 ;;
4375esac
4376done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004378
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004379
4380fi
4381 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004382 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004383 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004384 # As a last resort, use the slow shell script. Don't cache a
4385 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004386 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004387 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004388 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004389 fi
4390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4392echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004393
4394# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4395# It thinks the first close brace ends the variable substitution.
4396test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4397
Martin v. Löwis11437992002-04-12 09:54:03 +00004398test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004399
4400test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4401
Michael W. Hudson54241132001-12-07 15:38:26 +00004402
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004403# Not every filesystem supports hard links
4404
4405if test -z "$LN" ; then
4406 case $ac_sys_system in
4407 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004408 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004409 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004410 *) LN=ln;;
4411 esac
4412fi
4413
Fred Drake109d9862001-07-11 06:27:56 +00004414# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004415{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4416echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004417
Martin v. Löwiseba40652007-08-30 20:10:57 +00004418# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004419if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004420 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004421if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004422then
4423
4424cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004425#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004426_ACEOF
4427
Martin v. Löwiseba40652007-08-30 20:10:57 +00004428 { echo "$as_me:$LINENO: result: yes" >&5
4429echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004430 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004431else { echo "$as_me:$LINENO: result: no" >&5
4432echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004433fi
4434else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004435 { echo "$as_me:$LINENO: result: no" >&5
4436echo "${ECHO_T}no" >&6; }
4437fi
4438
Fred Drake109d9862001-07-11 06:27:56 +00004439
Skip Montanarodecc6a42003-01-01 20:07:49 +00004440# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4441# merged with this chunk of code?
4442
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004443# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004444# ------------------------
4445# (The following bit of code is complicated enough - please keep things
4446# indented properly. Just pretend you're editing Python code. ;-)
4447
4448# There are two parallel sets of case statements below, one that checks to
4449# see if OPT was set and one that does BASECFLAGS setting based upon
4450# compiler and platform. BASECFLAGS tweaks need to be made even if the
4451# user set OPT.
4452
4453# tweak OPT based on compiler and platform, only if the user didn't set
4454# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004455
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004456if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004457then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004458 case $GCC in
4459 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004460 if test "$CC" != 'g++' ; then
4461 STRICT_PROTO="-Wstrict-prototypes"
4462 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004463 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4464 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4465 WRAP="-fwrapv"
4466 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004467 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004468 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004469 if test "$Py_DEBUG" = 'true' ; then
4470 # Optimization messes up debuggers, so turn it off for
4471 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004472 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004473 else
Thomas Hellere5529592007-12-13 21:20:29 +00004474 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004475 fi
4476 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004477 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004478 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004479 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004480 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004481 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004482 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4483 ;;
4484 esac
Fred Drake109d9862001-07-11 06:27:56 +00004485 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004486
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004487 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004488 OPT="-O"
4489 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004490 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004491
4492 # The current (beta) Monterey compiler dies with optimizations
4493 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004494 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004495 Monterey*)
4496 OPT=""
4497 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004498 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004499
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004500fi
4501
Skip Montanarodecc6a42003-01-01 20:07:49 +00004502
4503# tweak BASECFLAGS based on compiler and platform
4504case $GCC in
4505yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004506 # Python violates C99 rules, by casting between incompatible
4507 # pointer types. GCC may generate bad code as a result of that,
4508 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004509 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4510echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004511 ac_save_cc="$CC"
4512 CC="$CC -fno-strict-aliasing"
4513 if test "$cross_compiling" = yes; then
4514 ac_cv_no_strict_aliasing_ok=no
4515else
4516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004517/* confdefs.h. */
4518_ACEOF
4519cat confdefs.h >>conftest.$ac_ext
4520cat >>conftest.$ac_ext <<_ACEOF
4521/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004522int main() { return 0; }
4523_ACEOF
4524rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004525if { (ac_try="$ac_link"
4526case "(($ac_try" in
4527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4528 *) ac_try_echo=$ac_try;;
4529esac
4530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4531 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004532 ac_status=$?
4533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004535 { (case "(($ac_try" in
4536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4537 *) ac_try_echo=$ac_try;;
4538esac
4539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4540 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004541 ac_status=$?
4542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4543 (exit $ac_status); }; }; then
4544 ac_cv_no_strict_aliasing_ok=yes
4545else
4546 echo "$as_me: program exited with status $ac_status" >&5
4547echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004548sed 's/^/| /' conftest.$ac_ext >&5
4549
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004550( exit $ac_status )
4551ac_cv_no_strict_aliasing_ok=no
4552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004553rm -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 +00004554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004555
4556
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004557 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004558 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4559echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004560 if test $ac_cv_no_strict_aliasing_ok = yes
4561 then
4562 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4563 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004564
4565 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4566 # support. Without this, treatment of subnormals doesn't follow
4567 # the standard.
4568 case $ac_sys_machine in
4569 alpha*)
4570 BASECFLAGS="$BASECFLAGS -mieee"
4571 ;;
4572 esac
4573
Skip Montanarodecc6a42003-01-01 20:07:49 +00004574 case $ac_sys_system in
4575 SCO_SV*)
4576 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4577 ;;
4578 # is there any other compiler on Darwin besides gcc?
4579 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004580 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4581 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004582 if test "${enable_universalsdk}"; then
4583 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4584 fi
4585
Skip Montanarodecc6a42003-01-01 20:07:49 +00004586 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004587 OSF*)
4588 BASECFLAGS="$BASECFLAGS -mieee"
4589 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004590 esac
4591 ;;
4592
4593*)
4594 case $ac_sys_system in
4595 OpenUNIX*|UnixWare*)
4596 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4597 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004598 OSF*)
4599 BASECFLAGS="$BASECFLAGS -ieee -std"
4600 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004601 SCO_SV*)
4602 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4603 ;;
4604 esac
4605 ;;
4606esac
4607
Fred Drakee1ceaa02001-12-04 20:55:47 +00004608if test "$Py_DEBUG" = 'true'; then
4609 :
4610else
4611 OPT="-DNDEBUG $OPT"
4612fi
4613
Guido van Rossum563e7081996-09-10 18:20:48 +00004614if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004615then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004616 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004617fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004618
Neal Norwitz020c46a2006-01-07 21:39:28 +00004619# disable check for icc since it seems to pass, but generates a warning
4620if test "$CC" = icc
4621then
4622 ac_cv_opt_olimit_ok=no
4623fi
4624
Martin v. Löwiseba40652007-08-30 20:10:57 +00004625{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4626echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004627if test "${ac_cv_opt_olimit_ok+set}" = set; then
4628 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004629else
4630 ac_save_cc="$CC"
4631CC="$CC -OPT:Olimit=0"
4632if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004633 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004634else
Martin v. Löwis11437992002-04-12 09:54:03 +00004635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004636/* confdefs.h. */
4637_ACEOF
4638cat confdefs.h >>conftest.$ac_ext
4639cat >>conftest.$ac_ext <<_ACEOF
4640/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004641int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004642_ACEOF
4643rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004644if { (ac_try="$ac_link"
4645case "(($ac_try" in
4646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4647 *) ac_try_echo=$ac_try;;
4648esac
4649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4650 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004651 ac_status=$?
4652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4653 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004654 { (case "(($ac_try" in
4655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4656 *) ac_try_echo=$ac_try;;
4657esac
4658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4659 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004660 ac_status=$?
4661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4662 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004663 ac_cv_opt_olimit_ok=yes
4664else
Martin v. Löwis11437992002-04-12 09:54:03 +00004665 echo "$as_me: program exited with status $ac_status" >&5
4666echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004667sed 's/^/| /' conftest.$ac_ext >&5
4668
Martin v. Löwis11437992002-04-12 09:54:03 +00004669( exit $ac_status )
4670ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004672rm -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 +00004673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004674
4675
Guido van Rossum91922671997-10-09 20:24:13 +00004676CC="$ac_save_cc"
4677fi
4678
Martin v. Löwiseba40652007-08-30 20:10:57 +00004679{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4680echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004681if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004682 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004683 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4684 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4685 # environment?
4686 Darwin*)
4687 ;;
4688 *)
4689 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4690 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004691 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004692else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004693 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4694echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004695 if test "${ac_cv_olimit_ok+set}" = set; then
4696 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004697else
4698 ac_save_cc="$CC"
4699 CC="$CC -Olimit 1500"
4700 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004701 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004702else
Martin v. Löwis11437992002-04-12 09:54:03 +00004703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004704/* confdefs.h. */
4705_ACEOF
4706cat confdefs.h >>conftest.$ac_ext
4707cat >>conftest.$ac_ext <<_ACEOF
4708/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004709int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004710_ACEOF
4711rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004712if { (ac_try="$ac_link"
4713case "(($ac_try" in
4714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4715 *) ac_try_echo=$ac_try;;
4716esac
4717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4718 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004719 ac_status=$?
4720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004722 { (case "(($ac_try" in
4723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4724 *) ac_try_echo=$ac_try;;
4725esac
4726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4727 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004728 ac_status=$?
4729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4730 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004731 ac_cv_olimit_ok=yes
4732else
Martin v. Löwis11437992002-04-12 09:54:03 +00004733 echo "$as_me: program exited with status $ac_status" >&5
4734echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004735sed 's/^/| /' conftest.$ac_ext >&5
4736
Martin v. Löwis11437992002-04-12 09:54:03 +00004737( exit $ac_status )
4738ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004740rm -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 +00004741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004742
4743
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004744 CC="$ac_save_cc"
4745fi
4746
Martin v. Löwiseba40652007-08-30 20:10:57 +00004747 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4748echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004749 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004750 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004751 fi
4752fi
4753
Martin v. Löwisaac13162006-10-19 10:58:46 +00004754# Check whether GCC supports PyArg_ParseTuple format
4755if test "$GCC" = "yes"
4756then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004757 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4758echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004759 save_CFLAGS=$CFLAGS
4760 CFLAGS="$CFLAGS -Werror"
4761 cat >conftest.$ac_ext <<_ACEOF
4762/* confdefs.h. */
4763_ACEOF
4764cat confdefs.h >>conftest.$ac_ext
4765cat >>conftest.$ac_ext <<_ACEOF
4766/* end confdefs.h. */
4767
4768 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4769
4770int
4771main ()
4772{
4773
4774 ;
4775 return 0;
4776}
4777_ACEOF
4778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004779if { (ac_try="$ac_compile"
4780case "(($ac_try" in
4781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4782 *) ac_try_echo=$ac_try;;
4783esac
4784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004786 ac_status=$?
4787 grep -v '^ *+' conftest.er1 >conftest.err
4788 rm -f conftest.er1
4789 cat conftest.err >&5
4790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004791 (exit $ac_status); } && {
4792 test -z "$ac_c_werror_flag" ||
4793 test ! -s conftest.err
4794 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004795
4796cat >>confdefs.h <<\_ACEOF
4797#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4798_ACEOF
4799
Martin v. Löwiseba40652007-08-30 20:10:57 +00004800 { echo "$as_me:$LINENO: result: yes" >&5
4801echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004802else
4803 echo "$as_me: failed program was:" >&5
4804sed 's/^/| /' conftest.$ac_ext >&5
4805
Martin v. Löwiseba40652007-08-30 20:10:57 +00004806 { echo "$as_me:$LINENO: result: no" >&5
4807echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004808
4809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004810
4811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004812 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004813fi
4814
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004815# On some compilers, pthreads are available without further options
4816# (e.g. MacOS X). On some of these systems, the compiler will not
4817# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4818# So we have to see first whether pthreads are available without
4819# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4821echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004822if test "${ac_cv_pthread_is_default+set}" = set; then
4823 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004824else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004825 if test "$cross_compiling" = yes; then
4826 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004827else
Martin v. Löwis11437992002-04-12 09:54:03 +00004828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004829/* confdefs.h. */
4830_ACEOF
4831cat confdefs.h >>conftest.$ac_ext
4832cat >>conftest.$ac_ext <<_ACEOF
4833/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004834
Martin v. Löwis130fb172001-07-19 11:00:41 +00004835#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004836
4837void* routine(void* p){return NULL;}
4838
4839int main(){
4840 pthread_t p;
4841 if(pthread_create(&p,NULL,routine,NULL)!=0)
4842 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004843 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004844 return 0;
4845}
4846
Martin v. Löwis11437992002-04-12 09:54:03 +00004847_ACEOF
4848rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849if { (ac_try="$ac_link"
4850case "(($ac_try" in
4851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4852 *) ac_try_echo=$ac_try;;
4853esac
4854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4855 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 ac_status=$?
4857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4858 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004859 { (case "(($ac_try" in
4860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4861 *) ac_try_echo=$ac_try;;
4862esac
4863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4864 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004865 ac_status=$?
4866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4867 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004868
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004869 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004870 ac_cv_kthread=no
4871 ac_cv_pthread=no
4872
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004873else
Martin v. Löwis11437992002-04-12 09:54:03 +00004874 echo "$as_me: program exited with status $ac_status" >&5
4875echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004876sed 's/^/| /' conftest.$ac_ext >&5
4877
Martin v. Löwis11437992002-04-12 09:54:03 +00004878( exit $ac_status )
4879ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004880fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004881rm -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 +00004882fi
4883
Martin v. Löwiseba40652007-08-30 20:10:57 +00004884
4885
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004886fi
4887
Martin v. Löwiseba40652007-08-30 20:10:57 +00004888{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4889echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004890
Michael W. Hudson54241132001-12-07 15:38:26 +00004891
Martin v. Löwis11437992002-04-12 09:54:03 +00004892if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004893then
4894 ac_cv_kpthread=no
4895else
4896# -Kpthread, if available, provides the right #defines
4897# and linker options to make pthread_create available
4898# Some compilers won't report that they do not support -Kpthread,
4899# so we need to run a program to see whether it really made the
4900# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4902echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004903if test "${ac_cv_kpthread+set}" = set; then
4904 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004905else
4906 ac_save_cc="$CC"
4907CC="$CC -Kpthread"
4908if test "$cross_compiling" = yes; then
4909 ac_cv_kpthread=no
4910else
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004912/* confdefs.h. */
4913_ACEOF
4914cat confdefs.h >>conftest.$ac_ext
4915cat >>conftest.$ac_ext <<_ACEOF
4916/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004917
4918#include <pthread.h>
4919
4920void* routine(void* p){return NULL;}
4921
4922int main(){
4923 pthread_t p;
4924 if(pthread_create(&p,NULL,routine,NULL)!=0)
4925 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004926 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004927 return 0;
4928}
4929
Martin v. Löwis11437992002-04-12 09:54:03 +00004930_ACEOF
4931rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932if { (ac_try="$ac_link"
4933case "(($ac_try" in
4934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4935 *) ac_try_echo=$ac_try;;
4936esac
4937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4938 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 ac_status=$?
4940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004942 { (case "(($ac_try" in
4943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4944 *) ac_try_echo=$ac_try;;
4945esac
4946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4947 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 ac_status=$?
4949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4950 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004951 ac_cv_kpthread=yes
4952else
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 echo "$as_me: program exited with status $ac_status" >&5
4954echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004955sed 's/^/| /' conftest.$ac_ext >&5
4956
Martin v. Löwis11437992002-04-12 09:54:03 +00004957( exit $ac_status )
4958ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004960rm -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 +00004961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004962
4963
Martin v. Löwis130fb172001-07-19 11:00:41 +00004964CC="$ac_save_cc"
4965fi
4966
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4968echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004969fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004970
Skip Montanarod8d39a02003-07-10 20:44:10 +00004971if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004972then
4973# -Kthread, if available, provides the right #defines
4974# and linker options to make pthread_create available
4975# Some compilers won't report that they do not support -Kthread,
4976# so we need to run a program to see whether it really made the
4977# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004978{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4979echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004980if test "${ac_cv_kthread+set}" = set; then
4981 echo $ECHO_N "(cached) $ECHO_C" >&6
4982else
4983 ac_save_cc="$CC"
4984CC="$CC -Kthread"
4985if test "$cross_compiling" = yes; then
4986 ac_cv_kthread=no
4987else
4988 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004989/* confdefs.h. */
4990_ACEOF
4991cat confdefs.h >>conftest.$ac_ext
4992cat >>conftest.$ac_ext <<_ACEOF
4993/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004994
4995#include <pthread.h>
4996
4997void* routine(void* p){return NULL;}
4998
4999int main(){
5000 pthread_t p;
5001 if(pthread_create(&p,NULL,routine,NULL)!=0)
5002 return 1;
5003 (void)pthread_detach(p);
5004 return 0;
5005}
5006
5007_ACEOF
5008rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005009if { (ac_try="$ac_link"
5010case "(($ac_try" in
5011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5012 *) ac_try_echo=$ac_try;;
5013esac
5014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5015 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005016 ac_status=$?
5017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5018 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005019 { (case "(($ac_try" in
5020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5021 *) ac_try_echo=$ac_try;;
5022esac
5023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5024 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005025 ac_status=$?
5026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5027 (exit $ac_status); }; }; then
5028 ac_cv_kthread=yes
5029else
5030 echo "$as_me: program exited with status $ac_status" >&5
5031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005032sed 's/^/| /' conftest.$ac_ext >&5
5033
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005034( exit $ac_status )
5035ac_cv_kthread=no
5036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005037rm -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 +00005038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005039
5040
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005041CC="$ac_save_cc"
5042fi
5043
Martin v. Löwiseba40652007-08-30 20:10:57 +00005044{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5045echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005046fi
5047
Skip Montanarod8d39a02003-07-10 20:44:10 +00005048if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005049then
5050# -pthread, if available, provides the right #defines
5051# and linker options to make pthread_create available
5052# Some compilers won't report that they do not support -pthread,
5053# so we need to run a program to see whether it really made the
5054# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005055{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5056echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005057if test "${ac_cv_thread+set}" = set; then
5058 echo $ECHO_N "(cached) $ECHO_C" >&6
5059else
5060 ac_save_cc="$CC"
5061CC="$CC -pthread"
5062if test "$cross_compiling" = yes; then
5063 ac_cv_pthread=no
5064else
5065 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005066/* confdefs.h. */
5067_ACEOF
5068cat confdefs.h >>conftest.$ac_ext
5069cat >>conftest.$ac_ext <<_ACEOF
5070/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005071
5072#include <pthread.h>
5073
5074void* routine(void* p){return NULL;}
5075
5076int main(){
5077 pthread_t p;
5078 if(pthread_create(&p,NULL,routine,NULL)!=0)
5079 return 1;
5080 (void)pthread_detach(p);
5081 return 0;
5082}
5083
5084_ACEOF
5085rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005086if { (ac_try="$ac_link"
5087case "(($ac_try" in
5088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5089 *) ac_try_echo=$ac_try;;
5090esac
5091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5092 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005093 ac_status=$?
5094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005096 { (case "(($ac_try" in
5097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5098 *) ac_try_echo=$ac_try;;
5099esac
5100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5101 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005102 ac_status=$?
5103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5104 (exit $ac_status); }; }; then
5105 ac_cv_pthread=yes
5106else
5107 echo "$as_me: program exited with status $ac_status" >&5
5108echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005109sed 's/^/| /' conftest.$ac_ext >&5
5110
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005111( exit $ac_status )
5112ac_cv_pthread=no
5113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005114rm -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 +00005115fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005116
5117
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005118CC="$ac_save_cc"
5119fi
5120
Martin v. Löwiseba40652007-08-30 20:10:57 +00005121{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5122echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005123fi
5124
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005125# If we have set a CC compiler flag for thread support then
5126# check if it works for CXX, too.
5127ac_cv_cxx_thread=no
5128if test ! -z "$CXX"
5129then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005130{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5131echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005132ac_save_cxx="$CXX"
5133
5134if test "$ac_cv_kpthread" = "yes"
5135then
5136 CXX="$CXX -Kpthread"
5137 ac_cv_cxx_thread=yes
5138elif test "$ac_cv_kthread" = "yes"
5139then
5140 CXX="$CXX -Kthread"
5141 ac_cv_cxx_thread=yes
5142elif test "$ac_cv_pthread" = "yes"
5143then
5144 CXX="$CXX -pthread"
5145 ac_cv_cxx_thread=yes
5146fi
5147
5148if test $ac_cv_cxx_thread = yes
5149then
5150 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5151 $CXX -c conftest.$ac_ext 2>&5
5152 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5153 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5154 then
5155 ac_cv_cxx_thread=yes
5156 else
5157 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005158 fi
5159 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005160fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005161{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5162echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005163fi
5164CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005165
Michael W. Hudson54241132001-12-07 15:38:26 +00005166
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005167# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005168{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5169echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005170if test "${ac_cv_header_stdc+set}" = set; then
5171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172else
Martin v. Löwis11437992002-04-12 09:54:03 +00005173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005174/* confdefs.h. */
5175_ACEOF
5176cat confdefs.h >>conftest.$ac_ext
5177cat >>conftest.$ac_ext <<_ACEOF
5178/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005179#include <stdlib.h>
5180#include <stdarg.h>
5181#include <string.h>
5182#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005183
Skip Montanaro6dead952003-09-25 14:50:04 +00005184int
5185main ()
5186{
5187
5188 ;
5189 return 0;
5190}
Martin v. Löwis11437992002-04-12 09:54:03 +00005191_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005192rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005193if { (ac_try="$ac_compile"
5194case "(($ac_try" in
5195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5196 *) ac_try_echo=$ac_try;;
5197esac
5198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005201 grep -v '^ *+' conftest.er1 >conftest.err
5202 rm -f conftest.er1
5203 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005205 (exit $ac_status); } && {
5206 test -z "$ac_c_werror_flag" ||
5207 test ! -s conftest.err
5208 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209 ac_cv_header_stdc=yes
5210else
Martin v. Löwis11437992002-04-12 09:54:03 +00005211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005212sed 's/^/| /' conftest.$ac_ext >&5
5213
Martin v. Löwiseba40652007-08-30 20:10:57 +00005214 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005216
5217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005218
5219if test $ac_cv_header_stdc = yes; then
5220 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005222/* confdefs.h. */
5223_ACEOF
5224cat confdefs.h >>conftest.$ac_ext
5225cat >>conftest.$ac_ext <<_ACEOF
5226/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005227#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005228
5229_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005231 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005232 :
5233else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005234 ac_cv_header_stdc=no
5235fi
5236rm -f conftest*
5237
5238fi
5239
5240if test $ac_cv_header_stdc = yes; then
5241 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005243/* confdefs.h. */
5244_ACEOF
5245cat confdefs.h >>conftest.$ac_ext
5246cat >>conftest.$ac_ext <<_ACEOF
5247/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005249
5250_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005252 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005253 :
5254else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255 ac_cv_header_stdc=no
5256fi
5257rm -f conftest*
5258
5259fi
5260
5261if test $ac_cv_header_stdc = yes; then
5262 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005263 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005264 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005265else
Martin v. Löwis11437992002-04-12 09:54:03 +00005266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005267/* confdefs.h. */
5268_ACEOF
5269cat confdefs.h >>conftest.$ac_ext
5270cat >>conftest.$ac_ext <<_ACEOF
5271/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005272#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005273#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005274#if ((' ' & 0x0FF) == 0x020)
5275# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5276# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5277#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005278# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005279 (('a' <= (c) && (c) <= 'i') \
5280 || ('j' <= (c) && (c) <= 'r') \
5281 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005282# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5283#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005284
Martin v. Löwis11437992002-04-12 09:54:03 +00005285#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5286int
5287main ()
5288{
5289 int i;
5290 for (i = 0; i < 256; i++)
5291 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005292 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005293 return 2;
5294 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005295}
5296_ACEOF
5297rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005298if { (ac_try="$ac_link"
5299case "(($ac_try" in
5300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5301 *) ac_try_echo=$ac_try;;
5302esac
5303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5304 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005305 ac_status=$?
5306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5307 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005308 { (case "(($ac_try" in
5309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5310 *) ac_try_echo=$ac_try;;
5311esac
5312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5313 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005314 ac_status=$?
5315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5316 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005317 :
5318else
Martin v. Löwis11437992002-04-12 09:54:03 +00005319 echo "$as_me: program exited with status $ac_status" >&5
5320echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005321sed 's/^/| /' conftest.$ac_ext >&5
5322
Martin v. Löwis11437992002-04-12 09:54:03 +00005323( exit $ac_status )
5324ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5327fi
5328
5329
Michael W. Hudson54241132001-12-07 15:38:26 +00005330fi
5331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005332{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5333echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005334if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005335
5336cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005338_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005339
5340fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005341
Skip Montanarob9820a32004-01-17 00:16:12 +00005342# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005353 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005354do
5355as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005356{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5357echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5358if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005359 echo $ECHO_N "(cached) $ECHO_C" >&6
5360else
5361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005362/* confdefs.h. */
5363_ACEOF
5364cat confdefs.h >>conftest.$ac_ext
5365cat >>conftest.$ac_ext <<_ACEOF
5366/* end confdefs.h. */
5367$ac_includes_default
5368
5369#include <$ac_header>
5370_ACEOF
5371rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005372if { (ac_try="$ac_compile"
5373case "(($ac_try" in
5374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5375 *) ac_try_echo=$ac_try;;
5376esac
5377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5378 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005379 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005380 grep -v '^ *+' conftest.er1 >conftest.err
5381 rm -f conftest.er1
5382 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005384 (exit $ac_status); } && {
5385 test -z "$ac_c_werror_flag" ||
5386 test ! -s conftest.err
5387 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005388 eval "$as_ac_Header=yes"
5389else
5390 echo "$as_me: failed program was:" >&5
5391sed 's/^/| /' conftest.$ac_ext >&5
5392
Martin v. Löwiseba40652007-08-30 20:10:57 +00005393 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005395
5396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005398ac_res=`eval echo '${'$as_ac_Header'}'`
5399 { echo "$as_me:$LINENO: result: $ac_res" >&5
5400echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005401if test `eval echo '${'$as_ac_Header'}'` = yes; then
5402 cat >>confdefs.h <<_ACEOF
5403#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5404_ACEOF
5405
5406fi
5407
5408done
5409
5410
Martin v. Löwis11437992002-04-12 09:54:03 +00005411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
Anthony Baxter8a560de2004-10-13 15:30:56 +00005447
Martin v. Löwisc3001752005-01-23 09:27:24 +00005448
Martin v. Löwis11017b12006-01-14 18:12:57 +00005449
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005450
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005451
5452
5453
5454
5455
5456
5457
5458
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005459
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005460
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005461
5462
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005463
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005464for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5465fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005466ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005467shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005468unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005469sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5470sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005471sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5472sys/time.h \
5473sys/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 +00005474sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005475bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476do
Martin v. Löwis11437992002-04-12 09:54:03 +00005477as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005478if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5479 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5480echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5481if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005482 echo $ECHO_N "(cached) $ECHO_C" >&6
5483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005484ac_res=`eval echo '${'$as_ac_Header'}'`
5485 { echo "$as_me:$LINENO: result: $ac_res" >&5
5486echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487else
Martin v. Löwis11437992002-04-12 09:54:03 +00005488 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005489{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5490echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005491cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005492/* confdefs.h. */
5493_ACEOF
5494cat confdefs.h >>conftest.$ac_ext
5495cat >>conftest.$ac_ext <<_ACEOF
5496/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005497$ac_includes_default
5498#include <$ac_header>
5499_ACEOF
5500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005501if { (ac_try="$ac_compile"
5502case "(($ac_try" in
5503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5504 *) ac_try_echo=$ac_try;;
5505esac
5506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005509 grep -v '^ *+' conftest.er1 >conftest.err
5510 rm -f conftest.er1
5511 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005513 (exit $ac_status); } && {
5514 test -z "$ac_c_werror_flag" ||
5515 test ! -s conftest.err
5516 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005517 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005518else
Martin v. Löwis11437992002-04-12 09:54:03 +00005519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005520sed 's/^/| /' conftest.$ac_ext >&5
5521
Martin v. Löwiseba40652007-08-30 20:10:57 +00005522 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005524
5525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5526{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5527echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005528
5529# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005530{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5531echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005532cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005533/* confdefs.h. */
5534_ACEOF
5535cat confdefs.h >>conftest.$ac_ext
5536cat >>conftest.$ac_ext <<_ACEOF
5537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005538#include <$ac_header>
5539_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005540if { (ac_try="$ac_cpp conftest.$ac_ext"
5541case "(($ac_try" in
5542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5543 *) ac_try_echo=$ac_try;;
5544esac
5545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5546 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005547 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005548 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005549 rm -f conftest.er1
5550 cat conftest.err >&5
5551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005552 (exit $ac_status); } >/dev/null && {
5553 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5554 test ! -s conftest.err
5555 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005556 ac_header_preproc=yes
5557else
5558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005559sed 's/^/| /' conftest.$ac_ext >&5
5560
Martin v. Löwis11437992002-04-12 09:54:03 +00005561 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005563
Martin v. Löwis11437992002-04-12 09:54:03 +00005564rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005565{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5566echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005567
5568# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005569case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5570 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005571 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5572echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005573 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5574echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5575 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005576 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005577 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005578 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5579echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005580 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5581echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5582 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5583echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5584 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5585echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005586 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5587echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005588 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5589echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005590 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005591## ------------------------------------------------ ##
5592## Report this to http://www.python.org/python-bugs ##
5593## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005594_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005595 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005596 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005597esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005598{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5599echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5600if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005601 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005602else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005603 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005605ac_res=`eval echo '${'$as_ac_Header'}'`
5606 { echo "$as_me:$LINENO: result: $ac_res" >&5
5607echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005608
5609fi
5610if test `eval echo '${'$as_ac_Header'}'` = yes; then
5611 cat >>confdefs.h <<_ACEOF
5612#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5613_ACEOF
5614
5615fi
5616
Guido van Rossum627b2d71993-12-24 10:39:16 +00005617done
5618
Martin v. Löwis11437992002-04-12 09:54:03 +00005619
5620
5621
5622
5623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005624ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005625for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5626 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005627{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5628echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5629if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005630 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005631else
Martin v. Löwis11437992002-04-12 09:54:03 +00005632 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005633/* confdefs.h. */
5634_ACEOF
5635cat confdefs.h >>conftest.$ac_ext
5636cat >>conftest.$ac_ext <<_ACEOF
5637/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005638#include <sys/types.h>
5639#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005640
Martin v. Löwis11437992002-04-12 09:54:03 +00005641int
5642main ()
5643{
5644if ((DIR *) 0)
5645return 0;
5646 ;
5647 return 0;
5648}
5649_ACEOF
5650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651if { (ac_try="$ac_compile"
5652case "(($ac_try" in
5653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5654 *) ac_try_echo=$ac_try;;
5655esac
5656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005659 grep -v '^ *+' conftest.er1 >conftest.err
5660 rm -f conftest.er1
5661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005663 (exit $ac_status); } && {
5664 test -z "$ac_c_werror_flag" ||
5665 test ! -s conftest.err
5666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005668else
Martin v. Löwis11437992002-04-12 09:54:03 +00005669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005670sed 's/^/| /' conftest.$ac_ext >&5
5671
Martin v. Löwiseba40652007-08-30 20:10:57 +00005672 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005673fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005674
5675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005676fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005677ac_res=`eval echo '${'$as_ac_Header'}'`
5678 { echo "$as_me:$LINENO: result: $ac_res" >&5
5679echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005680if test `eval echo '${'$as_ac_Header'}'` = yes; then
5681 cat >>confdefs.h <<_ACEOF
5682#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5683_ACEOF
5684
5685ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005686fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005687
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005688done
5689# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5690if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5692echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005693if test "${ac_cv_search_opendir+set}" = set; then
5694 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005695else
Martin v. Löwis11437992002-04-12 09:54:03 +00005696 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005698/* confdefs.h. */
5699_ACEOF
5700cat confdefs.h >>conftest.$ac_ext
5701cat >>conftest.$ac_ext <<_ACEOF
5702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005703
Martin v. Löwiseba40652007-08-30 20:10:57 +00005704/* Override any GCC internal prototype to avoid an error.
5705 Use char because int might match the return type of a GCC
5706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005707#ifdef __cplusplus
5708extern "C"
5709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005710char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005711int
5712main ()
5713{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005714return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005715 ;
5716 return 0;
5717}
5718_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005719for ac_lib in '' dir; do
5720 if test -z "$ac_lib"; then
5721 ac_res="none required"
5722 else
5723 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005724 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005725 fi
5726 rm -f conftest.$ac_objext conftest$ac_exeext
5727if { (ac_try="$ac_link"
5728case "(($ac_try" in
5729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5730 *) ac_try_echo=$ac_try;;
5731esac
5732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5733 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005734 ac_status=$?
5735 grep -v '^ *+' conftest.er1 >conftest.err
5736 rm -f conftest.er1
5737 cat conftest.err >&5
5738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005739 (exit $ac_status); } && {
5740 test -z "$ac_c_werror_flag" ||
5741 test ! -s conftest.err
5742 } && test -s conftest$ac_exeext &&
5743 $as_test_x conftest$ac_exeext; then
5744 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005745else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005746 echo "$as_me: failed program was:" >&5
5747sed 's/^/| /' conftest.$ac_ext >&5
5748
Martin v. Löwiseba40652007-08-30 20:10:57 +00005749
Brett Cannon19fab762007-06-02 03:02:29 +00005750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005751
5752rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5753 conftest$ac_exeext
5754 if test "${ac_cv_search_opendir+set}" = set; then
5755 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005757done
5758if test "${ac_cv_search_opendir+set}" = set; then
5759 :
5760else
5761 ac_cv_search_opendir=no
5762fi
5763rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005764LIBS=$ac_func_search_save_LIBS
5765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005766{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5767echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5768ac_res=$ac_cv_search_opendir
5769if test "$ac_res" != no; then
5770 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005771
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005772fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005773
Michael W. Hudson54241132001-12-07 15:38:26 +00005774else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005775 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5776echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005777if test "${ac_cv_search_opendir+set}" = set; then
5778 echo $ECHO_N "(cached) $ECHO_C" >&6
5779else
5780 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005782/* confdefs.h. */
5783_ACEOF
5784cat confdefs.h >>conftest.$ac_ext
5785cat >>conftest.$ac_ext <<_ACEOF
5786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005787
Martin v. Löwiseba40652007-08-30 20:10:57 +00005788/* Override any GCC internal prototype to avoid an error.
5789 Use char because int might match the return type of a GCC
5790 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005791#ifdef __cplusplus
5792extern "C"
5793#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005794char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005795int
5796main ()
5797{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 ;
5800 return 0;
5801}
5802_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005803for ac_lib in '' x; do
5804 if test -z "$ac_lib"; then
5805 ac_res="none required"
5806 else
5807 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005808 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005809 fi
5810 rm -f conftest.$ac_objext conftest$ac_exeext
5811if { (ac_try="$ac_link"
5812case "(($ac_try" in
5813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5814 *) ac_try_echo=$ac_try;;
5815esac
5816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5817 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005818 ac_status=$?
5819 grep -v '^ *+' conftest.er1 >conftest.err
5820 rm -f conftest.er1
5821 cat conftest.err >&5
5822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005823 (exit $ac_status); } && {
5824 test -z "$ac_c_werror_flag" ||
5825 test ! -s conftest.err
5826 } && test -s conftest$ac_exeext &&
5827 $as_test_x conftest$ac_exeext; then
5828 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005829else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005830 echo "$as_me: failed program was:" >&5
5831sed 's/^/| /' conftest.$ac_ext >&5
5832
Martin v. Löwiseba40652007-08-30 20:10:57 +00005833
Brett Cannon19fab762007-06-02 03:02:29 +00005834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005835
5836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5837 conftest$ac_exeext
5838 if test "${ac_cv_search_opendir+set}" = set; then
5839 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841done
5842if test "${ac_cv_search_opendir+set}" = set; then
5843 :
5844else
5845 ac_cv_search_opendir=no
5846fi
5847rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005848LIBS=$ac_func_search_save_LIBS
5849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005850{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5851echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5852ac_res=$ac_cv_search_opendir
5853if test "$ac_res" != no; then
5854 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005855
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856fi
5857
5858fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005859
Martin v. Löwiseba40652007-08-30 20:10:57 +00005860{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5861echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005862if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5863 echo $ECHO_N "(cached) $ECHO_C" >&6
5864else
5865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005866/* confdefs.h. */
5867_ACEOF
5868cat confdefs.h >>conftest.$ac_ext
5869cat >>conftest.$ac_ext <<_ACEOF
5870/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005871#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005872int
5873main ()
5874{
5875return makedev(0, 0);
5876 ;
5877 return 0;
5878}
5879_ACEOF
5880rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881if { (ac_try="$ac_link"
5882case "(($ac_try" in
5883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5884 *) ac_try_echo=$ac_try;;
5885esac
5886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5887 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005889 grep -v '^ *+' conftest.er1 >conftest.err
5890 rm -f conftest.er1
5891 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005893 (exit $ac_status); } && {
5894 test -z "$ac_c_werror_flag" ||
5895 test ! -s conftest.err
5896 } && test -s conftest$ac_exeext &&
5897 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005898 ac_cv_header_sys_types_h_makedev=yes
5899else
5900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005901sed 's/^/| /' conftest.$ac_ext >&5
5902
Martin v. Löwiseba40652007-08-30 20:10:57 +00005903 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005905
5906rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005908
5909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005910{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5911echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005912
5913if test $ac_cv_header_sys_types_h_makedev = no; then
5914if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005915 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5916echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005917if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5918 echo $ECHO_N "(cached) $ECHO_C" >&6
5919fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005920{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5921echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005922else
5923 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5925echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005926cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005927/* confdefs.h. */
5928_ACEOF
5929cat confdefs.h >>conftest.$ac_ext
5930cat >>conftest.$ac_ext <<_ACEOF
5931/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005932$ac_includes_default
5933#include <sys/mkdev.h>
5934_ACEOF
5935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936if { (ac_try="$ac_compile"
5937case "(($ac_try" in
5938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5939 *) ac_try_echo=$ac_try;;
5940esac
5941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005944 grep -v '^ *+' conftest.er1 >conftest.err
5945 rm -f conftest.er1
5946 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005948 (exit $ac_status); } && {
5949 test -z "$ac_c_werror_flag" ||
5950 test ! -s conftest.err
5951 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005952 ac_header_compiler=yes
5953else
5954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005955sed 's/^/| /' conftest.$ac_ext >&5
5956
Martin v. Löwiseba40652007-08-30 20:10:57 +00005957 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005959
5960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5961{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5962echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005963
5964# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005965{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5966echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005968/* confdefs.h. */
5969_ACEOF
5970cat confdefs.h >>conftest.$ac_ext
5971cat >>conftest.$ac_ext <<_ACEOF
5972/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005973#include <sys/mkdev.h>
5974_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005975if { (ac_try="$ac_cpp conftest.$ac_ext"
5976case "(($ac_try" in
5977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5978 *) ac_try_echo=$ac_try;;
5979esac
5980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5981 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005982 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005983 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005984 rm -f conftest.er1
5985 cat conftest.err >&5
5986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005987 (exit $ac_status); } >/dev/null && {
5988 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5989 test ! -s conftest.err
5990 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005991 ac_header_preproc=yes
5992else
5993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005994sed 's/^/| /' conftest.$ac_ext >&5
5995
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005996 ac_header_preproc=no
5997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005999rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6001echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002
6003# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006004case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6005 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006006 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6007echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006008 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6009echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6010 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006011 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006012 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006013 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6014echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006015 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6016echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6017 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6018echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6019 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6020echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006021 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6022echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006023 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6024echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006026## ------------------------------------------------ ##
6027## Report this to http://www.python.org/python-bugs ##
6028## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006029_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006030 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006031 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006032esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006033{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6034echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006035if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6036 echo $ECHO_N "(cached) $ECHO_C" >&6
6037else
6038 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006040{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6041echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006042
6043fi
6044if test $ac_cv_header_sys_mkdev_h = yes; then
6045
6046cat >>confdefs.h <<\_ACEOF
6047#define MAJOR_IN_MKDEV 1
6048_ACEOF
6049
6050fi
6051
6052
6053
6054 if test $ac_cv_header_sys_mkdev_h = no; then
6055 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006056 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6057echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006058if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6059 echo $ECHO_N "(cached) $ECHO_C" >&6
6060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006061{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6062echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006063else
6064 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006065{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6066echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006068/* confdefs.h. */
6069_ACEOF
6070cat confdefs.h >>conftest.$ac_ext
6071cat >>conftest.$ac_ext <<_ACEOF
6072/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006073$ac_includes_default
6074#include <sys/sysmacros.h>
6075_ACEOF
6076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006077if { (ac_try="$ac_compile"
6078case "(($ac_try" in
6079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6080 *) ac_try_echo=$ac_try;;
6081esac
6082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006085 grep -v '^ *+' conftest.er1 >conftest.err
6086 rm -f conftest.er1
6087 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006089 (exit $ac_status); } && {
6090 test -z "$ac_c_werror_flag" ||
6091 test ! -s conftest.err
6092 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093 ac_header_compiler=yes
6094else
6095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006096sed 's/^/| /' conftest.$ac_ext >&5
6097
Martin v. Löwiseba40652007-08-30 20:10:57 +00006098 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006100
6101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6102{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6103echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006104
6105# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006106{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6107echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006109/* confdefs.h. */
6110_ACEOF
6111cat confdefs.h >>conftest.$ac_ext
6112cat >>conftest.$ac_ext <<_ACEOF
6113/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006114#include <sys/sysmacros.h>
6115_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006116if { (ac_try="$ac_cpp conftest.$ac_ext"
6117case "(($ac_try" in
6118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6119 *) ac_try_echo=$ac_try;;
6120esac
6121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6122 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006123 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006124 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125 rm -f conftest.er1
6126 cat conftest.err >&5
6127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006128 (exit $ac_status); } >/dev/null && {
6129 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6130 test ! -s conftest.err
6131 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132 ac_header_preproc=yes
6133else
6134 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006135sed 's/^/| /' conftest.$ac_ext >&5
6136
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006137 ac_header_preproc=no
6138fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006139
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006141{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6142echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143
6144# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006145case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6146 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6148echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006149 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6150echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6151 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006152 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006153 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006154 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6155echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006156 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6157echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6158 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6159echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6160 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6161echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006162 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6163echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006164 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6165echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006166 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006167## ------------------------------------------------ ##
6168## Report this to http://www.python.org/python-bugs ##
6169## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006170_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006171 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006172 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006174{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6175echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006176if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6177 echo $ECHO_N "(cached) $ECHO_C" >&6
6178else
6179 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006181{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6182echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183
6184fi
6185if test $ac_cv_header_sys_sysmacros_h = yes; then
6186
6187cat >>confdefs.h <<\_ACEOF
6188#define MAJOR_IN_SYSMACROS 1
6189_ACEOF
6190
6191fi
6192
6193
6194 fi
6195fi
6196
Michael W. Hudson54241132001-12-07 15:38:26 +00006197
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006198# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006199
6200for ac_header in term.h
6201do
6202as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006203{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6204echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6205if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006206 echo $ECHO_N "(cached) $ECHO_C" >&6
6207else
6208 cat >conftest.$ac_ext <<_ACEOF
6209/* confdefs.h. */
6210_ACEOF
6211cat confdefs.h >>conftest.$ac_ext
6212cat >>conftest.$ac_ext <<_ACEOF
6213/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006214
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006215#ifdef HAVE_CURSES_H
6216#include <curses.h>
6217#endif
6218
6219
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006220#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006221_ACEOF
6222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006223if { (ac_try="$ac_compile"
6224case "(($ac_try" in
6225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6226 *) ac_try_echo=$ac_try;;
6227esac
6228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006230 ac_status=$?
6231 grep -v '^ *+' conftest.er1 >conftest.err
6232 rm -f conftest.er1
6233 cat conftest.err >&5
6234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006235 (exit $ac_status); } && {
6236 test -z "$ac_c_werror_flag" ||
6237 test ! -s conftest.err
6238 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006239 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006240else
6241 echo "$as_me: failed program was:" >&5
6242sed 's/^/| /' conftest.$ac_ext >&5
6243
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246
6247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006249ac_res=`eval echo '${'$as_ac_Header'}'`
6250 { echo "$as_me:$LINENO: result: $ac_res" >&5
6251echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006252if test `eval echo '${'$as_ac_Header'}'` = yes; then
6253 cat >>confdefs.h <<_ACEOF
6254#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6255_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006256
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006257fi
6258
6259done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006260
6261
Martin v. Löwis11017b12006-01-14 18:12:57 +00006262# On Linux, netlink.h requires asm/types.h
6263
6264for ac_header in linux/netlink.h
6265do
6266as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6268echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6269if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006270 echo $ECHO_N "(cached) $ECHO_C" >&6
6271else
6272 cat >conftest.$ac_ext <<_ACEOF
6273/* confdefs.h. */
6274_ACEOF
6275cat confdefs.h >>conftest.$ac_ext
6276cat >>conftest.$ac_ext <<_ACEOF
6277/* end confdefs.h. */
6278
6279#ifdef HAVE_ASM_TYPES_H
6280#include <asm/types.h>
6281#endif
6282#ifdef HAVE_SYS_SOCKET_H
6283#include <sys/socket.h>
6284#endif
6285
6286
6287#include <$ac_header>
6288_ACEOF
6289rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006290if { (ac_try="$ac_compile"
6291case "(($ac_try" in
6292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6293 *) ac_try_echo=$ac_try;;
6294esac
6295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006297 ac_status=$?
6298 grep -v '^ *+' conftest.er1 >conftest.err
6299 rm -f conftest.er1
6300 cat conftest.err >&5
6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006302 (exit $ac_status); } && {
6303 test -z "$ac_c_werror_flag" ||
6304 test ! -s conftest.err
6305 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006306 eval "$as_ac_Header=yes"
6307else
6308 echo "$as_me: failed program was:" >&5
6309sed 's/^/| /' conftest.$ac_ext >&5
6310
Martin v. Löwiseba40652007-08-30 20:10:57 +00006311 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006313
6314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006316ac_res=`eval echo '${'$as_ac_Header'}'`
6317 { echo "$as_me:$LINENO: result: $ac_res" >&5
6318echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006319if test `eval echo '${'$as_ac_Header'}'` = yes; then
6320 cat >>confdefs.h <<_ACEOF
6321#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6322_ACEOF
6323
6324fi
6325
6326done
6327
6328
Guido van Rossum627b2d71993-12-24 10:39:16 +00006329# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006330was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006331{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6332echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006333cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006334/* confdefs.h. */
6335_ACEOF
6336cat confdefs.h >>conftest.$ac_ext
6337cat >>conftest.$ac_ext <<_ACEOF
6338/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006339#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006340
6341_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006343 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006344 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006345else
Martin v. Löwis11437992002-04-12 09:54:03 +00006346
6347
6348cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006349#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006350_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006351
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006352
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353fi
6354rm -f conftest*
6355
Martin v. Löwiseba40652007-08-30 20:10:57 +00006356{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6357echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006358
Neal Norwitz11690112002-07-30 01:08:28 +00006359# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006360{ echo "$as_me:$LINENO: checking for makedev" >&5
6361echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006363/* confdefs.h. */
6364_ACEOF
6365cat confdefs.h >>conftest.$ac_ext
6366cat >>conftest.$ac_ext <<_ACEOF
6367/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006368#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006369int
6370main ()
6371{
6372 makedev(0, 0)
6373 ;
6374 return 0;
6375}
6376_ACEOF
6377rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006378if { (ac_try="$ac_link"
6379case "(($ac_try" in
6380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6381 *) ac_try_echo=$ac_try;;
6382esac
6383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6384 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006385 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006386 grep -v '^ *+' conftest.er1 >conftest.err
6387 rm -f conftest.er1
6388 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006390 (exit $ac_status); } && {
6391 test -z "$ac_c_werror_flag" ||
6392 test ! -s conftest.err
6393 } && test -s conftest$ac_exeext &&
6394 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006395 ac_cv_has_makedev=yes
6396else
6397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006398sed 's/^/| /' conftest.$ac_ext >&5
6399
Martin v. Löwiseba40652007-08-30 20:10:57 +00006400 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006402
6403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006404 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006405if test "$ac_cv_has_makedev" = "no"; then
6406 # we didn't link, try if _OSF_SOURCE will allow us to link
6407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006408/* confdefs.h. */
6409_ACEOF
6410cat confdefs.h >>conftest.$ac_ext
6411cat >>conftest.$ac_ext <<_ACEOF
6412/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006413
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006414#define _OSF_SOURCE 1
6415#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006416
Neal Norwitz11690112002-07-30 01:08:28 +00006417int
6418main ()
6419{
6420 makedev(0, 0)
6421 ;
6422 return 0;
6423}
6424_ACEOF
6425rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006426if { (ac_try="$ac_link"
6427case "(($ac_try" in
6428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6429 *) ac_try_echo=$ac_try;;
6430esac
6431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6432 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006434 grep -v '^ *+' conftest.er1 >conftest.err
6435 rm -f conftest.er1
6436 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006438 (exit $ac_status); } && {
6439 test -z "$ac_c_werror_flag" ||
6440 test ! -s conftest.err
6441 } && test -s conftest$ac_exeext &&
6442 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006443 ac_cv_has_makedev=yes
6444else
6445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006446sed 's/^/| /' conftest.$ac_ext >&5
6447
Martin v. Löwiseba40652007-08-30 20:10:57 +00006448 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006450
6451rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006452 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006453 if test "$ac_cv_has_makedev" = "yes"; then
6454
6455cat >>confdefs.h <<\_ACEOF
6456#define _OSF_SOURCE 1
6457_ACEOF
6458
6459 fi
6460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006461{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6462echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006463if test "$ac_cv_has_makedev" = "yes"; then
6464
6465cat >>confdefs.h <<\_ACEOF
6466#define HAVE_MAKEDEV 1
6467_ACEOF
6468
6469fi
6470
Martin v. Löwis399a6892002-10-04 10:22:02 +00006471# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6472# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6473# defined, but the compiler does not support pragma redefine_extname,
6474# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6475# structures (such as rlimit64) without declaring them. As a
6476# work-around, disable LFS on such configurations
6477
6478use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006479{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6480echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006482/* confdefs.h. */
6483_ACEOF
6484cat confdefs.h >>conftest.$ac_ext
6485cat >>conftest.$ac_ext <<_ACEOF
6486/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006487
6488#define _LARGEFILE_SOURCE 1
6489#define _FILE_OFFSET_BITS 64
6490#include <sys/resource.h>
6491
Martin v. Löwis399a6892002-10-04 10:22:02 +00006492int
6493main ()
6494{
6495struct rlimit foo;
6496 ;
6497 return 0;
6498}
6499_ACEOF
6500rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006501if { (ac_try="$ac_compile"
6502case "(($ac_try" in
6503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6504 *) ac_try_echo=$ac_try;;
6505esac
6506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006509 grep -v '^ *+' conftest.er1 >conftest.err
6510 rm -f conftest.er1
6511 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006513 (exit $ac_status); } && {
6514 test -z "$ac_c_werror_flag" ||
6515 test ! -s conftest.err
6516 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006517 sol_lfs_bug=no
6518else
6519 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006520sed 's/^/| /' conftest.$ac_ext >&5
6521
Martin v. Löwiseba40652007-08-30 20:10:57 +00006522 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006524
6525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6526{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6527echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006528if test "$sol_lfs_bug" = "yes"; then
6529 use_lfs=no
6530fi
6531
6532if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006533# Two defines needed to enable largefile support on various platforms
6534# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006535
Martin v. Löwis11437992002-04-12 09:54:03 +00006536cat >>confdefs.h <<\_ACEOF
6537#define _LARGEFILE_SOURCE 1
6538_ACEOF
6539
6540
6541cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006542#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006543_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006544
Martin v. Löwis399a6892002-10-04 10:22:02 +00006545fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006546
Guido van Rossum84e7b241996-08-19 21:59:00 +00006547# Add some code to confdefs.h so that the test for off_t works on SCO
6548cat >> confdefs.h <<\EOF
6549#if defined(SCO_DS)
6550#undef _OFF_T
6551#endif
6552EOF
6553
Guido van Rossumef2255b2000-03-10 22:30:29 +00006554# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006555{ echo "$as_me:$LINENO: checking for mode_t" >&5
6556echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006557if test "${ac_cv_type_mode_t+set}" = set; then
6558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006559else
Martin v. Löwis11437992002-04-12 09:54:03 +00006560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006561/* confdefs.h. */
6562_ACEOF
6563cat confdefs.h >>conftest.$ac_ext
6564cat >>conftest.$ac_ext <<_ACEOF
6565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006566$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006567typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006568int
6569main ()
6570{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006571if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006572 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006573if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006574 return 0;
6575 ;
6576 return 0;
6577}
6578_ACEOF
6579rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006580if { (ac_try="$ac_compile"
6581case "(($ac_try" in
6582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6583 *) ac_try_echo=$ac_try;;
6584esac
6585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006588 grep -v '^ *+' conftest.er1 >conftest.err
6589 rm -f conftest.er1
6590 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006592 (exit $ac_status); } && {
6593 test -z "$ac_c_werror_flag" ||
6594 test ! -s conftest.err
6595 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006596 ac_cv_type_mode_t=yes
6597else
Martin v. Löwis11437992002-04-12 09:54:03 +00006598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006599sed 's/^/| /' conftest.$ac_ext >&5
6600
Martin v. Löwiseba40652007-08-30 20:10:57 +00006601 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006602fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006603
6604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006606{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6607echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006608if test $ac_cv_type_mode_t = yes; then
6609 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006610else
Martin v. Löwis11437992002-04-12 09:54:03 +00006611
6612cat >>confdefs.h <<_ACEOF
6613#define mode_t int
6614_ACEOF
6615
6616fi
6617
Martin v. Löwiseba40652007-08-30 20:10:57 +00006618{ echo "$as_me:$LINENO: checking for off_t" >&5
6619echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006620if test "${ac_cv_type_off_t+set}" = set; then
6621 echo $ECHO_N "(cached) $ECHO_C" >&6
6622else
6623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006624/* confdefs.h. */
6625_ACEOF
6626cat confdefs.h >>conftest.$ac_ext
6627cat >>conftest.$ac_ext <<_ACEOF
6628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006629$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006630typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006631int
6632main ()
6633{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006634if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006635 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006636if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006637 return 0;
6638 ;
6639 return 0;
6640}
6641_ACEOF
6642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006643if { (ac_try="$ac_compile"
6644case "(($ac_try" in
6645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6646 *) ac_try_echo=$ac_try;;
6647esac
6648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006651 grep -v '^ *+' conftest.er1 >conftest.err
6652 rm -f conftest.er1
6653 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006655 (exit $ac_status); } && {
6656 test -z "$ac_c_werror_flag" ||
6657 test ! -s conftest.err
6658 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006659 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006660else
Martin v. Löwis11437992002-04-12 09:54:03 +00006661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006662sed 's/^/| /' conftest.$ac_ext >&5
6663
Martin v. Löwiseba40652007-08-30 20:10:57 +00006664 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666
6667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006669{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6670echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006671if test $ac_cv_type_off_t = yes; then
6672 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006673else
Martin v. Löwis11437992002-04-12 09:54:03 +00006674
6675cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006677_ACEOF
6678
6679fi
6680
Martin v. Löwiseba40652007-08-30 20:10:57 +00006681{ echo "$as_me:$LINENO: checking for pid_t" >&5
6682echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006683if test "${ac_cv_type_pid_t+set}" = set; then
6684 echo $ECHO_N "(cached) $ECHO_C" >&6
6685else
6686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006687/* confdefs.h. */
6688_ACEOF
6689cat confdefs.h >>conftest.$ac_ext
6690cat >>conftest.$ac_ext <<_ACEOF
6691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006692$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006693typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006694int
6695main ()
6696{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006697if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006698 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006699if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006700 return 0;
6701 ;
6702 return 0;
6703}
6704_ACEOF
6705rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006706if { (ac_try="$ac_compile"
6707case "(($ac_try" in
6708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6709 *) ac_try_echo=$ac_try;;
6710esac
6711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006714 grep -v '^ *+' conftest.er1 >conftest.err
6715 rm -f conftest.er1
6716 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718 (exit $ac_status); } && {
6719 test -z "$ac_c_werror_flag" ||
6720 test ! -s conftest.err
6721 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006722 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006723else
Martin v. Löwis11437992002-04-12 09:54:03 +00006724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006725sed 's/^/| /' conftest.$ac_ext >&5
6726
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729
6730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006732{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6733echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006734if test $ac_cv_type_pid_t = yes; then
6735 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006736else
Martin v. Löwis11437992002-04-12 09:54:03 +00006737
6738cat >>confdefs.h <<_ACEOF
6739#define pid_t int
6740_ACEOF
6741
6742fi
6743
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6745echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006746if test "${ac_cv_type_signal+set}" = set; then
6747 echo $ECHO_N "(cached) $ECHO_C" >&6
6748else
6749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006750/* confdefs.h. */
6751_ACEOF
6752cat confdefs.h >>conftest.$ac_ext
6753cat >>conftest.$ac_ext <<_ACEOF
6754/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006755#include <sys/types.h>
6756#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006757
Martin v. Löwis11437992002-04-12 09:54:03 +00006758int
6759main ()
6760{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006761return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006762 ;
6763 return 0;
6764}
6765_ACEOF
6766rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006767if { (ac_try="$ac_compile"
6768case "(($ac_try" in
6769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6770 *) ac_try_echo=$ac_try;;
6771esac
6772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006775 grep -v '^ *+' conftest.er1 >conftest.err
6776 rm -f conftest.er1
6777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779 (exit $ac_status); } && {
6780 test -z "$ac_c_werror_flag" ||
6781 test ! -s conftest.err
6782 } && test -s conftest.$ac_objext; then
6783 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006784else
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006786sed 's/^/| /' conftest.$ac_ext >&5
6787
Martin v. Löwiseba40652007-08-30 20:10:57 +00006788 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006790
6791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6794echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006795
Martin v. Löwis11437992002-04-12 09:54:03 +00006796cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006797#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006798_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006799
Michael W. Hudson54241132001-12-07 15:38:26 +00006800
Martin v. Löwiseba40652007-08-30 20:10:57 +00006801{ echo "$as_me:$LINENO: checking for size_t" >&5
6802echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006803if test "${ac_cv_type_size_t+set}" = set; then
6804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006805else
Martin v. Löwis11437992002-04-12 09:54:03 +00006806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006807/* confdefs.h. */
6808_ACEOF
6809cat confdefs.h >>conftest.$ac_ext
6810cat >>conftest.$ac_ext <<_ACEOF
6811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006812$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006813typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006814int
6815main ()
6816{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006817if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006818 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006820 return 0;
6821 ;
6822 return 0;
6823}
6824_ACEOF
6825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006826if { (ac_try="$ac_compile"
6827case "(($ac_try" in
6828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6829 *) ac_try_echo=$ac_try;;
6830esac
6831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006834 grep -v '^ *+' conftest.er1 >conftest.err
6835 rm -f conftest.er1
6836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006838 (exit $ac_status); } && {
6839 test -z "$ac_c_werror_flag" ||
6840 test ! -s conftest.err
6841 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006842 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006843else
Martin v. Löwis11437992002-04-12 09:54:03 +00006844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006845sed 's/^/| /' conftest.$ac_ext >&5
6846
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006848fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006849
6850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006851fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006852{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6853echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006854if test $ac_cv_type_size_t = yes; then
6855 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006856else
Martin v. Löwis11437992002-04-12 09:54:03 +00006857
6858cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006859#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006860_ACEOF
6861
6862fi
6863
Martin v. Löwiseba40652007-08-30 20:10:57 +00006864{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6865echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006866if test "${ac_cv_type_uid_t+set}" = set; then
6867 echo $ECHO_N "(cached) $ECHO_C" >&6
6868else
6869 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006870/* confdefs.h. */
6871_ACEOF
6872cat confdefs.h >>conftest.$ac_ext
6873cat >>conftest.$ac_ext <<_ACEOF
6874/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006875#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006876
6877_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006879 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006880 ac_cv_type_uid_t=yes
6881else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006882 ac_cv_type_uid_t=no
6883fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006884rm -f conftest*
6885
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006887{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6888echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006889if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006890
Martin v. Löwis11437992002-04-12 09:54:03 +00006891cat >>confdefs.h <<\_ACEOF
6892#define uid_t int
6893_ACEOF
6894
6895
6896cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006897#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006898_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006899
6900fi
6901
Martin v. Löwiseba40652007-08-30 20:10:57 +00006902{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6903echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006904if test "${ac_cv_type_ssize_t+set}" = set; then
6905 echo $ECHO_N "(cached) $ECHO_C" >&6
6906else
6907 cat >conftest.$ac_ext <<_ACEOF
6908/* confdefs.h. */
6909_ACEOF
6910cat confdefs.h >>conftest.$ac_ext
6911cat >>conftest.$ac_ext <<_ACEOF
6912/* end confdefs.h. */
6913$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006914typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006915int
6916main ()
6917{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006919 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006920if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006921 return 0;
6922 ;
6923 return 0;
6924}
6925_ACEOF
6926rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006927if { (ac_try="$ac_compile"
6928case "(($ac_try" in
6929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6930 *) ac_try_echo=$ac_try;;
6931esac
6932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6933 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006934 ac_status=$?
6935 grep -v '^ *+' conftest.er1 >conftest.err
6936 rm -f conftest.er1
6937 cat conftest.err >&5
6938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006939 (exit $ac_status); } && {
6940 test -z "$ac_c_werror_flag" ||
6941 test ! -s conftest.err
6942 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006943 ac_cv_type_ssize_t=yes
6944else
6945 echo "$as_me: failed program was:" >&5
6946sed 's/^/| /' conftest.$ac_ext >&5
6947
Martin v. Löwiseba40652007-08-30 20:10:57 +00006948 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006950
6951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006953{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6954echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006955if test $ac_cv_type_ssize_t = yes; then
6956
6957cat >>confdefs.h <<\_ACEOF
6958#define HAVE_SSIZE_T 1
6959_ACEOF
6960
6961fi
6962
Jack Jansendd19cf82001-12-06 22:36:17 +00006963
Michael W. Hudson54241132001-12-07 15:38:26 +00006964# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006965# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006966{ echo "$as_me:$LINENO: checking for int" >&5
6967echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006968if test "${ac_cv_type_int+set}" = set; then
6969 echo $ECHO_N "(cached) $ECHO_C" >&6
6970else
6971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006972/* confdefs.h. */
6973_ACEOF
6974cat confdefs.h >>conftest.$ac_ext
6975cat >>conftest.$ac_ext <<_ACEOF
6976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006977$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006978typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006979int
6980main ()
6981{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006982if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006984if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 return 0;
6986 ;
6987 return 0;
6988}
6989_ACEOF
6990rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006991if { (ac_try="$ac_compile"
6992case "(($ac_try" in
6993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6994 *) ac_try_echo=$ac_try;;
6995esac
6996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006999 grep -v '^ *+' conftest.er1 >conftest.err
7000 rm -f conftest.er1
7001 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007003 (exit $ac_status); } && {
7004 test -z "$ac_c_werror_flag" ||
7005 test ! -s conftest.err
7006 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007007 ac_cv_type_int=yes
7008else
7009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007010sed 's/^/| /' conftest.$ac_ext >&5
7011
Martin v. Löwiseba40652007-08-30 20:10:57 +00007012 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007013fi
Brett Cannon19fab762007-06-02 03:02:29 +00007014
Martin v. Löwiseba40652007-08-30 20:10:57 +00007015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7016fi
7017{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7018echo "${ECHO_T}$ac_cv_type_int" >&6; }
7019
7020# The cast to long int works around a bug in the HP C Compiler
7021# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7022# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7023# This bug is HP SR number 8606223364.
7024{ echo "$as_me:$LINENO: checking size of int" >&5
7025echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007026if test "${ac_cv_sizeof_int+set}" = set; then
7027 echo $ECHO_N "(cached) $ECHO_C" >&6
7028else
Martin v. Löwis11437992002-04-12 09:54:03 +00007029 if test "$cross_compiling" = yes; then
7030 # Depending upon the size, compute the lo and hi bounds.
7031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007032/* confdefs.h. */
7033_ACEOF
7034cat confdefs.h >>conftest.$ac_ext
7035cat >>conftest.$ac_ext <<_ACEOF
7036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007037$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007038 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007039int
7040main ()
7041{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007042static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007043test_array [0] = 0
7044
7045 ;
7046 return 0;
7047}
7048_ACEOF
7049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007050if { (ac_try="$ac_compile"
7051case "(($ac_try" in
7052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7053 *) ac_try_echo=$ac_try;;
7054esac
7055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007058 grep -v '^ *+' conftest.er1 >conftest.err
7059 rm -f conftest.er1
7060 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007062 (exit $ac_status); } && {
7063 test -z "$ac_c_werror_flag" ||
7064 test ! -s conftest.err
7065 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007066 ac_lo=0 ac_mid=0
7067 while :; do
7068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007069/* confdefs.h. */
7070_ACEOF
7071cat confdefs.h >>conftest.$ac_ext
7072cat >>conftest.$ac_ext <<_ACEOF
7073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007074$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007075 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007076int
7077main ()
7078{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007079static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007080test_array [0] = 0
7081
7082 ;
7083 return 0;
7084}
7085_ACEOF
7086rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007087if { (ac_try="$ac_compile"
7088case "(($ac_try" in
7089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7090 *) ac_try_echo=$ac_try;;
7091esac
7092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7093 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007094 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007095 grep -v '^ *+' conftest.er1 >conftest.err
7096 rm -f conftest.er1
7097 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007099 (exit $ac_status); } && {
7100 test -z "$ac_c_werror_flag" ||
7101 test ! -s conftest.err
7102 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007103 ac_hi=$ac_mid; break
7104else
7105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007106sed 's/^/| /' conftest.$ac_ext >&5
7107
Martin v. Löwiseba40652007-08-30 20:10:57 +00007108 ac_lo=`expr $ac_mid + 1`
7109 if test $ac_lo -le $ac_mid; then
7110 ac_lo= ac_hi=
7111 break
7112 fi
7113 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007115
7116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007117 done
7118else
7119 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007120sed 's/^/| /' conftest.$ac_ext >&5
7121
Martin v. Löwiseba40652007-08-30 20:10:57 +00007122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007123/* confdefs.h. */
7124_ACEOF
7125cat confdefs.h >>conftest.$ac_ext
7126cat >>conftest.$ac_ext <<_ACEOF
7127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007128$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007129 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007130int
7131main ()
7132{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007133static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007134test_array [0] = 0
7135
7136 ;
7137 return 0;
7138}
7139_ACEOF
7140rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007141if { (ac_try="$ac_compile"
7142case "(($ac_try" in
7143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7144 *) ac_try_echo=$ac_try;;
7145esac
7146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007149 grep -v '^ *+' conftest.er1 >conftest.err
7150 rm -f conftest.er1
7151 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007153 (exit $ac_status); } && {
7154 test -z "$ac_c_werror_flag" ||
7155 test ! -s conftest.err
7156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007157 ac_hi=-1 ac_mid=-1
7158 while :; do
7159 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007160/* confdefs.h. */
7161_ACEOF
7162cat confdefs.h >>conftest.$ac_ext
7163cat >>conftest.$ac_ext <<_ACEOF
7164/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007165$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007166 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007167int
7168main ()
7169{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007170static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007171test_array [0] = 0
7172
7173 ;
7174 return 0;
7175}
7176_ACEOF
7177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007178if { (ac_try="$ac_compile"
7179case "(($ac_try" in
7180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7181 *) ac_try_echo=$ac_try;;
7182esac
7183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007186 grep -v '^ *+' conftest.er1 >conftest.err
7187 rm -f conftest.er1
7188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190 (exit $ac_status); } && {
7191 test -z "$ac_c_werror_flag" ||
7192 test ! -s conftest.err
7193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007194 ac_lo=$ac_mid; break
7195else
7196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007197sed 's/^/| /' conftest.$ac_ext >&5
7198
Martin v. Löwiseba40652007-08-30 20:10:57 +00007199 ac_hi=`expr '(' $ac_mid ')' - 1`
7200 if test $ac_mid -le $ac_hi; then
7201 ac_lo= ac_hi=
7202 break
7203 fi
7204 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007206
7207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007208 done
7209else
7210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007211sed 's/^/| /' conftest.$ac_ext >&5
7212
Martin v. Löwiseba40652007-08-30 20:10:57 +00007213 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007215
7216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007218
7219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007220# Binary search between lo and hi bounds.
7221while test "x$ac_lo" != "x$ac_hi"; do
7222 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7223 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007224/* confdefs.h. */
7225_ACEOF
7226cat confdefs.h >>conftest.$ac_ext
7227cat >>conftest.$ac_ext <<_ACEOF
7228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007229$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007231int
7232main ()
7233{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007234static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007235test_array [0] = 0
7236
7237 ;
7238 return 0;
7239}
7240_ACEOF
7241rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242if { (ac_try="$ac_compile"
7243case "(($ac_try" in
7244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7245 *) ac_try_echo=$ac_try;;
7246esac
7247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7248 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007250 grep -v '^ *+' conftest.er1 >conftest.err
7251 rm -f conftest.er1
7252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007254 (exit $ac_status); } && {
7255 test -z "$ac_c_werror_flag" ||
7256 test ! -s conftest.err
7257 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007258 ac_hi=$ac_mid
7259else
7260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007261sed 's/^/| /' conftest.$ac_ext >&5
7262
Martin v. Löwiseba40652007-08-30 20:10:57 +00007263 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007265
7266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007267done
7268case $ac_lo in
7269?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007270'') if test "$ac_cv_type_int" = yes; then
7271 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007272See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007273echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007274See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007275 { (exit 77); exit 77; }; }
7276 else
7277 ac_cv_sizeof_int=0
7278 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007279esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007280else
Martin v. Löwis11437992002-04-12 09:54:03 +00007281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007282/* confdefs.h. */
7283_ACEOF
7284cat confdefs.h >>conftest.$ac_ext
7285cat >>conftest.$ac_ext <<_ACEOF
7286/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007287$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007288 typedef int ac__type_sizeof_;
7289static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7290static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007291#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007292#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007293int
7294main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007295{
Martin v. Löwis11437992002-04-12 09:54:03 +00007296
7297 FILE *f = fopen ("conftest.val", "w");
7298 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007299 return 1;
7300 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007301 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007302 long int i = longval ();
7303 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7304 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007305 fprintf (f, "%ld\n", i);
7306 }
7307 else
7308 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007309 unsigned long int i = ulongval ();
7310 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7311 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007312 fprintf (f, "%lu\n", i);
7313 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007315
7316 ;
7317 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007318}
Martin v. Löwis11437992002-04-12 09:54:03 +00007319_ACEOF
7320rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007321if { (ac_try="$ac_link"
7322case "(($ac_try" in
7323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7324 *) ac_try_echo=$ac_try;;
7325esac
7326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7327 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007328 ac_status=$?
7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007331 { (case "(($ac_try" in
7332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7333 *) ac_try_echo=$ac_try;;
7334esac
7335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7336 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007337 ac_status=$?
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); }; }; then
7340 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007341else
Martin v. Löwis11437992002-04-12 09:54:03 +00007342 echo "$as_me: program exited with status $ac_status" >&5
7343echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007344sed 's/^/| /' conftest.$ac_ext >&5
7345
Martin v. Löwis11437992002-04-12 09:54:03 +00007346( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347if test "$ac_cv_type_int" = yes; then
7348 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007349See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007350echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007351See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007352 { (exit 77); exit 77; }; }
7353 else
7354 ac_cv_sizeof_int=0
7355 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007357rm -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 +00007358fi
7359rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007361{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7362echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7363
7364
7365
Martin v. Löwis11437992002-04-12 09:54:03 +00007366cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007367#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007368_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007369
7370
Martin v. Löwiseba40652007-08-30 20:10:57 +00007371{ echo "$as_me:$LINENO: checking for long" >&5
7372echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007373if test "${ac_cv_type_long+set}" = set; then
7374 echo $ECHO_N "(cached) $ECHO_C" >&6
7375else
7376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007377/* confdefs.h. */
7378_ACEOF
7379cat confdefs.h >>conftest.$ac_ext
7380cat >>conftest.$ac_ext <<_ACEOF
7381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007382$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007383typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007384int
7385main ()
7386{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007387if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007388 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007389if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007390 return 0;
7391 ;
7392 return 0;
7393}
7394_ACEOF
7395rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007396if { (ac_try="$ac_compile"
7397case "(($ac_try" in
7398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7399 *) ac_try_echo=$ac_try;;
7400esac
7401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007404 grep -v '^ *+' conftest.er1 >conftest.err
7405 rm -f conftest.er1
7406 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007408 (exit $ac_status); } && {
7409 test -z "$ac_c_werror_flag" ||
7410 test ! -s conftest.err
7411 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007412 ac_cv_type_long=yes
7413else
7414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007415sed 's/^/| /' conftest.$ac_ext >&5
7416
Martin v. Löwiseba40652007-08-30 20:10:57 +00007417 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007418fi
Brett Cannon19fab762007-06-02 03:02:29 +00007419
Martin v. Löwiseba40652007-08-30 20:10:57 +00007420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7421fi
7422{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7423echo "${ECHO_T}$ac_cv_type_long" >&6; }
7424
7425# The cast to long int works around a bug in the HP C Compiler
7426# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7427# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7428# This bug is HP SR number 8606223364.
7429{ echo "$as_me:$LINENO: checking size of long" >&5
7430echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007431if test "${ac_cv_sizeof_long+set}" = set; then
7432 echo $ECHO_N "(cached) $ECHO_C" >&6
7433else
Martin v. Löwis11437992002-04-12 09:54:03 +00007434 if test "$cross_compiling" = yes; then
7435 # Depending upon the size, compute the lo and hi bounds.
7436cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007437/* confdefs.h. */
7438_ACEOF
7439cat confdefs.h >>conftest.$ac_ext
7440cat >>conftest.$ac_ext <<_ACEOF
7441/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007442$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007443 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007444int
7445main ()
7446{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007448test_array [0] = 0
7449
7450 ;
7451 return 0;
7452}
7453_ACEOF
7454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007455if { (ac_try="$ac_compile"
7456case "(($ac_try" in
7457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7458 *) ac_try_echo=$ac_try;;
7459esac
7460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007463 grep -v '^ *+' conftest.er1 >conftest.err
7464 rm -f conftest.er1
7465 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007467 (exit $ac_status); } && {
7468 test -z "$ac_c_werror_flag" ||
7469 test ! -s conftest.err
7470 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007471 ac_lo=0 ac_mid=0
7472 while :; do
7473 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007474/* confdefs.h. */
7475_ACEOF
7476cat confdefs.h >>conftest.$ac_ext
7477cat >>conftest.$ac_ext <<_ACEOF
7478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007479$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007480 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007481int
7482main ()
7483{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007484static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007485test_array [0] = 0
7486
7487 ;
7488 return 0;
7489}
7490_ACEOF
7491rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007492if { (ac_try="$ac_compile"
7493case "(($ac_try" in
7494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7495 *) ac_try_echo=$ac_try;;
7496esac
7497eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7498 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007500 grep -v '^ *+' conftest.er1 >conftest.err
7501 rm -f conftest.er1
7502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007504 (exit $ac_status); } && {
7505 test -z "$ac_c_werror_flag" ||
7506 test ! -s conftest.err
7507 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007508 ac_hi=$ac_mid; break
7509else
7510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007511sed 's/^/| /' conftest.$ac_ext >&5
7512
Martin v. Löwiseba40652007-08-30 20:10:57 +00007513 ac_lo=`expr $ac_mid + 1`
7514 if test $ac_lo -le $ac_mid; then
7515 ac_lo= ac_hi=
7516 break
7517 fi
7518 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520
7521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 done
7523else
7524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007525sed 's/^/| /' conftest.$ac_ext >&5
7526
Martin v. Löwiseba40652007-08-30 20:10:57 +00007527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007528/* confdefs.h. */
7529_ACEOF
7530cat confdefs.h >>conftest.$ac_ext
7531cat >>conftest.$ac_ext <<_ACEOF
7532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007533$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007534 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007535int
7536main ()
7537{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007538static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007539test_array [0] = 0
7540
7541 ;
7542 return 0;
7543}
7544_ACEOF
7545rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007546if { (ac_try="$ac_compile"
7547case "(($ac_try" in
7548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7549 *) ac_try_echo=$ac_try;;
7550esac
7551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7552 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007554 grep -v '^ *+' conftest.er1 >conftest.err
7555 rm -f conftest.er1
7556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007558 (exit $ac_status); } && {
7559 test -z "$ac_c_werror_flag" ||
7560 test ! -s conftest.err
7561 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007562 ac_hi=-1 ac_mid=-1
7563 while :; do
7564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007565/* confdefs.h. */
7566_ACEOF
7567cat confdefs.h >>conftest.$ac_ext
7568cat >>conftest.$ac_ext <<_ACEOF
7569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007570$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007572int
7573main ()
7574{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007575static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007576test_array [0] = 0
7577
7578 ;
7579 return 0;
7580}
7581_ACEOF
7582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583if { (ac_try="$ac_compile"
7584case "(($ac_try" in
7585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7586 *) ac_try_echo=$ac_try;;
7587esac
7588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7589 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007591 grep -v '^ *+' conftest.er1 >conftest.err
7592 rm -f conftest.er1
7593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 (exit $ac_status); } && {
7596 test -z "$ac_c_werror_flag" ||
7597 test ! -s conftest.err
7598 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007599 ac_lo=$ac_mid; break
7600else
7601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007602sed 's/^/| /' conftest.$ac_ext >&5
7603
Martin v. Löwiseba40652007-08-30 20:10:57 +00007604 ac_hi=`expr '(' $ac_mid ')' - 1`
7605 if test $ac_mid -le $ac_hi; then
7606 ac_lo= ac_hi=
7607 break
7608 fi
7609 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611
7612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 done
7614else
7615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007616sed 's/^/| /' conftest.$ac_ext >&5
7617
Martin v. Löwiseba40652007-08-30 20:10:57 +00007618 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007620
7621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007623
7624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007625# Binary search between lo and hi bounds.
7626while test "x$ac_lo" != "x$ac_hi"; do
7627 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007629/* confdefs.h. */
7630_ACEOF
7631cat confdefs.h >>conftest.$ac_ext
7632cat >>conftest.$ac_ext <<_ACEOF
7633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007634$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007635 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007636int
7637main ()
7638{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007639static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007640test_array [0] = 0
7641
7642 ;
7643 return 0;
7644}
7645_ACEOF
7646rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647if { (ac_try="$ac_compile"
7648case "(($ac_try" in
7649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7650 *) ac_try_echo=$ac_try;;
7651esac
7652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007655 grep -v '^ *+' conftest.er1 >conftest.err
7656 rm -f conftest.er1
7657 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007659 (exit $ac_status); } && {
7660 test -z "$ac_c_werror_flag" ||
7661 test ! -s conftest.err
7662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007663 ac_hi=$ac_mid
7664else
7665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007666sed 's/^/| /' conftest.$ac_ext >&5
7667
Martin v. Löwiseba40652007-08-30 20:10:57 +00007668 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007670
7671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007672done
7673case $ac_lo in
7674?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675'') if test "$ac_cv_type_long" = yes; then
7676 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007677See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007679See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007680 { (exit 77); exit 77; }; }
7681 else
7682 ac_cv_sizeof_long=0
7683 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007684esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007685else
Martin v. Löwis11437992002-04-12 09:54:03 +00007686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007687/* confdefs.h. */
7688_ACEOF
7689cat confdefs.h >>conftest.$ac_ext
7690cat >>conftest.$ac_ext <<_ACEOF
7691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007693 typedef long ac__type_sizeof_;
7694static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7695static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007696#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007697#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007698int
7699main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007700{
Martin v. Löwis11437992002-04-12 09:54:03 +00007701
7702 FILE *f = fopen ("conftest.val", "w");
7703 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704 return 1;
7705 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007707 long int i = longval ();
7708 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7709 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 fprintf (f, "%ld\n", i);
7711 }
7712 else
7713 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007714 unsigned long int i = ulongval ();
7715 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7716 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007717 fprintf (f, "%lu\n", i);
7718 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007720
7721 ;
7722 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007723}
Martin v. Löwis11437992002-04-12 09:54:03 +00007724_ACEOF
7725rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726if { (ac_try="$ac_link"
7727case "(($ac_try" in
7728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7729 *) ac_try_echo=$ac_try;;
7730esac
7731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7732 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 ac_status=$?
7734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736 { (case "(($ac_try" in
7737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7738 *) ac_try_echo=$ac_try;;
7739esac
7740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7741 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 ac_status=$?
7743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7744 (exit $ac_status); }; }; then
7745 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007746else
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 echo "$as_me: program exited with status $ac_status" >&5
7748echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007749sed 's/^/| /' conftest.$ac_ext >&5
7750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752if test "$ac_cv_type_long" = yes; then
7753 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007754See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007755echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007756See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007757 { (exit 77); exit 77; }; }
7758 else
7759 ac_cv_sizeof_long=0
7760 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762rm -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 +00007763fi
7764rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7767echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7768
7769
7770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007772#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007773_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007774
7775
Martin v. Löwiseba40652007-08-30 20:10:57 +00007776{ echo "$as_me:$LINENO: checking for void *" >&5
7777echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007778if test "${ac_cv_type_void_p+set}" = set; then
7779 echo $ECHO_N "(cached) $ECHO_C" >&6
7780else
7781 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007782/* confdefs.h. */
7783_ACEOF
7784cat confdefs.h >>conftest.$ac_ext
7785cat >>conftest.$ac_ext <<_ACEOF
7786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007787$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007788typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007789int
7790main ()
7791{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007792if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007793 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007794if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007795 return 0;
7796 ;
7797 return 0;
7798}
7799_ACEOF
7800rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801if { (ac_try="$ac_compile"
7802case "(($ac_try" in
7803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7804 *) ac_try_echo=$ac_try;;
7805esac
7806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7807 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007809 grep -v '^ *+' conftest.er1 >conftest.err
7810 rm -f conftest.er1
7811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007813 (exit $ac_status); } && {
7814 test -z "$ac_c_werror_flag" ||
7815 test ! -s conftest.err
7816 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ac_cv_type_void_p=yes
7818else
7819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007820sed 's/^/| /' conftest.$ac_ext >&5
7821
Martin v. Löwiseba40652007-08-30 20:10:57 +00007822 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007823fi
Brett Cannon19fab762007-06-02 03:02:29 +00007824
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7826fi
7827{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7828echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7829
7830# The cast to long int works around a bug in the HP C Compiler
7831# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7832# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7833# This bug is HP SR number 8606223364.
7834{ echo "$as_me:$LINENO: checking size of void *" >&5
7835echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007836if test "${ac_cv_sizeof_void_p+set}" = set; then
7837 echo $ECHO_N "(cached) $ECHO_C" >&6
7838else
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 if test "$cross_compiling" = yes; then
7840 # Depending upon the size, compute the lo and hi bounds.
7841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007842/* confdefs.h. */
7843_ACEOF
7844cat confdefs.h >>conftest.$ac_ext
7845cat >>conftest.$ac_ext <<_ACEOF
7846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007847$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007848 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007849int
7850main ()
7851{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007852static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007853test_array [0] = 0
7854
7855 ;
7856 return 0;
7857}
7858_ACEOF
7859rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007860if { (ac_try="$ac_compile"
7861case "(($ac_try" in
7862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7863 *) ac_try_echo=$ac_try;;
7864esac
7865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7866 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007868 grep -v '^ *+' conftest.er1 >conftest.err
7869 rm -f conftest.er1
7870 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007872 (exit $ac_status); } && {
7873 test -z "$ac_c_werror_flag" ||
7874 test ! -s conftest.err
7875 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007876 ac_lo=0 ac_mid=0
7877 while :; do
7878 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007879/* confdefs.h. */
7880_ACEOF
7881cat confdefs.h >>conftest.$ac_ext
7882cat >>conftest.$ac_ext <<_ACEOF
7883/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007884$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007886int
7887main ()
7888{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007889static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007890test_array [0] = 0
7891
7892 ;
7893 return 0;
7894}
7895_ACEOF
7896rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007897if { (ac_try="$ac_compile"
7898case "(($ac_try" in
7899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7900 *) ac_try_echo=$ac_try;;
7901esac
7902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007905 grep -v '^ *+' conftest.er1 >conftest.err
7906 rm -f conftest.er1
7907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909 (exit $ac_status); } && {
7910 test -z "$ac_c_werror_flag" ||
7911 test ! -s conftest.err
7912 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007913 ac_hi=$ac_mid; break
7914else
7915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007916sed 's/^/| /' conftest.$ac_ext >&5
7917
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918 ac_lo=`expr $ac_mid + 1`
7919 if test $ac_lo -le $ac_mid; then
7920 ac_lo= ac_hi=
7921 break
7922 fi
7923 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925
7926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 done
7928else
7929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007930sed 's/^/| /' conftest.$ac_ext >&5
7931
Martin v. Löwiseba40652007-08-30 20:10:57 +00007932 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007933/* confdefs.h. */
7934_ACEOF
7935cat confdefs.h >>conftest.$ac_ext
7936cat >>conftest.$ac_ext <<_ACEOF
7937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007938$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007939 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007940int
7941main ()
7942{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007943static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007944test_array [0] = 0
7945
7946 ;
7947 return 0;
7948}
7949_ACEOF
7950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007951if { (ac_try="$ac_compile"
7952case "(($ac_try" in
7953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7954 *) ac_try_echo=$ac_try;;
7955esac
7956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007959 grep -v '^ *+' conftest.er1 >conftest.err
7960 rm -f conftest.er1
7961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007963 (exit $ac_status); } && {
7964 test -z "$ac_c_werror_flag" ||
7965 test ! -s conftest.err
7966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ac_hi=-1 ac_mid=-1
7968 while :; do
7969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* confdefs.h. */
7971_ACEOF
7972cat confdefs.h >>conftest.$ac_ext
7973cat >>conftest.$ac_ext <<_ACEOF
7974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007975$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007977int
7978main ()
7979{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007980static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007981test_array [0] = 0
7982
7983 ;
7984 return 0;
7985}
7986_ACEOF
7987rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988if { (ac_try="$ac_compile"
7989case "(($ac_try" in
7990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7991 *) ac_try_echo=$ac_try;;
7992esac
7993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007996 grep -v '^ *+' conftest.er1 >conftest.err
7997 rm -f conftest.er1
7998 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 (exit $ac_status); } && {
8001 test -z "$ac_c_werror_flag" ||
8002 test ! -s conftest.err
8003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008004 ac_lo=$ac_mid; break
8005else
8006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008007sed 's/^/| /' conftest.$ac_ext >&5
8008
Martin v. Löwiseba40652007-08-30 20:10:57 +00008009 ac_hi=`expr '(' $ac_mid ')' - 1`
8010 if test $ac_mid -le $ac_hi; then
8011 ac_lo= ac_hi=
8012 break
8013 fi
8014 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008016
8017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 done
8019else
8020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008021sed 's/^/| /' conftest.$ac_ext >&5
8022
Martin v. Löwiseba40652007-08-30 20:10:57 +00008023 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025
8026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028
8029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008030# Binary search between lo and hi bounds.
8031while test "x$ac_lo" != "x$ac_hi"; do
8032 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8033 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008034/* confdefs.h. */
8035_ACEOF
8036cat confdefs.h >>conftest.$ac_ext
8037cat >>conftest.$ac_ext <<_ACEOF
8038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008039$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008040 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008044static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008045test_array [0] = 0
8046
8047 ;
8048 return 0;
8049}
8050_ACEOF
8051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052if { (ac_try="$ac_compile"
8053case "(($ac_try" in
8054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8055 *) ac_try_echo=$ac_try;;
8056esac
8057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008060 grep -v '^ *+' conftest.er1 >conftest.err
8061 rm -f conftest.er1
8062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008064 (exit $ac_status); } && {
8065 test -z "$ac_c_werror_flag" ||
8066 test ! -s conftest.err
8067 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008068 ac_hi=$ac_mid
8069else
8070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008071sed 's/^/| /' conftest.$ac_ext >&5
8072
Martin v. Löwiseba40652007-08-30 20:10:57 +00008073 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008075
8076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008077done
8078case $ac_lo in
8079?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080'') if test "$ac_cv_type_void_p" = yes; then
8081 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008082See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008083echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008084See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008085 { (exit 77); exit 77; }; }
8086 else
8087 ac_cv_sizeof_void_p=0
8088 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008089esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008090else
Martin v. Löwis11437992002-04-12 09:54:03 +00008091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008092/* confdefs.h. */
8093_ACEOF
8094cat confdefs.h >>conftest.$ac_ext
8095cat >>conftest.$ac_ext <<_ACEOF
8096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008097$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008098 typedef void * ac__type_sizeof_;
8099static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8100static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008101#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008102#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008103int
8104main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008105{
Martin v. Löwis11437992002-04-12 09:54:03 +00008106
8107 FILE *f = fopen ("conftest.val", "w");
8108 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008109 return 1;
8110 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008111 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008112 long int i = longval ();
8113 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8114 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 fprintf (f, "%ld\n", i);
8116 }
8117 else
8118 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 unsigned long int i = ulongval ();
8120 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8121 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008122 fprintf (f, "%lu\n", i);
8123 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008125
8126 ;
8127 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008128}
Martin v. Löwis11437992002-04-12 09:54:03 +00008129_ACEOF
8130rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131if { (ac_try="$ac_link"
8132case "(($ac_try" in
8133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8134 *) ac_try_echo=$ac_try;;
8135esac
8136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8137 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008138 ac_status=$?
8139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141 { (case "(($ac_try" in
8142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8143 *) ac_try_echo=$ac_try;;
8144esac
8145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8146 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ac_status=$?
8148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8149 (exit $ac_status); }; }; then
8150 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008151else
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 echo "$as_me: program exited with status $ac_status" >&5
8153echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008154sed 's/^/| /' conftest.$ac_ext >&5
8155
Martin v. Löwis11437992002-04-12 09:54:03 +00008156( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157if test "$ac_cv_type_void_p" = yes; then
8158 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008159See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008160echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008161See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008162 { (exit 77); exit 77; }; }
8163 else
8164 ac_cv_sizeof_void_p=0
8165 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167rm -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 +00008168fi
8169rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8172echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8173
8174
8175
Martin v. Löwis11437992002-04-12 09:54:03 +00008176cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008177#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008178_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008179
8180
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181{ echo "$as_me:$LINENO: checking for short" >&5
8182echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008183if test "${ac_cv_type_short+set}" = set; then
8184 echo $ECHO_N "(cached) $ECHO_C" >&6
8185else
8186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008187/* confdefs.h. */
8188_ACEOF
8189cat confdefs.h >>conftest.$ac_ext
8190cat >>conftest.$ac_ext <<_ACEOF
8191/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008192$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008193typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008194int
8195main ()
8196{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008197if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008198 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008199if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008200 return 0;
8201 ;
8202 return 0;
8203}
8204_ACEOF
8205rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206if { (ac_try="$ac_compile"
8207case "(($ac_try" in
8208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8209 *) ac_try_echo=$ac_try;;
8210esac
8211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008214 grep -v '^ *+' conftest.er1 >conftest.err
8215 rm -f conftest.er1
8216 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008218 (exit $ac_status); } && {
8219 test -z "$ac_c_werror_flag" ||
8220 test ! -s conftest.err
8221 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 ac_cv_type_short=yes
8223else
8224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008225sed 's/^/| /' conftest.$ac_ext >&5
8226
Martin v. Löwiseba40652007-08-30 20:10:57 +00008227 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008228fi
Brett Cannon19fab762007-06-02 03:02:29 +00008229
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8231fi
8232{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8233echo "${ECHO_T}$ac_cv_type_short" >&6; }
8234
8235# The cast to long int works around a bug in the HP C Compiler
8236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8238# This bug is HP SR number 8606223364.
8239{ echo "$as_me:$LINENO: checking size of short" >&5
8240echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008241if test "${ac_cv_sizeof_short+set}" = set; then
8242 echo $ECHO_N "(cached) $ECHO_C" >&6
8243else
Martin v. Löwis11437992002-04-12 09:54:03 +00008244 if test "$cross_compiling" = yes; then
8245 # Depending upon the size, compute the lo and hi bounds.
8246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008247/* confdefs.h. */
8248_ACEOF
8249cat confdefs.h >>conftest.$ac_ext
8250cat >>conftest.$ac_ext <<_ACEOF
8251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008252$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008253 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008254int
8255main ()
8256{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008257static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008258test_array [0] = 0
8259
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008265if { (ac_try="$ac_compile"
8266case "(($ac_try" in
8267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8268 *) ac_try_echo=$ac_try;;
8269esac
8270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8271 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008273 grep -v '^ *+' conftest.er1 >conftest.err
8274 rm -f conftest.er1
8275 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008277 (exit $ac_status); } && {
8278 test -z "$ac_c_werror_flag" ||
8279 test ! -s conftest.err
8280 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008281 ac_lo=0 ac_mid=0
8282 while :; do
8283 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008284/* confdefs.h. */
8285_ACEOF
8286cat confdefs.h >>conftest.$ac_ext
8287cat >>conftest.$ac_ext <<_ACEOF
8288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008289$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008290 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008291int
8292main ()
8293{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008294static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008295test_array [0] = 0
8296
8297 ;
8298 return 0;
8299}
8300_ACEOF
8301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008302if { (ac_try="$ac_compile"
8303case "(($ac_try" in
8304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8305 *) ac_try_echo=$ac_try;;
8306esac
8307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008310 grep -v '^ *+' conftest.er1 >conftest.err
8311 rm -f conftest.er1
8312 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008314 (exit $ac_status); } && {
8315 test -z "$ac_c_werror_flag" ||
8316 test ! -s conftest.err
8317 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008318 ac_hi=$ac_mid; break
8319else
8320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008321sed 's/^/| /' conftest.$ac_ext >&5
8322
Martin v. Löwiseba40652007-08-30 20:10:57 +00008323 ac_lo=`expr $ac_mid + 1`
8324 if test $ac_lo -le $ac_mid; then
8325 ac_lo= ac_hi=
8326 break
8327 fi
8328 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008330
8331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 done
8333else
8334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008335sed 's/^/| /' conftest.$ac_ext >&5
8336
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008338/* confdefs.h. */
8339_ACEOF
8340cat confdefs.h >>conftest.$ac_ext
8341cat >>conftest.$ac_ext <<_ACEOF
8342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008343$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008344 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008345int
8346main ()
8347{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008348static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008349test_array [0] = 0
8350
8351 ;
8352 return 0;
8353}
8354_ACEOF
8355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008356if { (ac_try="$ac_compile"
8357case "(($ac_try" in
8358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8359 *) ac_try_echo=$ac_try;;
8360esac
8361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008364 grep -v '^ *+' conftest.er1 >conftest.err
8365 rm -f conftest.er1
8366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008368 (exit $ac_status); } && {
8369 test -z "$ac_c_werror_flag" ||
8370 test ! -s conftest.err
8371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008372 ac_hi=-1 ac_mid=-1
8373 while :; do
8374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008375/* confdefs.h. */
8376_ACEOF
8377cat confdefs.h >>conftest.$ac_ext
8378cat >>conftest.$ac_ext <<_ACEOF
8379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008380$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008382int
8383main ()
8384{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008385static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008386test_array [0] = 0
8387
8388 ;
8389 return 0;
8390}
8391_ACEOF
8392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393if { (ac_try="$ac_compile"
8394case "(($ac_try" in
8395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8396 *) ac_try_echo=$ac_try;;
8397esac
8398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008401 grep -v '^ *+' conftest.er1 >conftest.err
8402 rm -f conftest.er1
8403 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405 (exit $ac_status); } && {
8406 test -z "$ac_c_werror_flag" ||
8407 test ! -s conftest.err
8408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008409 ac_lo=$ac_mid; break
8410else
8411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008412sed 's/^/| /' conftest.$ac_ext >&5
8413
Martin v. Löwiseba40652007-08-30 20:10:57 +00008414 ac_hi=`expr '(' $ac_mid ')' - 1`
8415 if test $ac_mid -le $ac_hi; then
8416 ac_lo= ac_hi=
8417 break
8418 fi
8419 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008421
8422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 done
8424else
8425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008426sed 's/^/| /' conftest.$ac_ext >&5
8427
Martin v. Löwiseba40652007-08-30 20:10:57 +00008428 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430
8431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008432fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433
8434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008435# Binary search between lo and hi bounds.
8436while test "x$ac_lo" != "x$ac_hi"; do
8437 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008439/* confdefs.h. */
8440_ACEOF
8441cat confdefs.h >>conftest.$ac_ext
8442cat >>conftest.$ac_ext <<_ACEOF
8443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008444$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008446int
8447main ()
8448{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008449static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008450test_array [0] = 0
8451
8452 ;
8453 return 0;
8454}
8455_ACEOF
8456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008457if { (ac_try="$ac_compile"
8458case "(($ac_try" in
8459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8460 *) ac_try_echo=$ac_try;;
8461esac
8462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008465 grep -v '^ *+' conftest.er1 >conftest.err
8466 rm -f conftest.er1
8467 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008469 (exit $ac_status); } && {
8470 test -z "$ac_c_werror_flag" ||
8471 test ! -s conftest.err
8472 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ac_hi=$ac_mid
8474else
8475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008476sed 's/^/| /' conftest.$ac_ext >&5
8477
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008480
8481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008482done
8483case $ac_lo in
8484?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485'') if test "$ac_cv_type_short" = yes; then
8486 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008487See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008488echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008489See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008490 { (exit 77); exit 77; }; }
8491 else
8492 ac_cv_sizeof_short=0
8493 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008494esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008495else
Martin v. Löwis11437992002-04-12 09:54:03 +00008496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008497/* confdefs.h. */
8498_ACEOF
8499cat confdefs.h >>conftest.$ac_ext
8500cat >>conftest.$ac_ext <<_ACEOF
8501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008502$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008503 typedef short ac__type_sizeof_;
8504static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8505static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008506#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008507#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008508int
8509main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008510{
Martin v. Löwis11437992002-04-12 09:54:03 +00008511
8512 FILE *f = fopen ("conftest.val", "w");
8513 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008514 return 1;
8515 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008516 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008517 long int i = longval ();
8518 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8519 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 fprintf (f, "%ld\n", i);
8521 }
8522 else
8523 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 unsigned long int i = ulongval ();
8525 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8526 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008527 fprintf (f, "%lu\n", i);
8528 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008530
8531 ;
8532 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008533}
Martin v. Löwis11437992002-04-12 09:54:03 +00008534_ACEOF
8535rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536if { (ac_try="$ac_link"
8537case "(($ac_try" in
8538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8539 *) ac_try_echo=$ac_try;;
8540esac
8541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8542 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 ac_status=$?
8544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546 { (case "(($ac_try" in
8547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8548 *) ac_try_echo=$ac_try;;
8549esac
8550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8551 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); }; }; then
8555 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008556else
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 echo "$as_me: program exited with status $ac_status" >&5
8558echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008559sed 's/^/| /' conftest.$ac_ext >&5
8560
Martin v. Löwis11437992002-04-12 09:54:03 +00008561( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562if test "$ac_cv_type_short" = yes; then
8563 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008564See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008565echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008566See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008567 { (exit 77); exit 77; }; }
8568 else
8569 ac_cv_sizeof_short=0
8570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572rm -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 +00008573fi
8574rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8577echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8578
8579
8580
Martin v. Löwis11437992002-04-12 09:54:03 +00008581cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008582#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008583_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008584
8585
Martin v. Löwiseba40652007-08-30 20:10:57 +00008586{ echo "$as_me:$LINENO: checking for float" >&5
8587echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008588if test "${ac_cv_type_float+set}" = set; then
8589 echo $ECHO_N "(cached) $ECHO_C" >&6
8590else
8591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008592/* confdefs.h. */
8593_ACEOF
8594cat confdefs.h >>conftest.$ac_ext
8595cat >>conftest.$ac_ext <<_ACEOF
8596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008597$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008598typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008599int
8600main ()
8601{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008602if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008604if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 return 0;
8606 ;
8607 return 0;
8608}
8609_ACEOF
8610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008611if { (ac_try="$ac_compile"
8612case "(($ac_try" in
8613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8614 *) ac_try_echo=$ac_try;;
8615esac
8616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008619 grep -v '^ *+' conftest.er1 >conftest.err
8620 rm -f conftest.er1
8621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008623 (exit $ac_status); } && {
8624 test -z "$ac_c_werror_flag" ||
8625 test ! -s conftest.err
8626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 ac_cv_type_float=yes
8628else
8629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008630sed 's/^/| /' conftest.$ac_ext >&5
8631
Martin v. Löwiseba40652007-08-30 20:10:57 +00008632 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008633fi
Brett Cannon19fab762007-06-02 03:02:29 +00008634
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8636fi
8637{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8638echo "${ECHO_T}$ac_cv_type_float" >&6; }
8639
8640# The cast to long int works around a bug in the HP C Compiler
8641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8643# This bug is HP SR number 8606223364.
8644{ echo "$as_me:$LINENO: checking size of float" >&5
8645echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008646if test "${ac_cv_sizeof_float+set}" = set; then
8647 echo $ECHO_N "(cached) $ECHO_C" >&6
8648else
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 if test "$cross_compiling" = yes; then
8650 # Depending upon the size, compute the lo and hi bounds.
8651cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008652/* confdefs.h. */
8653_ACEOF
8654cat confdefs.h >>conftest.$ac_ext
8655cat >>conftest.$ac_ext <<_ACEOF
8656/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008657$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008658 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
8661{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008662static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008663test_array [0] = 0
8664
8665 ;
8666 return 0;
8667}
8668_ACEOF
8669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008670if { (ac_try="$ac_compile"
8671case "(($ac_try" in
8672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8673 *) ac_try_echo=$ac_try;;
8674esac
8675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008678 grep -v '^ *+' conftest.er1 >conftest.err
8679 rm -f conftest.er1
8680 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682 (exit $ac_status); } && {
8683 test -z "$ac_c_werror_flag" ||
8684 test ! -s conftest.err
8685 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_lo=0 ac_mid=0
8687 while :; do
8688 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008689/* confdefs.h. */
8690_ACEOF
8691cat confdefs.h >>conftest.$ac_ext
8692cat >>conftest.$ac_ext <<_ACEOF
8693/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008694$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008695 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008696int
8697main ()
8698{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008699static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008700test_array [0] = 0
8701
8702 ;
8703 return 0;
8704}
8705_ACEOF
8706rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008707if { (ac_try="$ac_compile"
8708case "(($ac_try" in
8709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8710 *) ac_try_echo=$ac_try;;
8711esac
8712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8713 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008715 grep -v '^ *+' conftest.er1 >conftest.err
8716 rm -f conftest.er1
8717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008719 (exit $ac_status); } && {
8720 test -z "$ac_c_werror_flag" ||
8721 test ! -s conftest.err
8722 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008723 ac_hi=$ac_mid; break
8724else
8725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008726sed 's/^/| /' conftest.$ac_ext >&5
8727
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728 ac_lo=`expr $ac_mid + 1`
8729 if test $ac_lo -le $ac_mid; then
8730 ac_lo= ac_hi=
8731 break
8732 fi
8733 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008735
8736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 done
8738else
8739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008740sed 's/^/| /' conftest.$ac_ext >&5
8741
Martin v. Löwiseba40652007-08-30 20:10:57 +00008742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008743/* confdefs.h. */
8744_ACEOF
8745cat confdefs.h >>conftest.$ac_ext
8746cat >>conftest.$ac_ext <<_ACEOF
8747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008748$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008749 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008750int
8751main ()
8752{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008753static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008754test_array [0] = 0
8755
8756 ;
8757 return 0;
8758}
8759_ACEOF
8760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008761if { (ac_try="$ac_compile"
8762case "(($ac_try" in
8763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8764 *) ac_try_echo=$ac_try;;
8765esac
8766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008769 grep -v '^ *+' conftest.er1 >conftest.err
8770 rm -f conftest.er1
8771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773 (exit $ac_status); } && {
8774 test -z "$ac_c_werror_flag" ||
8775 test ! -s conftest.err
8776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_hi=-1 ac_mid=-1
8778 while :; do
8779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008780/* confdefs.h. */
8781_ACEOF
8782cat confdefs.h >>conftest.$ac_ext
8783cat >>conftest.$ac_ext <<_ACEOF
8784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008785$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008787int
8788main ()
8789{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008790static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008791test_array [0] = 0
8792
8793 ;
8794 return 0;
8795}
8796_ACEOF
8797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798if { (ac_try="$ac_compile"
8799case "(($ac_try" in
8800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8801 *) ac_try_echo=$ac_try;;
8802esac
8803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008806 grep -v '^ *+' conftest.er1 >conftest.err
8807 rm -f conftest.er1
8808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 (exit $ac_status); } && {
8811 test -z "$ac_c_werror_flag" ||
8812 test ! -s conftest.err
8813 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008814 ac_lo=$ac_mid; break
8815else
8816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008817sed 's/^/| /' conftest.$ac_ext >&5
8818
Martin v. Löwiseba40652007-08-30 20:10:57 +00008819 ac_hi=`expr '(' $ac_mid ')' - 1`
8820 if test $ac_mid -le $ac_hi; then
8821 ac_lo= ac_hi=
8822 break
8823 fi
8824 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826
8827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 done
8829else
8830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008831sed 's/^/| /' conftest.$ac_ext >&5
8832
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008835
8836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838
8839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008840# Binary search between lo and hi bounds.
8841while test "x$ac_lo" != "x$ac_hi"; do
8842 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008844/* confdefs.h. */
8845_ACEOF
8846cat confdefs.h >>conftest.$ac_ext
8847cat >>conftest.$ac_ext <<_ACEOF
8848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008849$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008851int
8852main ()
8853{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008854static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008855test_array [0] = 0
8856
8857 ;
8858 return 0;
8859}
8860_ACEOF
8861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008862if { (ac_try="$ac_compile"
8863case "(($ac_try" in
8864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8865 *) ac_try_echo=$ac_try;;
8866esac
8867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874 (exit $ac_status); } && {
8875 test -z "$ac_c_werror_flag" ||
8876 test ! -s conftest.err
8877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_hi=$ac_mid
8879else
8880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008881sed 's/^/| /' conftest.$ac_ext >&5
8882
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008885
8886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008887done
8888case $ac_lo in
8889?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890'') if test "$ac_cv_type_float" = yes; then
8891 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008892See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008893echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008894See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008895 { (exit 77); exit 77; }; }
8896 else
8897 ac_cv_sizeof_float=0
8898 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008899esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008900else
Martin v. Löwis11437992002-04-12 09:54:03 +00008901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008902/* confdefs.h. */
8903_ACEOF
8904cat confdefs.h >>conftest.$ac_ext
8905cat >>conftest.$ac_ext <<_ACEOF
8906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008908 typedef float ac__type_sizeof_;
8909static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8910static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008911#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008912#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008915{
Martin v. Löwis11437992002-04-12 09:54:03 +00008916
8917 FILE *f = fopen ("conftest.val", "w");
8918 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008919 return 1;
8920 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008922 long int i = longval ();
8923 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8924 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 fprintf (f, "%ld\n", i);
8926 }
8927 else
8928 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008929 unsigned long int i = ulongval ();
8930 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8931 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 fprintf (f, "%lu\n", i);
8933 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008935
8936 ;
8937 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008938}
Martin v. Löwis11437992002-04-12 09:54:03 +00008939_ACEOF
8940rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941if { (ac_try="$ac_link"
8942case "(($ac_try" in
8943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8944 *) ac_try_echo=$ac_try;;
8945esac
8946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8947 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_status=$?
8949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951 { (case "(($ac_try" in
8952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8953 *) ac_try_echo=$ac_try;;
8954esac
8955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8956 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 ac_status=$?
8958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8959 (exit $ac_status); }; }; then
8960 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008961else
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 echo "$as_me: program exited with status $ac_status" >&5
8963echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008964sed 's/^/| /' conftest.$ac_ext >&5
8965
Martin v. Löwis11437992002-04-12 09:54:03 +00008966( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967if test "$ac_cv_type_float" = yes; then
8968 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008969See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008970echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008971See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008972 { (exit 77); exit 77; }; }
8973 else
8974 ac_cv_sizeof_float=0
8975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977rm -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 +00008978fi
8979rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8982echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8983
8984
8985
Martin v. Löwis11437992002-04-12 09:54:03 +00008986cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008987#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008988_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008989
8990
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991{ echo "$as_me:$LINENO: checking for double" >&5
8992echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008993if test "${ac_cv_type_double+set}" = set; then
8994 echo $ECHO_N "(cached) $ECHO_C" >&6
8995else
8996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008997/* confdefs.h. */
8998_ACEOF
8999cat confdefs.h >>conftest.$ac_ext
9000cat >>conftest.$ac_ext <<_ACEOF
9001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009002$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009003typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009004int
9005main ()
9006{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009007if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009009if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 return 0;
9011 ;
9012 return 0;
9013}
9014_ACEOF
9015rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016if { (ac_try="$ac_compile"
9017case "(($ac_try" in
9018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9019 *) ac_try_echo=$ac_try;;
9020esac
9021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009024 grep -v '^ *+' conftest.er1 >conftest.err
9025 rm -f conftest.er1
9026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028 (exit $ac_status); } && {
9029 test -z "$ac_c_werror_flag" ||
9030 test ! -s conftest.err
9031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ac_cv_type_double=yes
9033else
9034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009035sed 's/^/| /' conftest.$ac_ext >&5
9036
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009038fi
Brett Cannon19fab762007-06-02 03:02:29 +00009039
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9041fi
9042{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9043echo "${ECHO_T}$ac_cv_type_double" >&6; }
9044
9045# The cast to long int works around a bug in the HP C Compiler
9046# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9047# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9048# This bug is HP SR number 8606223364.
9049{ echo "$as_me:$LINENO: checking size of double" >&5
9050echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009051if test "${ac_cv_sizeof_double+set}" = set; then
9052 echo $ECHO_N "(cached) $ECHO_C" >&6
9053else
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 if test "$cross_compiling" = yes; then
9055 # Depending upon the size, compute the lo and hi bounds.
9056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009057/* confdefs.h. */
9058_ACEOF
9059cat confdefs.h >>conftest.$ac_ext
9060cat >>conftest.$ac_ext <<_ACEOF
9061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009062$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009063 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009064int
9065main ()
9066{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009068test_array [0] = 0
9069
9070 ;
9071 return 0;
9072}
9073_ACEOF
9074rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009075if { (ac_try="$ac_compile"
9076case "(($ac_try" in
9077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9078 *) ac_try_echo=$ac_try;;
9079esac
9080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009083 grep -v '^ *+' conftest.er1 >conftest.err
9084 rm -f conftest.er1
9085 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009087 (exit $ac_status); } && {
9088 test -z "$ac_c_werror_flag" ||
9089 test ! -s conftest.err
9090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009091 ac_lo=0 ac_mid=0
9092 while :; do
9093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009094/* confdefs.h. */
9095_ACEOF
9096cat confdefs.h >>conftest.$ac_ext
9097cat >>conftest.$ac_ext <<_ACEOF
9098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009099$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009100 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009101int
9102main ()
9103{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009104static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009105test_array [0] = 0
9106
9107 ;
9108 return 0;
9109}
9110_ACEOF
9111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009112if { (ac_try="$ac_compile"
9113case "(($ac_try" in
9114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9115 *) ac_try_echo=$ac_try;;
9116esac
9117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009120 grep -v '^ *+' conftest.er1 >conftest.err
9121 rm -f conftest.er1
9122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009124 (exit $ac_status); } && {
9125 test -z "$ac_c_werror_flag" ||
9126 test ! -s conftest.err
9127 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009128 ac_hi=$ac_mid; break
9129else
9130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009131sed 's/^/| /' conftest.$ac_ext >&5
9132
Martin v. Löwiseba40652007-08-30 20:10:57 +00009133 ac_lo=`expr $ac_mid + 1`
9134 if test $ac_lo -le $ac_mid; then
9135 ac_lo= ac_hi=
9136 break
9137 fi
9138 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009140
9141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 done
9143else
9144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009145sed 's/^/| /' conftest.$ac_ext >&5
9146
Martin v. Löwiseba40652007-08-30 20:10:57 +00009147 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009153$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009154 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009155int
9156main ()
9157{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009158static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009159test_array [0] = 0
9160
9161 ;
9162 return 0;
9163}
9164_ACEOF
9165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009166if { (ac_try="$ac_compile"
9167case "(($ac_try" in
9168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9169 *) ac_try_echo=$ac_try;;
9170esac
9171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009174 grep -v '^ *+' conftest.er1 >conftest.err
9175 rm -f conftest.er1
9176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009178 (exit $ac_status); } && {
9179 test -z "$ac_c_werror_flag" ||
9180 test ! -s conftest.err
9181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 ac_hi=-1 ac_mid=-1
9183 while :; do
9184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009185/* confdefs.h. */
9186_ACEOF
9187cat confdefs.h >>conftest.$ac_ext
9188cat >>conftest.$ac_ext <<_ACEOF
9189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009190$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009191 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009192int
9193main ()
9194{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009195static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009196test_array [0] = 0
9197
9198 ;
9199 return 0;
9200}
9201_ACEOF
9202rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203if { (ac_try="$ac_compile"
9204case "(($ac_try" in
9205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9206 *) ac_try_echo=$ac_try;;
9207esac
9208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009211 grep -v '^ *+' conftest.er1 >conftest.err
9212 rm -f conftest.er1
9213 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215 (exit $ac_status); } && {
9216 test -z "$ac_c_werror_flag" ||
9217 test ! -s conftest.err
9218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ac_lo=$ac_mid; break
9220else
9221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009222sed 's/^/| /' conftest.$ac_ext >&5
9223
Martin v. Löwiseba40652007-08-30 20:10:57 +00009224 ac_hi=`expr '(' $ac_mid ')' - 1`
9225 if test $ac_mid -le $ac_hi; then
9226 ac_lo= ac_hi=
9227 break
9228 fi
9229 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009231
9232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 done
9234else
9235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009236sed 's/^/| /' conftest.$ac_ext >&5
9237
Martin v. Löwiseba40652007-08-30 20:10:57 +00009238 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240
9241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009243
9244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009245# Binary search between lo and hi bounds.
9246while test "x$ac_lo" != "x$ac_hi"; do
9247 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009249/* confdefs.h. */
9250_ACEOF
9251cat confdefs.h >>conftest.$ac_ext
9252cat >>conftest.$ac_ext <<_ACEOF
9253/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009254$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009255 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009256int
9257main ()
9258{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009259static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009260test_array [0] = 0
9261
9262 ;
9263 return 0;
9264}
9265_ACEOF
9266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009267if { (ac_try="$ac_compile"
9268case "(($ac_try" in
9269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9270 *) ac_try_echo=$ac_try;;
9271esac
9272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009275 grep -v '^ *+' conftest.er1 >conftest.err
9276 rm -f conftest.er1
9277 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009279 (exit $ac_status); } && {
9280 test -z "$ac_c_werror_flag" ||
9281 test ! -s conftest.err
9282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009283 ac_hi=$ac_mid
9284else
9285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009286sed 's/^/| /' conftest.$ac_ext >&5
9287
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009290
9291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009292done
9293case $ac_lo in
9294?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295'') if test "$ac_cv_type_double" = yes; then
9296 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009297See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009298echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009299See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009300 { (exit 77); exit 77; }; }
9301 else
9302 ac_cv_sizeof_double=0
9303 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009304esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009305else
Martin v. Löwis11437992002-04-12 09:54:03 +00009306 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009307/* confdefs.h. */
9308_ACEOF
9309cat confdefs.h >>conftest.$ac_ext
9310cat >>conftest.$ac_ext <<_ACEOF
9311/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009312$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009313 typedef double ac__type_sizeof_;
9314static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9315static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009316#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009317#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009318int
9319main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009320{
Martin v. Löwis11437992002-04-12 09:54:03 +00009321
9322 FILE *f = fopen ("conftest.val", "w");
9323 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009324 return 1;
9325 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327 long int i = longval ();
9328 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9329 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 fprintf (f, "%ld\n", i);
9331 }
9332 else
9333 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009334 unsigned long int i = ulongval ();
9335 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9336 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 fprintf (f, "%lu\n", i);
9338 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009340
9341 ;
9342 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009343}
Martin v. Löwis11437992002-04-12 09:54:03 +00009344_ACEOF
9345rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346if { (ac_try="$ac_link"
9347case "(($ac_try" in
9348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9349 *) ac_try_echo=$ac_try;;
9350esac
9351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9352 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 ac_status=$?
9354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356 { (case "(($ac_try" in
9357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9358 *) ac_try_echo=$ac_try;;
9359esac
9360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9361 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 ac_status=$?
9363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9364 (exit $ac_status); }; }; then
9365 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009366else
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 echo "$as_me: program exited with status $ac_status" >&5
9368echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009369sed 's/^/| /' conftest.$ac_ext >&5
9370
Martin v. Löwis11437992002-04-12 09:54:03 +00009371( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372if test "$ac_cv_type_double" = yes; then
9373 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009374See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009375echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009376See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009377 { (exit 77); exit 77; }; }
9378 else
9379 ac_cv_sizeof_double=0
9380 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382rm -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 +00009383fi
9384rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9387echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9388
9389
9390
Martin v. Löwis11437992002-04-12 09:54:03 +00009391cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009392#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009393_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009394
9395
Martin v. Löwiseba40652007-08-30 20:10:57 +00009396{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9397echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009398if test "${ac_cv_type_fpos_t+set}" = set; then
9399 echo $ECHO_N "(cached) $ECHO_C" >&6
9400else
9401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009402/* confdefs.h. */
9403_ACEOF
9404cat confdefs.h >>conftest.$ac_ext
9405cat >>conftest.$ac_ext <<_ACEOF
9406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009407$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009408typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009409int
9410main ()
9411{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009412if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009413 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 return 0;
9416 ;
9417 return 0;
9418}
9419_ACEOF
9420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009421if { (ac_try="$ac_compile"
9422case "(($ac_try" in
9423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9424 *) ac_try_echo=$ac_try;;
9425esac
9426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009429 grep -v '^ *+' conftest.er1 >conftest.err
9430 rm -f conftest.er1
9431 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009433 (exit $ac_status); } && {
9434 test -z "$ac_c_werror_flag" ||
9435 test ! -s conftest.err
9436 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 ac_cv_type_fpos_t=yes
9438else
9439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009440sed 's/^/| /' conftest.$ac_ext >&5
9441
Martin v. Löwiseba40652007-08-30 20:10:57 +00009442 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009443fi
Brett Cannon19fab762007-06-02 03:02:29 +00009444
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9446fi
9447{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9448echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9449
9450# The cast to long int works around a bug in the HP C Compiler
9451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9453# This bug is HP SR number 8606223364.
9454{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9455echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009456if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9457 echo $ECHO_N "(cached) $ECHO_C" >&6
9458else
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 if test "$cross_compiling" = yes; then
9460 # Depending upon the size, compute the lo and hi bounds.
9461cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* confdefs.h. */
9463_ACEOF
9464cat confdefs.h >>conftest.$ac_ext
9465cat >>conftest.$ac_ext <<_ACEOF
9466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009467$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009468 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009469int
9470main ()
9471{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009472static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009473test_array [0] = 0
9474
9475 ;
9476 return 0;
9477}
9478_ACEOF
9479rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009480if { (ac_try="$ac_compile"
9481case "(($ac_try" in
9482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9483 *) ac_try_echo=$ac_try;;
9484esac
9485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9486 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009487 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009488 grep -v '^ *+' conftest.er1 >conftest.err
9489 rm -f conftest.er1
9490 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009492 (exit $ac_status); } && {
9493 test -z "$ac_c_werror_flag" ||
9494 test ! -s conftest.err
9495 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ac_lo=0 ac_mid=0
9497 while :; do
9498 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009499/* confdefs.h. */
9500_ACEOF
9501cat confdefs.h >>conftest.$ac_ext
9502cat >>conftest.$ac_ext <<_ACEOF
9503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009505 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009506int
9507main ()
9508{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009509static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009510test_array [0] = 0
9511
9512 ;
9513 return 0;
9514}
9515_ACEOF
9516rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517if { (ac_try="$ac_compile"
9518case "(($ac_try" in
9519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9520 *) ac_try_echo=$ac_try;;
9521esac
9522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9523 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009525 grep -v '^ *+' conftest.er1 >conftest.err
9526 rm -f conftest.er1
9527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009529 (exit $ac_status); } && {
9530 test -z "$ac_c_werror_flag" ||
9531 test ! -s conftest.err
9532 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 ac_hi=$ac_mid; break
9534else
9535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009536sed 's/^/| /' conftest.$ac_ext >&5
9537
Martin v. Löwiseba40652007-08-30 20:10:57 +00009538 ac_lo=`expr $ac_mid + 1`
9539 if test $ac_lo -le $ac_mid; then
9540 ac_lo= ac_hi=
9541 break
9542 fi
9543 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009545
9546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 done
9548else
9549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009550sed 's/^/| /' conftest.$ac_ext >&5
9551
Martin v. Löwiseba40652007-08-30 20:10:57 +00009552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009553/* confdefs.h. */
9554_ACEOF
9555cat confdefs.h >>conftest.$ac_ext
9556cat >>conftest.$ac_ext <<_ACEOF
9557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009558$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009559 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009560int
9561main ()
9562{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009563static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009564test_array [0] = 0
9565
9566 ;
9567 return 0;
9568}
9569_ACEOF
9570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009571if { (ac_try="$ac_compile"
9572case "(($ac_try" in
9573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9574 *) ac_try_echo=$ac_try;;
9575esac
9576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009579 grep -v '^ *+' conftest.er1 >conftest.err
9580 rm -f conftest.er1
9581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009583 (exit $ac_status); } && {
9584 test -z "$ac_c_werror_flag" ||
9585 test ! -s conftest.err
9586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ac_hi=-1 ac_mid=-1
9588 while :; do
9589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* confdefs.h. */
9591_ACEOF
9592cat confdefs.h >>conftest.$ac_ext
9593cat >>conftest.$ac_ext <<_ACEOF
9594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009595$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009597int
9598main ()
9599{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009600static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009601test_array [0] = 0
9602
9603 ;
9604 return 0;
9605}
9606_ACEOF
9607rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608if { (ac_try="$ac_compile"
9609case "(($ac_try" in
9610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9611 *) ac_try_echo=$ac_try;;
9612esac
9613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009616 grep -v '^ *+' conftest.er1 >conftest.err
9617 rm -f conftest.er1
9618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620 (exit $ac_status); } && {
9621 test -z "$ac_c_werror_flag" ||
9622 test ! -s conftest.err
9623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_lo=$ac_mid; break
9625else
9626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009627sed 's/^/| /' conftest.$ac_ext >&5
9628
Martin v. Löwiseba40652007-08-30 20:10:57 +00009629 ac_hi=`expr '(' $ac_mid ')' - 1`
9630 if test $ac_mid -le $ac_hi; then
9631 ac_lo= ac_hi=
9632 break
9633 fi
9634 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009636
9637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 done
9639else
9640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009641sed 's/^/| /' conftest.$ac_ext >&5
9642
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645
9646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009648
9649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009650# Binary search between lo and hi bounds.
9651while test "x$ac_lo" != "x$ac_hi"; do
9652 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009654/* confdefs.h. */
9655_ACEOF
9656cat confdefs.h >>conftest.$ac_ext
9657cat >>conftest.$ac_ext <<_ACEOF
9658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009659$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009661int
9662main ()
9663{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009664static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009665test_array [0] = 0
9666
9667 ;
9668 return 0;
9669}
9670_ACEOF
9671rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672if { (ac_try="$ac_compile"
9673case "(($ac_try" in
9674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9675 *) ac_try_echo=$ac_try;;
9676esac
9677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9678 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009680 grep -v '^ *+' conftest.er1 >conftest.err
9681 rm -f conftest.er1
9682 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009684 (exit $ac_status); } && {
9685 test -z "$ac_c_werror_flag" ||
9686 test ! -s conftest.err
9687 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_hi=$ac_mid
9689else
9690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009691sed 's/^/| /' conftest.$ac_ext >&5
9692
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009695
9696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009697done
9698case $ac_lo in
9699?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700'') if test "$ac_cv_type_fpos_t" = yes; then
9701 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009702See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009703echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009704See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705 { (exit 77); exit 77; }; }
9706 else
9707 ac_cv_sizeof_fpos_t=0
9708 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009709esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009710else
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009712/* confdefs.h. */
9713_ACEOF
9714cat confdefs.h >>conftest.$ac_ext
9715cat >>conftest.$ac_ext <<_ACEOF
9716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009718 typedef fpos_t ac__type_sizeof_;
9719static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9720static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009721#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009722#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009723int
9724main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009725{
Martin v. Löwis11437992002-04-12 09:54:03 +00009726
9727 FILE *f = fopen ("conftest.val", "w");
9728 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009729 return 1;
9730 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009732 long int i = longval ();
9733 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9734 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 fprintf (f, "%ld\n", i);
9736 }
9737 else
9738 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009739 unsigned long int i = ulongval ();
9740 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9741 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 fprintf (f, "%lu\n", i);
9743 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009745
9746 ;
9747 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009748}
Martin v. Löwis11437992002-04-12 09:54:03 +00009749_ACEOF
9750rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751if { (ac_try="$ac_link"
9752case "(($ac_try" in
9753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9754 *) ac_try_echo=$ac_try;;
9755esac
9756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9757 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009758 ac_status=$?
9759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761 { (case "(($ac_try" in
9762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9763 *) ac_try_echo=$ac_try;;
9764esac
9765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9766 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 ac_status=$?
9768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9769 (exit $ac_status); }; }; then
9770 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009771else
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 echo "$as_me: program exited with status $ac_status" >&5
9773echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009774sed 's/^/| /' conftest.$ac_ext >&5
9775
Martin v. Löwis11437992002-04-12 09:54:03 +00009776( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777if test "$ac_cv_type_fpos_t" = yes; then
9778 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009779See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009780echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009781See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009782 { (exit 77); exit 77; }; }
9783 else
9784 ac_cv_sizeof_fpos_t=0
9785 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787rm -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 +00009788fi
9789rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9792echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9793
9794
9795
Martin v. Löwis11437992002-04-12 09:54:03 +00009796cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009797#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009798_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009799
Michael W. Hudson54241132001-12-07 15:38:26 +00009800
Martin v. Löwiseba40652007-08-30 20:10:57 +00009801{ echo "$as_me:$LINENO: checking for size_t" >&5
9802echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009803if test "${ac_cv_type_size_t+set}" = set; then
9804 echo $ECHO_N "(cached) $ECHO_C" >&6
9805else
9806 cat >conftest.$ac_ext <<_ACEOF
9807/* confdefs.h. */
9808_ACEOF
9809cat confdefs.h >>conftest.$ac_ext
9810cat >>conftest.$ac_ext <<_ACEOF
9811/* end confdefs.h. */
9812$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009813typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009814int
9815main ()
9816{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009817if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009818 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009820 return 0;
9821 ;
9822 return 0;
9823}
9824_ACEOF
9825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009826if { (ac_try="$ac_compile"
9827case "(($ac_try" in
9828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9829 *) ac_try_echo=$ac_try;;
9830esac
9831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009833 ac_status=$?
9834 grep -v '^ *+' conftest.er1 >conftest.err
9835 rm -f conftest.er1
9836 cat conftest.err >&5
9837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009838 (exit $ac_status); } && {
9839 test -z "$ac_c_werror_flag" ||
9840 test ! -s conftest.err
9841 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009842 ac_cv_type_size_t=yes
9843else
9844 echo "$as_me: failed program was:" >&5
9845sed 's/^/| /' conftest.$ac_ext >&5
9846
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009848fi
Brett Cannon19fab762007-06-02 03:02:29 +00009849
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9851fi
9852{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9853echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9854
9855# The cast to long int works around a bug in the HP C Compiler
9856# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9857# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9858# This bug is HP SR number 8606223364.
9859{ echo "$as_me:$LINENO: checking size of size_t" >&5
9860echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009861if test "${ac_cv_sizeof_size_t+set}" = set; then
9862 echo $ECHO_N "(cached) $ECHO_C" >&6
9863else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009864 if test "$cross_compiling" = yes; then
9865 # Depending upon the size, compute the lo and hi bounds.
9866cat >conftest.$ac_ext <<_ACEOF
9867/* confdefs.h. */
9868_ACEOF
9869cat confdefs.h >>conftest.$ac_ext
9870cat >>conftest.$ac_ext <<_ACEOF
9871/* end confdefs.h. */
9872$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009873 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009874int
9875main ()
9876{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009877static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009878test_array [0] = 0
9879
9880 ;
9881 return 0;
9882}
9883_ACEOF
9884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009885if { (ac_try="$ac_compile"
9886case "(($ac_try" in
9887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9888 *) ac_try_echo=$ac_try;;
9889esac
9890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009892 ac_status=$?
9893 grep -v '^ *+' conftest.er1 >conftest.err
9894 rm -f conftest.er1
9895 cat conftest.err >&5
9896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009897 (exit $ac_status); } && {
9898 test -z "$ac_c_werror_flag" ||
9899 test ! -s conftest.err
9900 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009901 ac_lo=0 ac_mid=0
9902 while :; do
9903 cat >conftest.$ac_ext <<_ACEOF
9904/* confdefs.h. */
9905_ACEOF
9906cat confdefs.h >>conftest.$ac_ext
9907cat >>conftest.$ac_ext <<_ACEOF
9908/* end confdefs.h. */
9909$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009911int
9912main ()
9913{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009915test_array [0] = 0
9916
9917 ;
9918 return 0;
9919}
9920_ACEOF
9921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009922if { (ac_try="$ac_compile"
9923case "(($ac_try" in
9924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9925 *) ac_try_echo=$ac_try;;
9926esac
9927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009929 ac_status=$?
9930 grep -v '^ *+' conftest.er1 >conftest.err
9931 rm -f conftest.er1
9932 cat conftest.err >&5
9933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934 (exit $ac_status); } && {
9935 test -z "$ac_c_werror_flag" ||
9936 test ! -s conftest.err
9937 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009938 ac_hi=$ac_mid; break
9939else
9940 echo "$as_me: failed program was:" >&5
9941sed 's/^/| /' conftest.$ac_ext >&5
9942
Martin v. Löwiseba40652007-08-30 20:10:57 +00009943 ac_lo=`expr $ac_mid + 1`
9944 if test $ac_lo -le $ac_mid; then
9945 ac_lo= ac_hi=
9946 break
9947 fi
9948 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009950
9951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009952 done
9953else
9954 echo "$as_me: failed program was:" >&5
9955sed 's/^/| /' conftest.$ac_ext >&5
9956
Martin v. Löwiseba40652007-08-30 20:10:57 +00009957 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009958/* confdefs.h. */
9959_ACEOF
9960cat confdefs.h >>conftest.$ac_ext
9961cat >>conftest.$ac_ext <<_ACEOF
9962/* end confdefs.h. */
9963$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009964 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009965int
9966main ()
9967{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009968static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009969test_array [0] = 0
9970
9971 ;
9972 return 0;
9973}
9974_ACEOF
9975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976if { (ac_try="$ac_compile"
9977case "(($ac_try" in
9978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9979 *) ac_try_echo=$ac_try;;
9980esac
9981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009983 ac_status=$?
9984 grep -v '^ *+' conftest.er1 >conftest.err
9985 rm -f conftest.er1
9986 cat conftest.err >&5
9987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009988 (exit $ac_status); } && {
9989 test -z "$ac_c_werror_flag" ||
9990 test ! -s conftest.err
9991 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009992 ac_hi=-1 ac_mid=-1
9993 while :; do
9994 cat >conftest.$ac_ext <<_ACEOF
9995/* confdefs.h. */
9996_ACEOF
9997cat confdefs.h >>conftest.$ac_ext
9998cat >>conftest.$ac_ext <<_ACEOF
9999/* end confdefs.h. */
10000$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010002int
10003main ()
10004{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010005static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010006test_array [0] = 0
10007
10008 ;
10009 return 0;
10010}
10011_ACEOF
10012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013if { (ac_try="$ac_compile"
10014case "(($ac_try" in
10015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10016 *) ac_try_echo=$ac_try;;
10017esac
10018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010020 ac_status=$?
10021 grep -v '^ *+' conftest.er1 >conftest.err
10022 rm -f conftest.er1
10023 cat conftest.err >&5
10024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 (exit $ac_status); } && {
10026 test -z "$ac_c_werror_flag" ||
10027 test ! -s conftest.err
10028 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010029 ac_lo=$ac_mid; break
10030else
10031 echo "$as_me: failed program was:" >&5
10032sed 's/^/| /' conftest.$ac_ext >&5
10033
Martin v. Löwiseba40652007-08-30 20:10:57 +000010034 ac_hi=`expr '(' $ac_mid ')' - 1`
10035 if test $ac_mid -le $ac_hi; then
10036 ac_lo= ac_hi=
10037 break
10038 fi
10039 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010040fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010041
10042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010043 done
10044else
10045 echo "$as_me: failed program was:" >&5
10046sed 's/^/| /' conftest.$ac_ext >&5
10047
Martin v. Löwiseba40652007-08-30 20:10:57 +000010048 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050
10051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053
10054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010055# Binary search between lo and hi bounds.
10056while test "x$ac_lo" != "x$ac_hi"; do
10057 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10058 cat >conftest.$ac_ext <<_ACEOF
10059/* confdefs.h. */
10060_ACEOF
10061cat confdefs.h >>conftest.$ac_ext
10062cat >>conftest.$ac_ext <<_ACEOF
10063/* end confdefs.h. */
10064$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010066int
10067main ()
10068{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010069static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010070test_array [0] = 0
10071
10072 ;
10073 return 0;
10074}
10075_ACEOF
10076rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010077if { (ac_try="$ac_compile"
10078case "(($ac_try" in
10079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080 *) ac_try_echo=$ac_try;;
10081esac
10082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10083 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010084 ac_status=$?
10085 grep -v '^ *+' conftest.er1 >conftest.err
10086 rm -f conftest.er1
10087 cat conftest.err >&5
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010089 (exit $ac_status); } && {
10090 test -z "$ac_c_werror_flag" ||
10091 test ! -s conftest.err
10092 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010093 ac_hi=$ac_mid
10094else
10095 echo "$as_me: failed program was:" >&5
10096sed 's/^/| /' conftest.$ac_ext >&5
10097
Martin v. Löwiseba40652007-08-30 20:10:57 +000010098 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010100
10101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010102done
10103case $ac_lo in
10104?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105'') if test "$ac_cv_type_size_t" = yes; then
10106 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010107See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010108echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010109See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010110 { (exit 77); exit 77; }; }
10111 else
10112 ac_cv_sizeof_size_t=0
10113 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010114esac
10115else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010116 cat >conftest.$ac_ext <<_ACEOF
10117/* confdefs.h. */
10118_ACEOF
10119cat confdefs.h >>conftest.$ac_ext
10120cat >>conftest.$ac_ext <<_ACEOF
10121/* end confdefs.h. */
10122$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010123 typedef size_t ac__type_sizeof_;
10124static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10125static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010126#include <stdio.h>
10127#include <stdlib.h>
10128int
10129main ()
10130{
10131
10132 FILE *f = fopen ("conftest.val", "w");
10133 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010134 return 1;
10135 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010136 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010137 long int i = longval ();
10138 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10139 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010140 fprintf (f, "%ld\n", i);
10141 }
10142 else
10143 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010144 unsigned long int i = ulongval ();
10145 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10146 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010147 fprintf (f, "%lu\n", i);
10148 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010150
10151 ;
10152 return 0;
10153}
10154_ACEOF
10155rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156if { (ac_try="$ac_link"
10157case "(($ac_try" in
10158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10159 *) ac_try_echo=$ac_try;;
10160esac
10161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10162 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010163 ac_status=$?
10164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010166 { (case "(($ac_try" in
10167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10168 *) ac_try_echo=$ac_try;;
10169esac
10170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10171 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010172 ac_status=$?
10173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10174 (exit $ac_status); }; }; then
10175 ac_cv_sizeof_size_t=`cat conftest.val`
10176else
10177 echo "$as_me: program exited with status $ac_status" >&5
10178echo "$as_me: failed program was:" >&5
10179sed 's/^/| /' conftest.$ac_ext >&5
10180
10181( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182if test "$ac_cv_type_size_t" = yes; then
10183 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010184See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010185echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010186See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010187 { (exit 77); exit 77; }; }
10188 else
10189 ac_cv_sizeof_size_t=0
10190 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192rm -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 +000010193fi
10194rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10197echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10198
10199
10200
Martin v. Löwis18e16552006-02-15 17:27:45 +000010201cat >>confdefs.h <<_ACEOF
10202#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10203_ACEOF
10204
10205
Christian Heimes951cc0f2008-01-31 23:08:23 +000010206{ echo "$as_me:$LINENO: checking for pid_t" >&5
10207echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10208if test "${ac_cv_type_pid_t+set}" = set; then
10209 echo $ECHO_N "(cached) $ECHO_C" >&6
10210else
10211 cat >conftest.$ac_ext <<_ACEOF
10212/* confdefs.h. */
10213_ACEOF
10214cat confdefs.h >>conftest.$ac_ext
10215cat >>conftest.$ac_ext <<_ACEOF
10216/* end confdefs.h. */
10217$ac_includes_default
10218typedef pid_t ac__type_new_;
10219int
10220main ()
10221{
10222if ((ac__type_new_ *) 0)
10223 return 0;
10224if (sizeof (ac__type_new_))
10225 return 0;
10226 ;
10227 return 0;
10228}
10229_ACEOF
10230rm -f conftest.$ac_objext
10231if { (ac_try="$ac_compile"
10232case "(($ac_try" in
10233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10234 *) ac_try_echo=$ac_try;;
10235esac
10236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10237 (eval "$ac_compile") 2>conftest.er1
10238 ac_status=$?
10239 grep -v '^ *+' conftest.er1 >conftest.err
10240 rm -f conftest.er1
10241 cat conftest.err >&5
10242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10243 (exit $ac_status); } && {
10244 test -z "$ac_c_werror_flag" ||
10245 test ! -s conftest.err
10246 } && test -s conftest.$ac_objext; then
10247 ac_cv_type_pid_t=yes
10248else
10249 echo "$as_me: failed program was:" >&5
10250sed 's/^/| /' conftest.$ac_ext >&5
10251
10252 ac_cv_type_pid_t=no
10253fi
10254
10255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10256fi
10257{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10258echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10259
10260# The cast to long int works around a bug in the HP C Compiler
10261# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10262# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10263# This bug is HP SR number 8606223364.
10264{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10265echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10266if test "${ac_cv_sizeof_pid_t+set}" = set; then
10267 echo $ECHO_N "(cached) $ECHO_C" >&6
10268else
10269 if test "$cross_compiling" = yes; then
10270 # Depending upon the size, compute the lo and hi bounds.
10271cat >conftest.$ac_ext <<_ACEOF
10272/* confdefs.h. */
10273_ACEOF
10274cat confdefs.h >>conftest.$ac_ext
10275cat >>conftest.$ac_ext <<_ACEOF
10276/* end confdefs.h. */
10277$ac_includes_default
10278 typedef pid_t ac__type_sizeof_;
10279int
10280main ()
10281{
10282static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10283test_array [0] = 0
10284
10285 ;
10286 return 0;
10287}
10288_ACEOF
10289rm -f conftest.$ac_objext
10290if { (ac_try="$ac_compile"
10291case "(($ac_try" in
10292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10293 *) ac_try_echo=$ac_try;;
10294esac
10295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10296 (eval "$ac_compile") 2>conftest.er1
10297 ac_status=$?
10298 grep -v '^ *+' conftest.er1 >conftest.err
10299 rm -f conftest.er1
10300 cat conftest.err >&5
10301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10302 (exit $ac_status); } && {
10303 test -z "$ac_c_werror_flag" ||
10304 test ! -s conftest.err
10305 } && test -s conftest.$ac_objext; then
10306 ac_lo=0 ac_mid=0
10307 while :; do
10308 cat >conftest.$ac_ext <<_ACEOF
10309/* confdefs.h. */
10310_ACEOF
10311cat confdefs.h >>conftest.$ac_ext
10312cat >>conftest.$ac_ext <<_ACEOF
10313/* end confdefs.h. */
10314$ac_includes_default
10315 typedef pid_t ac__type_sizeof_;
10316int
10317main ()
10318{
10319static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10320test_array [0] = 0
10321
10322 ;
10323 return 0;
10324}
10325_ACEOF
10326rm -f conftest.$ac_objext
10327if { (ac_try="$ac_compile"
10328case "(($ac_try" in
10329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10330 *) ac_try_echo=$ac_try;;
10331esac
10332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10333 (eval "$ac_compile") 2>conftest.er1
10334 ac_status=$?
10335 grep -v '^ *+' conftest.er1 >conftest.err
10336 rm -f conftest.er1
10337 cat conftest.err >&5
10338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10339 (exit $ac_status); } && {
10340 test -z "$ac_c_werror_flag" ||
10341 test ! -s conftest.err
10342 } && test -s conftest.$ac_objext; then
10343 ac_hi=$ac_mid; break
10344else
10345 echo "$as_me: failed program was:" >&5
10346sed 's/^/| /' conftest.$ac_ext >&5
10347
10348 ac_lo=`expr $ac_mid + 1`
10349 if test $ac_lo -le $ac_mid; then
10350 ac_lo= ac_hi=
10351 break
10352 fi
10353 ac_mid=`expr 2 '*' $ac_mid + 1`
10354fi
10355
10356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10357 done
10358else
10359 echo "$as_me: failed program was:" >&5
10360sed 's/^/| /' conftest.$ac_ext >&5
10361
10362 cat >conftest.$ac_ext <<_ACEOF
10363/* confdefs.h. */
10364_ACEOF
10365cat confdefs.h >>conftest.$ac_ext
10366cat >>conftest.$ac_ext <<_ACEOF
10367/* end confdefs.h. */
10368$ac_includes_default
10369 typedef pid_t ac__type_sizeof_;
10370int
10371main ()
10372{
10373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10374test_array [0] = 0
10375
10376 ;
10377 return 0;
10378}
10379_ACEOF
10380rm -f conftest.$ac_objext
10381if { (ac_try="$ac_compile"
10382case "(($ac_try" in
10383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10384 *) ac_try_echo=$ac_try;;
10385esac
10386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10387 (eval "$ac_compile") 2>conftest.er1
10388 ac_status=$?
10389 grep -v '^ *+' conftest.er1 >conftest.err
10390 rm -f conftest.er1
10391 cat conftest.err >&5
10392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10393 (exit $ac_status); } && {
10394 test -z "$ac_c_werror_flag" ||
10395 test ! -s conftest.err
10396 } && test -s conftest.$ac_objext; then
10397 ac_hi=-1 ac_mid=-1
10398 while :; do
10399 cat >conftest.$ac_ext <<_ACEOF
10400/* confdefs.h. */
10401_ACEOF
10402cat confdefs.h >>conftest.$ac_ext
10403cat >>conftest.$ac_ext <<_ACEOF
10404/* end confdefs.h. */
10405$ac_includes_default
10406 typedef pid_t ac__type_sizeof_;
10407int
10408main ()
10409{
10410static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10411test_array [0] = 0
10412
10413 ;
10414 return 0;
10415}
10416_ACEOF
10417rm -f conftest.$ac_objext
10418if { (ac_try="$ac_compile"
10419case "(($ac_try" in
10420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10421 *) ac_try_echo=$ac_try;;
10422esac
10423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10424 (eval "$ac_compile") 2>conftest.er1
10425 ac_status=$?
10426 grep -v '^ *+' conftest.er1 >conftest.err
10427 rm -f conftest.er1
10428 cat conftest.err >&5
10429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10430 (exit $ac_status); } && {
10431 test -z "$ac_c_werror_flag" ||
10432 test ! -s conftest.err
10433 } && test -s conftest.$ac_objext; then
10434 ac_lo=$ac_mid; break
10435else
10436 echo "$as_me: failed program was:" >&5
10437sed 's/^/| /' conftest.$ac_ext >&5
10438
10439 ac_hi=`expr '(' $ac_mid ')' - 1`
10440 if test $ac_mid -le $ac_hi; then
10441 ac_lo= ac_hi=
10442 break
10443 fi
10444 ac_mid=`expr 2 '*' $ac_mid`
10445fi
10446
10447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10448 done
10449else
10450 echo "$as_me: failed program was:" >&5
10451sed 's/^/| /' conftest.$ac_ext >&5
10452
10453 ac_lo= ac_hi=
10454fi
10455
10456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10457fi
10458
10459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10460# Binary search between lo and hi bounds.
10461while test "x$ac_lo" != "x$ac_hi"; do
10462 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10463 cat >conftest.$ac_ext <<_ACEOF
10464/* confdefs.h. */
10465_ACEOF
10466cat confdefs.h >>conftest.$ac_ext
10467cat >>conftest.$ac_ext <<_ACEOF
10468/* end confdefs.h. */
10469$ac_includes_default
10470 typedef pid_t ac__type_sizeof_;
10471int
10472main ()
10473{
10474static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10475test_array [0] = 0
10476
10477 ;
10478 return 0;
10479}
10480_ACEOF
10481rm -f conftest.$ac_objext
10482if { (ac_try="$ac_compile"
10483case "(($ac_try" in
10484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10485 *) ac_try_echo=$ac_try;;
10486esac
10487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10488 (eval "$ac_compile") 2>conftest.er1
10489 ac_status=$?
10490 grep -v '^ *+' conftest.er1 >conftest.err
10491 rm -f conftest.er1
10492 cat conftest.err >&5
10493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10494 (exit $ac_status); } && {
10495 test -z "$ac_c_werror_flag" ||
10496 test ! -s conftest.err
10497 } && test -s conftest.$ac_objext; then
10498 ac_hi=$ac_mid
10499else
10500 echo "$as_me: failed program was:" >&5
10501sed 's/^/| /' conftest.$ac_ext >&5
10502
10503 ac_lo=`expr '(' $ac_mid ')' + 1`
10504fi
10505
10506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10507done
10508case $ac_lo in
10509?*) ac_cv_sizeof_pid_t=$ac_lo;;
10510'') if test "$ac_cv_type_pid_t" = yes; then
10511 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10512See \`config.log' for more details." >&5
10513echo "$as_me: error: cannot compute sizeof (pid_t)
10514See \`config.log' for more details." >&2;}
10515 { (exit 77); exit 77; }; }
10516 else
10517 ac_cv_sizeof_pid_t=0
10518 fi ;;
10519esac
10520else
10521 cat >conftest.$ac_ext <<_ACEOF
10522/* confdefs.h. */
10523_ACEOF
10524cat confdefs.h >>conftest.$ac_ext
10525cat >>conftest.$ac_ext <<_ACEOF
10526/* end confdefs.h. */
10527$ac_includes_default
10528 typedef pid_t ac__type_sizeof_;
10529static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10530static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10531#include <stdio.h>
10532#include <stdlib.h>
10533int
10534main ()
10535{
10536
10537 FILE *f = fopen ("conftest.val", "w");
10538 if (! f)
10539 return 1;
10540 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10541 {
10542 long int i = longval ();
10543 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10544 return 1;
10545 fprintf (f, "%ld\n", i);
10546 }
10547 else
10548 {
10549 unsigned long int i = ulongval ();
10550 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10551 return 1;
10552 fprintf (f, "%lu\n", i);
10553 }
10554 return ferror (f) || fclose (f) != 0;
10555
10556 ;
10557 return 0;
10558}
10559_ACEOF
10560rm -f conftest$ac_exeext
10561if { (ac_try="$ac_link"
10562case "(($ac_try" in
10563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10564 *) ac_try_echo=$ac_try;;
10565esac
10566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10567 (eval "$ac_link") 2>&5
10568 ac_status=$?
10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10571 { (case "(($ac_try" in
10572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10573 *) ac_try_echo=$ac_try;;
10574esac
10575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10576 (eval "$ac_try") 2>&5
10577 ac_status=$?
10578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10579 (exit $ac_status); }; }; then
10580 ac_cv_sizeof_pid_t=`cat conftest.val`
10581else
10582 echo "$as_me: program exited with status $ac_status" >&5
10583echo "$as_me: failed program was:" >&5
10584sed 's/^/| /' conftest.$ac_ext >&5
10585
10586( exit $ac_status )
10587if test "$ac_cv_type_pid_t" = yes; then
10588 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10589See \`config.log' for more details." >&5
10590echo "$as_me: error: cannot compute sizeof (pid_t)
10591See \`config.log' for more details." >&2;}
10592 { (exit 77); exit 77; }; }
10593 else
10594 ac_cv_sizeof_pid_t=0
10595 fi
10596fi
10597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10598fi
10599rm -f conftest.val
10600fi
10601{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10602echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10603
10604
10605
10606cat >>confdefs.h <<_ACEOF
10607#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10608_ACEOF
10609
10610
Michael W. Hudson54241132001-12-07 15:38:26 +000010611
Martin v. Löwiseba40652007-08-30 20:10:57 +000010612{ echo "$as_me:$LINENO: checking for long long support" >&5
10613echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010614have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010616/* confdefs.h. */
10617_ACEOF
10618cat confdefs.h >>conftest.$ac_ext
10619cat >>conftest.$ac_ext <<_ACEOF
10620/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010621
Martin v. Löwis11437992002-04-12 09:54:03 +000010622int
10623main ()
10624{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010625long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 ;
10627 return 0;
10628}
10629_ACEOF
10630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010631if { (ac_try="$ac_compile"
10632case "(($ac_try" in
10633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10634 *) ac_try_echo=$ac_try;;
10635esac
10636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010639 grep -v '^ *+' conftest.er1 >conftest.err
10640 rm -f conftest.er1
10641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010643 (exit $ac_status); } && {
10644 test -z "$ac_c_werror_flag" ||
10645 test ! -s conftest.err
10646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010647
10648
10649cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010650#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010651_ACEOF
10652
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010653 have_long_long=yes
10654
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010655else
Martin v. Löwis11437992002-04-12 09:54:03 +000010656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010657sed 's/^/| /' conftest.$ac_ext >&5
10658
Martin v. Löwiseba40652007-08-30 20:10:57 +000010659
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661
10662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10663{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10664echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010665if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010666{ echo "$as_me:$LINENO: checking for long long" >&5
10667echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010668if test "${ac_cv_type_long_long+set}" = set; then
10669 echo $ECHO_N "(cached) $ECHO_C" >&6
10670else
10671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010672/* confdefs.h. */
10673_ACEOF
10674cat confdefs.h >>conftest.$ac_ext
10675cat >>conftest.$ac_ext <<_ACEOF
10676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010678typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010679int
10680main ()
10681{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010682if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010683 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010684if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010685 return 0;
10686 ;
10687 return 0;
10688}
10689_ACEOF
10690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691if { (ac_try="$ac_compile"
10692case "(($ac_try" in
10693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10694 *) ac_try_echo=$ac_try;;
10695esac
10696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10697 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010698 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010699 grep -v '^ *+' conftest.er1 >conftest.err
10700 rm -f conftest.er1
10701 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010703 (exit $ac_status); } && {
10704 test -z "$ac_c_werror_flag" ||
10705 test ! -s conftest.err
10706 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010707 ac_cv_type_long_long=yes
10708else
10709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010710sed 's/^/| /' conftest.$ac_ext >&5
10711
Martin v. Löwiseba40652007-08-30 20:10:57 +000010712 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010713fi
Brett Cannon19fab762007-06-02 03:02:29 +000010714
Martin v. Löwiseba40652007-08-30 20:10:57 +000010715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10716fi
10717{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10718echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10719
10720# The cast to long int works around a bug in the HP C Compiler
10721# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10722# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10723# This bug is HP SR number 8606223364.
10724{ echo "$as_me:$LINENO: checking size of long long" >&5
10725echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010726if test "${ac_cv_sizeof_long_long+set}" = set; then
10727 echo $ECHO_N "(cached) $ECHO_C" >&6
10728else
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 if test "$cross_compiling" = yes; then
10730 # Depending upon the size, compute the lo and hi bounds.
10731cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* confdefs.h. */
10733_ACEOF
10734cat confdefs.h >>conftest.$ac_ext
10735cat >>conftest.$ac_ext <<_ACEOF
10736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010737$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010738 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010739int
10740main ()
10741{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010743test_array [0] = 0
10744
10745 ;
10746 return 0;
10747}
10748_ACEOF
10749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750if { (ac_try="$ac_compile"
10751case "(($ac_try" in
10752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10753 *) ac_try_echo=$ac_try;;
10754esac
10755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010758 grep -v '^ *+' conftest.er1 >conftest.err
10759 rm -f conftest.er1
10760 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010762 (exit $ac_status); } && {
10763 test -z "$ac_c_werror_flag" ||
10764 test ! -s conftest.err
10765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 ac_lo=0 ac_mid=0
10767 while :; do
10768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010769/* confdefs.h. */
10770_ACEOF
10771cat confdefs.h >>conftest.$ac_ext
10772cat >>conftest.$ac_ext <<_ACEOF
10773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010774$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010775 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010776int
10777main ()
10778{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010779static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010780test_array [0] = 0
10781
10782 ;
10783 return 0;
10784}
10785_ACEOF
10786rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010787if { (ac_try="$ac_compile"
10788case "(($ac_try" in
10789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10790 *) ac_try_echo=$ac_try;;
10791esac
10792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010795 grep -v '^ *+' conftest.er1 >conftest.err
10796 rm -f conftest.er1
10797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010799 (exit $ac_status); } && {
10800 test -z "$ac_c_werror_flag" ||
10801 test ! -s conftest.err
10802 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010803 ac_hi=$ac_mid; break
10804else
10805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010806sed 's/^/| /' conftest.$ac_ext >&5
10807
Martin v. Löwiseba40652007-08-30 20:10:57 +000010808 ac_lo=`expr $ac_mid + 1`
10809 if test $ac_lo -le $ac_mid; then
10810 ac_lo= ac_hi=
10811 break
10812 fi
10813 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010815
10816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010817 done
10818else
10819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010820sed 's/^/| /' conftest.$ac_ext >&5
10821
Martin v. Löwiseba40652007-08-30 20:10:57 +000010822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010823/* confdefs.h. */
10824_ACEOF
10825cat confdefs.h >>conftest.$ac_ext
10826cat >>conftest.$ac_ext <<_ACEOF
10827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010828$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010829 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010830int
10831main ()
10832{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010833static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010834test_array [0] = 0
10835
10836 ;
10837 return 0;
10838}
10839_ACEOF
10840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010841if { (ac_try="$ac_compile"
10842case "(($ac_try" in
10843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10844 *) ac_try_echo=$ac_try;;
10845esac
10846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10847 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010849 grep -v '^ *+' conftest.er1 >conftest.err
10850 rm -f conftest.er1
10851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010853 (exit $ac_status); } && {
10854 test -z "$ac_c_werror_flag" ||
10855 test ! -s conftest.err
10856 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 ac_hi=-1 ac_mid=-1
10858 while :; do
10859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* confdefs.h. */
10861_ACEOF
10862cat confdefs.h >>conftest.$ac_ext
10863cat >>conftest.$ac_ext <<_ACEOF
10864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010865$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010866 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010867int
10868main ()
10869{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010870static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010871test_array [0] = 0
10872
10873 ;
10874 return 0;
10875}
10876_ACEOF
10877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010878if { (ac_try="$ac_compile"
10879case "(($ac_try" in
10880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10881 *) ac_try_echo=$ac_try;;
10882esac
10883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010886 grep -v '^ *+' conftest.er1 >conftest.err
10887 rm -f conftest.er1
10888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890 (exit $ac_status); } && {
10891 test -z "$ac_c_werror_flag" ||
10892 test ! -s conftest.err
10893 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010894 ac_lo=$ac_mid; break
10895else
10896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010897sed 's/^/| /' conftest.$ac_ext >&5
10898
Martin v. Löwiseba40652007-08-30 20:10:57 +000010899 ac_hi=`expr '(' $ac_mid ')' - 1`
10900 if test $ac_mid -le $ac_hi; then
10901 ac_lo= ac_hi=
10902 break
10903 fi
10904 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010906
10907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010908 done
10909else
10910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010911sed 's/^/| /' conftest.$ac_ext >&5
10912
Martin v. Löwiseba40652007-08-30 20:10:57 +000010913 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010915
10916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010918
10919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010920# Binary search between lo and hi bounds.
10921while test "x$ac_lo" != "x$ac_hi"; do
10922 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010924/* confdefs.h. */
10925_ACEOF
10926cat confdefs.h >>conftest.$ac_ext
10927cat >>conftest.$ac_ext <<_ACEOF
10928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010929$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010930 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010931int
10932main ()
10933{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010934static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010935test_array [0] = 0
10936
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010942if { (ac_try="$ac_compile"
10943case "(($ac_try" in
10944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10945 *) ac_try_echo=$ac_try;;
10946esac
10947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010950 grep -v '^ *+' conftest.er1 >conftest.err
10951 rm -f conftest.er1
10952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010954 (exit $ac_status); } && {
10955 test -z "$ac_c_werror_flag" ||
10956 test ! -s conftest.err
10957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 ac_hi=$ac_mid
10959else
10960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010961sed 's/^/| /' conftest.$ac_ext >&5
10962
Martin v. Löwiseba40652007-08-30 20:10:57 +000010963 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010965
10966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010967done
10968case $ac_lo in
10969?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970'') if test "$ac_cv_type_long_long" = yes; then
10971 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010972See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010973echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010974See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010975 { (exit 77); exit 77; }; }
10976 else
10977 ac_cv_sizeof_long_long=0
10978 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010979esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010980else
Martin v. Löwis11437992002-04-12 09:54:03 +000010981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010982/* confdefs.h. */
10983_ACEOF
10984cat confdefs.h >>conftest.$ac_ext
10985cat >>conftest.$ac_ext <<_ACEOF
10986/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010987$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010988 typedef long long ac__type_sizeof_;
10989static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10990static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010991#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010992#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010993int
10994main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010995{
Martin v. Löwis11437992002-04-12 09:54:03 +000010996
10997 FILE *f = fopen ("conftest.val", "w");
10998 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010999 return 1;
11000 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011001 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011002 long int i = longval ();
11003 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11004 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 fprintf (f, "%ld\n", i);
11006 }
11007 else
11008 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011009 unsigned long int i = ulongval ();
11010 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11011 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011012 fprintf (f, "%lu\n", i);
11013 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011015
11016 ;
11017 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011018}
Martin v. Löwis11437992002-04-12 09:54:03 +000011019_ACEOF
11020rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021if { (ac_try="$ac_link"
11022case "(($ac_try" in
11023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11024 *) ac_try_echo=$ac_try;;
11025esac
11026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11027 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011028 ac_status=$?
11029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011031 { (case "(($ac_try" in
11032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11033 *) ac_try_echo=$ac_try;;
11034esac
11035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11036 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 ac_status=$?
11038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11039 (exit $ac_status); }; }; then
11040 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011041else
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 echo "$as_me: program exited with status $ac_status" >&5
11043echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011044sed 's/^/| /' conftest.$ac_ext >&5
11045
Martin v. Löwis11437992002-04-12 09:54:03 +000011046( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011047if test "$ac_cv_type_long_long" = yes; then
11048 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011049See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011050echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011051See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052 { (exit 77); exit 77; }; }
11053 else
11054 ac_cv_sizeof_long_long=0
11055 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011056fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011057rm -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 +000011058fi
11059rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11062echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11063
11064
11065
Martin v. Löwis11437992002-04-12 09:54:03 +000011066cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011067#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011068_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011069
Michael W. Hudson54241132001-12-07 15:38:26 +000011070
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011071fi
11072
Martin v. Löwiseba40652007-08-30 20:10:57 +000011073{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11074echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011075have_c99_bool=no
11076cat >conftest.$ac_ext <<_ACEOF
11077/* confdefs.h. */
11078_ACEOF
11079cat confdefs.h >>conftest.$ac_ext
11080cat >>conftest.$ac_ext <<_ACEOF
11081/* end confdefs.h. */
11082
11083int
11084main ()
11085{
11086_Bool x; x = (_Bool)0;
11087 ;
11088 return 0;
11089}
11090_ACEOF
11091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011092if { (ac_try="$ac_compile"
11093case "(($ac_try" in
11094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11095 *) ac_try_echo=$ac_try;;
11096esac
11097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11098 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011099 ac_status=$?
11100 grep -v '^ *+' conftest.er1 >conftest.err
11101 rm -f conftest.er1
11102 cat conftest.err >&5
11103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104 (exit $ac_status); } && {
11105 test -z "$ac_c_werror_flag" ||
11106 test ! -s conftest.err
11107 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011108
11109
11110cat >>confdefs.h <<\_ACEOF
11111#define HAVE_C99_BOOL 1
11112_ACEOF
11113
11114 have_c99_bool=yes
11115
11116else
11117 echo "$as_me: failed program was:" >&5
11118sed 's/^/| /' conftest.$ac_ext >&5
11119
Martin v. Löwiseba40652007-08-30 20:10:57 +000011120
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011122
11123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11124{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11125echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011126if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011127{ echo "$as_me:$LINENO: checking for _Bool" >&5
11128echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011129if test "${ac_cv_type__Bool+set}" = set; then
11130 echo $ECHO_N "(cached) $ECHO_C" >&6
11131else
11132 cat >conftest.$ac_ext <<_ACEOF
11133/* confdefs.h. */
11134_ACEOF
11135cat confdefs.h >>conftest.$ac_ext
11136cat >>conftest.$ac_ext <<_ACEOF
11137/* end confdefs.h. */
11138$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011139typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011140int
11141main ()
11142{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011143if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011144 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011145if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011146 return 0;
11147 ;
11148 return 0;
11149}
11150_ACEOF
11151rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011152if { (ac_try="$ac_compile"
11153case "(($ac_try" in
11154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11155 *) ac_try_echo=$ac_try;;
11156esac
11157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011159 ac_status=$?
11160 grep -v '^ *+' conftest.er1 >conftest.err
11161 rm -f conftest.er1
11162 cat conftest.err >&5
11163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011164 (exit $ac_status); } && {
11165 test -z "$ac_c_werror_flag" ||
11166 test ! -s conftest.err
11167 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011168 ac_cv_type__Bool=yes
11169else
11170 echo "$as_me: failed program was:" >&5
11171sed 's/^/| /' conftest.$ac_ext >&5
11172
Martin v. Löwiseba40652007-08-30 20:10:57 +000011173 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011174fi
Brett Cannon19fab762007-06-02 03:02:29 +000011175
Martin v. Löwiseba40652007-08-30 20:10:57 +000011176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11177fi
11178{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11179echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11180
11181# The cast to long int works around a bug in the HP C Compiler
11182# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11183# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11184# This bug is HP SR number 8606223364.
11185{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11186echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011187if test "${ac_cv_sizeof__Bool+set}" = set; then
11188 echo $ECHO_N "(cached) $ECHO_C" >&6
11189else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011190 if test "$cross_compiling" = yes; then
11191 # Depending upon the size, compute the lo and hi bounds.
11192cat >conftest.$ac_ext <<_ACEOF
11193/* confdefs.h. */
11194_ACEOF
11195cat confdefs.h >>conftest.$ac_ext
11196cat >>conftest.$ac_ext <<_ACEOF
11197/* end confdefs.h. */
11198$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011200int
11201main ()
11202{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011203static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011204test_array [0] = 0
11205
11206 ;
11207 return 0;
11208}
11209_ACEOF
11210rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011211if { (ac_try="$ac_compile"
11212case "(($ac_try" in
11213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11214 *) ac_try_echo=$ac_try;;
11215esac
11216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011218 ac_status=$?
11219 grep -v '^ *+' conftest.er1 >conftest.err
11220 rm -f conftest.er1
11221 cat conftest.err >&5
11222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011223 (exit $ac_status); } && {
11224 test -z "$ac_c_werror_flag" ||
11225 test ! -s conftest.err
11226 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011227 ac_lo=0 ac_mid=0
11228 while :; do
11229 cat >conftest.$ac_ext <<_ACEOF
11230/* confdefs.h. */
11231_ACEOF
11232cat confdefs.h >>conftest.$ac_ext
11233cat >>conftest.$ac_ext <<_ACEOF
11234/* end confdefs.h. */
11235$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011236 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011237int
11238main ()
11239{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011240static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011241test_array [0] = 0
11242
11243 ;
11244 return 0;
11245}
11246_ACEOF
11247rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011248if { (ac_try="$ac_compile"
11249case "(($ac_try" in
11250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11251 *) ac_try_echo=$ac_try;;
11252esac
11253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11254 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011255 ac_status=$?
11256 grep -v '^ *+' conftest.er1 >conftest.err
11257 rm -f conftest.er1
11258 cat conftest.err >&5
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011260 (exit $ac_status); } && {
11261 test -z "$ac_c_werror_flag" ||
11262 test ! -s conftest.err
11263 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011264 ac_hi=$ac_mid; break
11265else
11266 echo "$as_me: failed program was:" >&5
11267sed 's/^/| /' conftest.$ac_ext >&5
11268
Martin v. Löwiseba40652007-08-30 20:10:57 +000011269 ac_lo=`expr $ac_mid + 1`
11270 if test $ac_lo -le $ac_mid; then
11271 ac_lo= ac_hi=
11272 break
11273 fi
11274 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011276
11277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011278 done
11279else
11280 echo "$as_me: failed program was:" >&5
11281sed 's/^/| /' conftest.$ac_ext >&5
11282
Martin v. Löwiseba40652007-08-30 20:10:57 +000011283 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011284/* confdefs.h. */
11285_ACEOF
11286cat confdefs.h >>conftest.$ac_ext
11287cat >>conftest.$ac_ext <<_ACEOF
11288/* end confdefs.h. */
11289$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011290 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011291int
11292main ()
11293{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011294static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011295test_array [0] = 0
11296
11297 ;
11298 return 0;
11299}
11300_ACEOF
11301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011302if { (ac_try="$ac_compile"
11303case "(($ac_try" in
11304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11305 *) ac_try_echo=$ac_try;;
11306esac
11307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011309 ac_status=$?
11310 grep -v '^ *+' conftest.er1 >conftest.err
11311 rm -f conftest.er1
11312 cat conftest.err >&5
11313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011314 (exit $ac_status); } && {
11315 test -z "$ac_c_werror_flag" ||
11316 test ! -s conftest.err
11317 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011318 ac_hi=-1 ac_mid=-1
11319 while :; do
11320 cat >conftest.$ac_ext <<_ACEOF
11321/* confdefs.h. */
11322_ACEOF
11323cat confdefs.h >>conftest.$ac_ext
11324cat >>conftest.$ac_ext <<_ACEOF
11325/* end confdefs.h. */
11326$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011327 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011328int
11329main ()
11330{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011331static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011332test_array [0] = 0
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
11344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011346 ac_status=$?
11347 grep -v '^ *+' conftest.er1 >conftest.err
11348 rm -f conftest.er1
11349 cat conftest.err >&5
11350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351 (exit $ac_status); } && {
11352 test -z "$ac_c_werror_flag" ||
11353 test ! -s conftest.err
11354 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011355 ac_lo=$ac_mid; break
11356else
11357 echo "$as_me: failed program was:" >&5
11358sed 's/^/| /' conftest.$ac_ext >&5
11359
Martin v. Löwiseba40652007-08-30 20:10:57 +000011360 ac_hi=`expr '(' $ac_mid ')' - 1`
11361 if test $ac_mid -le $ac_hi; then
11362 ac_lo= ac_hi=
11363 break
11364 fi
11365 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011367
11368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011369 done
11370else
11371 echo "$as_me: failed program was:" >&5
11372sed 's/^/| /' conftest.$ac_ext >&5
11373
Martin v. Löwiseba40652007-08-30 20:10:57 +000011374 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011375fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011376
11377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011379
11380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011381# Binary search between lo and hi bounds.
11382while test "x$ac_lo" != "x$ac_hi"; do
11383 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11384 cat >conftest.$ac_ext <<_ACEOF
11385/* confdefs.h. */
11386_ACEOF
11387cat confdefs.h >>conftest.$ac_ext
11388cat >>conftest.$ac_ext <<_ACEOF
11389/* end confdefs.h. */
11390$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011392int
11393main ()
11394{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011395static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011396test_array [0] = 0
11397
11398 ;
11399 return 0;
11400}
11401_ACEOF
11402rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011403if { (ac_try="$ac_compile"
11404case "(($ac_try" in
11405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11406 *) ac_try_echo=$ac_try;;
11407esac
11408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011410 ac_status=$?
11411 grep -v '^ *+' conftest.er1 >conftest.err
11412 rm -f conftest.er1
11413 cat conftest.err >&5
11414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011415 (exit $ac_status); } && {
11416 test -z "$ac_c_werror_flag" ||
11417 test ! -s conftest.err
11418 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011419 ac_hi=$ac_mid
11420else
11421 echo "$as_me: failed program was:" >&5
11422sed 's/^/| /' conftest.$ac_ext >&5
11423
Martin v. Löwiseba40652007-08-30 20:10:57 +000011424 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011426
11427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011428done
11429case $ac_lo in
11430?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011431'') if test "$ac_cv_type__Bool" = yes; then
11432 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011433See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011434echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011435See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436 { (exit 77); exit 77; }; }
11437 else
11438 ac_cv_sizeof__Bool=0
11439 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011440esac
11441else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011442 cat >conftest.$ac_ext <<_ACEOF
11443/* confdefs.h. */
11444_ACEOF
11445cat confdefs.h >>conftest.$ac_ext
11446cat >>conftest.$ac_ext <<_ACEOF
11447/* end confdefs.h. */
11448$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011449 typedef _Bool ac__type_sizeof_;
11450static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11451static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011452#include <stdio.h>
11453#include <stdlib.h>
11454int
11455main ()
11456{
11457
11458 FILE *f = fopen ("conftest.val", "w");
11459 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 return 1;
11461 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011462 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011463 long int i = longval ();
11464 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11465 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011466 fprintf (f, "%ld\n", i);
11467 }
11468 else
11469 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011470 unsigned long int i = ulongval ();
11471 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11472 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011473 fprintf (f, "%lu\n", i);
11474 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011475 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011476
11477 ;
11478 return 0;
11479}
11480_ACEOF
11481rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482if { (ac_try="$ac_link"
11483case "(($ac_try" in
11484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11485 *) ac_try_echo=$ac_try;;
11486esac
11487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11488 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011489 ac_status=$?
11490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011492 { (case "(($ac_try" in
11493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11494 *) ac_try_echo=$ac_try;;
11495esac
11496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11497 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011498 ac_status=$?
11499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11500 (exit $ac_status); }; }; then
11501 ac_cv_sizeof__Bool=`cat conftest.val`
11502else
11503 echo "$as_me: program exited with status $ac_status" >&5
11504echo "$as_me: failed program was:" >&5
11505sed 's/^/| /' conftest.$ac_ext >&5
11506
11507( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011508if test "$ac_cv_type__Bool" = yes; then
11509 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011510See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011511echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011512See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513 { (exit 77); exit 77; }; }
11514 else
11515 ac_cv_sizeof__Bool=0
11516 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011518rm -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 +000011519fi
11520rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011521fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11523echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11524
11525
11526
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011527cat >>confdefs.h <<_ACEOF
11528#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11529_ACEOF
11530
11531
11532fi
11533
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11535echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011536if test "${ac_cv_type_uintptr_t+set}" = set; then
11537 echo $ECHO_N "(cached) $ECHO_C" >&6
11538else
11539 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011540/* confdefs.h. */
11541_ACEOF
11542cat confdefs.h >>conftest.$ac_ext
11543cat >>conftest.$ac_ext <<_ACEOF
11544/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011545#ifdef HAVE_STDINT_H
11546 #include <stdint.h>
11547 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011548
Martin v. Löwiseba40652007-08-30 20:10:57 +000011549typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011550int
11551main ()
11552{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011554 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011556 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ;
11558 return 0;
11559}
11560_ACEOF
11561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562if { (ac_try="$ac_compile"
11563case "(($ac_try" in
11564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11565 *) ac_try_echo=$ac_try;;
11566esac
11567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011570 grep -v '^ *+' conftest.er1 >conftest.err
11571 rm -f conftest.er1
11572 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574 (exit $ac_status); } && {
11575 test -z "$ac_c_werror_flag" ||
11576 test ! -s conftest.err
11577 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011578 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011579else
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011581sed 's/^/| /' conftest.$ac_ext >&5
11582
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011585
11586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11589echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011590if test $ac_cv_type_uintptr_t = yes; then
11591
11592cat >>confdefs.h <<_ACEOF
11593#define HAVE_UINTPTR_T 1
11594_ACEOF
11595
Martin v. Löwiseba40652007-08-30 20:10:57 +000011596{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11597echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011598if test "${ac_cv_type_uintptr_t+set}" = set; then
11599 echo $ECHO_N "(cached) $ECHO_C" >&6
11600else
11601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011602/* confdefs.h. */
11603_ACEOF
11604cat confdefs.h >>conftest.$ac_ext
11605cat >>conftest.$ac_ext <<_ACEOF
11606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011607$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011608typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011609int
11610main ()
11611{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011612if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011613 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011615 return 0;
11616 ;
11617 return 0;
11618}
11619_ACEOF
11620rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011621if { (ac_try="$ac_compile"
11622case "(($ac_try" in
11623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11624 *) ac_try_echo=$ac_try;;
11625esac
11626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011629 grep -v '^ *+' conftest.er1 >conftest.err
11630 rm -f conftest.er1
11631 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011633 (exit $ac_status); } && {
11634 test -z "$ac_c_werror_flag" ||
11635 test ! -s conftest.err
11636 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011637 ac_cv_type_uintptr_t=yes
11638else
11639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011640sed 's/^/| /' conftest.$ac_ext >&5
11641
Martin v. Löwiseba40652007-08-30 20:10:57 +000011642 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011643fi
Brett Cannon19fab762007-06-02 03:02:29 +000011644
Martin v. Löwiseba40652007-08-30 20:10:57 +000011645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11646fi
11647{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11648echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11649
11650# The cast to long int works around a bug in the HP C Compiler
11651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11653# This bug is HP SR number 8606223364.
11654{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11655echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011656if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11657 echo $ECHO_N "(cached) $ECHO_C" >&6
11658else
Martin v. Löwis11437992002-04-12 09:54:03 +000011659 if test "$cross_compiling" = yes; then
11660 # Depending upon the size, compute the lo and hi bounds.
11661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011662/* confdefs.h. */
11663_ACEOF
11664cat confdefs.h >>conftest.$ac_ext
11665cat >>conftest.$ac_ext <<_ACEOF
11666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011667$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011668 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011669int
11670main ()
11671{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011672static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011673test_array [0] = 0
11674
11675 ;
11676 return 0;
11677}
11678_ACEOF
11679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011680if { (ac_try="$ac_compile"
11681case "(($ac_try" in
11682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11683 *) ac_try_echo=$ac_try;;
11684esac
11685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011688 grep -v '^ *+' conftest.er1 >conftest.err
11689 rm -f conftest.er1
11690 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011692 (exit $ac_status); } && {
11693 test -z "$ac_c_werror_flag" ||
11694 test ! -s conftest.err
11695 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 ac_lo=0 ac_mid=0
11697 while :; do
11698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011699/* confdefs.h. */
11700_ACEOF
11701cat confdefs.h >>conftest.$ac_ext
11702cat >>conftest.$ac_ext <<_ACEOF
11703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011704$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011705 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011706int
11707main ()
11708{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011709static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011710test_array [0] = 0
11711
11712 ;
11713 return 0;
11714}
11715_ACEOF
11716rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011717if { (ac_try="$ac_compile"
11718case "(($ac_try" in
11719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11720 *) ac_try_echo=$ac_try;;
11721esac
11722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11723 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011725 grep -v '^ *+' conftest.er1 >conftest.err
11726 rm -f conftest.er1
11727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011729 (exit $ac_status); } && {
11730 test -z "$ac_c_werror_flag" ||
11731 test ! -s conftest.err
11732 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011733 ac_hi=$ac_mid; break
11734else
11735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011736sed 's/^/| /' conftest.$ac_ext >&5
11737
Martin v. Löwiseba40652007-08-30 20:10:57 +000011738 ac_lo=`expr $ac_mid + 1`
11739 if test $ac_lo -le $ac_mid; then
11740 ac_lo= ac_hi=
11741 break
11742 fi
11743 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011744fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011745
11746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 done
11748else
11749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011750sed 's/^/| /' conftest.$ac_ext >&5
11751
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011753/* confdefs.h. */
11754_ACEOF
11755cat confdefs.h >>conftest.$ac_ext
11756cat >>conftest.$ac_ext <<_ACEOF
11757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011758$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011759 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011760int
11761main ()
11762{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011763static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011764test_array [0] = 0
11765
11766 ;
11767 return 0;
11768}
11769_ACEOF
11770rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011771if { (ac_try="$ac_compile"
11772case "(($ac_try" in
11773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11774 *) ac_try_echo=$ac_try;;
11775esac
11776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011779 grep -v '^ *+' conftest.er1 >conftest.err
11780 rm -f conftest.er1
11781 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011783 (exit $ac_status); } && {
11784 test -z "$ac_c_werror_flag" ||
11785 test ! -s conftest.err
11786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011787 ac_hi=-1 ac_mid=-1
11788 while :; do
11789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011790/* confdefs.h. */
11791_ACEOF
11792cat confdefs.h >>conftest.$ac_ext
11793cat >>conftest.$ac_ext <<_ACEOF
11794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011795$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011796 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011797int
11798main ()
11799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011800static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011801test_array [0] = 0
11802
11803 ;
11804 return 0;
11805}
11806_ACEOF
11807rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808if { (ac_try="$ac_compile"
11809case "(($ac_try" in
11810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11811 *) ac_try_echo=$ac_try;;
11812esac
11813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011816 grep -v '^ *+' conftest.er1 >conftest.err
11817 rm -f conftest.er1
11818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820 (exit $ac_status); } && {
11821 test -z "$ac_c_werror_flag" ||
11822 test ! -s conftest.err
11823 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011824 ac_lo=$ac_mid; break
11825else
11826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011827sed 's/^/| /' conftest.$ac_ext >&5
11828
Martin v. Löwiseba40652007-08-30 20:10:57 +000011829 ac_hi=`expr '(' $ac_mid ')' - 1`
11830 if test $ac_mid -le $ac_hi; then
11831 ac_lo= ac_hi=
11832 break
11833 fi
11834 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011836
11837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011838 done
11839else
11840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011841sed 's/^/| /' conftest.$ac_ext >&5
11842
Martin v. Löwiseba40652007-08-30 20:10:57 +000011843 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011845
11846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011848
11849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011850# Binary search between lo and hi bounds.
11851while test "x$ac_lo" != "x$ac_hi"; do
11852 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011854/* confdefs.h. */
11855_ACEOF
11856cat confdefs.h >>conftest.$ac_ext
11857cat >>conftest.$ac_ext <<_ACEOF
11858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011859$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011860 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011861int
11862main ()
11863{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011864static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011865test_array [0] = 0
11866
11867 ;
11868 return 0;
11869}
11870_ACEOF
11871rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011872if { (ac_try="$ac_compile"
11873case "(($ac_try" in
11874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11875 *) ac_try_echo=$ac_try;;
11876esac
11877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011880 grep -v '^ *+' conftest.er1 >conftest.err
11881 rm -f conftest.er1
11882 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011884 (exit $ac_status); } && {
11885 test -z "$ac_c_werror_flag" ||
11886 test ! -s conftest.err
11887 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011888 ac_hi=$ac_mid
11889else
11890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011891sed 's/^/| /' conftest.$ac_ext >&5
11892
Martin v. Löwiseba40652007-08-30 20:10:57 +000011893 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011895
11896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011897done
11898case $ac_lo in
11899?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011900'') if test "$ac_cv_type_uintptr_t" = yes; then
11901 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011902See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011903echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011904See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011905 { (exit 77); exit 77; }; }
11906 else
11907 ac_cv_sizeof_uintptr_t=0
11908 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011909esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011910else
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011912/* confdefs.h. */
11913_ACEOF
11914cat confdefs.h >>conftest.$ac_ext
11915cat >>conftest.$ac_ext <<_ACEOF
11916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011917$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011918 typedef uintptr_t ac__type_sizeof_;
11919static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11920static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011921#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011922#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011923int
11924main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011925{
Martin v. Löwis11437992002-04-12 09:54:03 +000011926
11927 FILE *f = fopen ("conftest.val", "w");
11928 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011929 return 1;
11930 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011932 long int i = longval ();
11933 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11934 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011935 fprintf (f, "%ld\n", i);
11936 }
11937 else
11938 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011939 unsigned long int i = ulongval ();
11940 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11941 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011942 fprintf (f, "%lu\n", i);
11943 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011944 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011945
11946 ;
11947 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011948}
Martin v. Löwis11437992002-04-12 09:54:03 +000011949_ACEOF
11950rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011951if { (ac_try="$ac_link"
11952case "(($ac_try" in
11953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11954 *) ac_try_echo=$ac_try;;
11955esac
11956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11957 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 ac_status=$?
11959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11960 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011961 { (case "(($ac_try" in
11962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11963 *) ac_try_echo=$ac_try;;
11964esac
11965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11966 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 ac_status=$?
11968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11969 (exit $ac_status); }; }; then
11970 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011971else
Martin v. Löwis11437992002-04-12 09:54:03 +000011972 echo "$as_me: program exited with status $ac_status" >&5
11973echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011974sed 's/^/| /' conftest.$ac_ext >&5
11975
Martin v. Löwis11437992002-04-12 09:54:03 +000011976( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011977if test "$ac_cv_type_uintptr_t" = yes; then
11978 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011979See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011980echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011981See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011982 { (exit 77); exit 77; }; }
11983 else
11984 ac_cv_sizeof_uintptr_t=0
11985 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011986fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011987rm -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 +000011988fi
11989rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11992echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11993
11994
11995
Martin v. Löwis11437992002-04-12 09:54:03 +000011996cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011997#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011998_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011999
Michael W. Hudson54241132001-12-07 15:38:26 +000012000
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012001fi
12002
Martin v. Löwisebe26702006-10-02 14:55:51 +000012003
12004
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012005# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012006{ echo "$as_me:$LINENO: checking size of off_t" >&5
12007echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012008if test "${ac_cv_sizeof_off_t+set}" = set; then
12009 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012010else
12011 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012012 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012013else
Martin v. Löwis11437992002-04-12 09:54:03 +000012014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012015/* confdefs.h. */
12016_ACEOF
12017cat confdefs.h >>conftest.$ac_ext
12018cat >>conftest.$ac_ext <<_ACEOF
12019/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012020#include <stdio.h>
12021#include <sys/types.h>
12022main()
12023{
12024 FILE *f=fopen("conftestval", "w");
12025 if (!f) exit(1);
12026 fprintf(f, "%d\n", sizeof(off_t));
12027 exit(0);
12028}
Martin v. Löwis11437992002-04-12 09:54:03 +000012029_ACEOF
12030rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012031if { (ac_try="$ac_link"
12032case "(($ac_try" in
12033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12034 *) ac_try_echo=$ac_try;;
12035esac
12036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12037 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012038 ac_status=$?
12039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12040 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012041 { (case "(($ac_try" in
12042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12043 *) ac_try_echo=$ac_try;;
12044esac
12045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12046 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012047 ac_status=$?
12048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12049 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012050 ac_cv_sizeof_off_t=`cat conftestval`
12051else
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 echo "$as_me: program exited with status $ac_status" >&5
12053echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012054sed 's/^/| /' conftest.$ac_ext >&5
12055
Martin v. Löwis11437992002-04-12 09:54:03 +000012056( exit $ac_status )
12057ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012058fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012059rm -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 +000012060fi
12061
Martin v. Löwiseba40652007-08-30 20:10:57 +000012062
12063
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012064fi
12065
Martin v. Löwiseba40652007-08-30 20:10:57 +000012066{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12067echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012068
12069cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012070#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012071_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012072
Michael W. Hudson54241132001-12-07 15:38:26 +000012073
Martin v. Löwiseba40652007-08-30 20:10:57 +000012074{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12075echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012076if test "$have_long_long" = yes -a \
12077 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12078 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012079
Martin v. Löwis11437992002-04-12 09:54:03 +000012080cat >>confdefs.h <<\_ACEOF
12081#define HAVE_LARGEFILE_SUPPORT 1
12082_ACEOF
12083
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084 { echo "$as_me:$LINENO: result: yes" >&5
12085echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012086else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012087 { echo "$as_me:$LINENO: result: no" >&5
12088echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012089fi
12090
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012091# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012092{ echo "$as_me:$LINENO: checking size of time_t" >&5
12093echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012094if test "${ac_cv_sizeof_time_t+set}" = set; then
12095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012096else
12097 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012098 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012099else
Martin v. Löwis11437992002-04-12 09:54:03 +000012100 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012101/* confdefs.h. */
12102_ACEOF
12103cat confdefs.h >>conftest.$ac_ext
12104cat >>conftest.$ac_ext <<_ACEOF
12105/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012106#include <stdio.h>
12107#include <time.h>
12108main()
12109{
12110 FILE *f=fopen("conftestval", "w");
12111 if (!f) exit(1);
12112 fprintf(f, "%d\n", sizeof(time_t));
12113 exit(0);
12114}
Martin v. Löwis11437992002-04-12 09:54:03 +000012115_ACEOF
12116rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012117if { (ac_try="$ac_link"
12118case "(($ac_try" in
12119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12120 *) ac_try_echo=$ac_try;;
12121esac
12122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12123 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012124 ac_status=$?
12125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012127 { (case "(($ac_try" in
12128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12129 *) ac_try_echo=$ac_try;;
12130esac
12131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12132 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012133 ac_status=$?
12134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12135 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012136 ac_cv_sizeof_time_t=`cat conftestval`
12137else
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 echo "$as_me: program exited with status $ac_status" >&5
12139echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012140sed 's/^/| /' conftest.$ac_ext >&5
12141
Martin v. Löwis11437992002-04-12 09:54:03 +000012142( exit $ac_status )
12143ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012145rm -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 +000012146fi
12147
Martin v. Löwiseba40652007-08-30 20:10:57 +000012148
12149
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012150fi
12151
Martin v. Löwiseba40652007-08-30 20:10:57 +000012152{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12153echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
12155cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012156#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012157_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012158
Michael W. Hudson54241132001-12-07 15:38:26 +000012159
12160
Trent Mick635f6fb2000-08-23 21:33:05 +000012161# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012162ac_save_cc="$CC"
12163if test "$ac_cv_kpthread" = "yes"
12164then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012165elif test "$ac_cv_kthread" = "yes"
12166then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012167elif test "$ac_cv_pthread" = "yes"
12168then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12171echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012172have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012174/* confdefs.h. */
12175_ACEOF
12176cat confdefs.h >>conftest.$ac_ext
12177cat >>conftest.$ac_ext <<_ACEOF
12178/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012179#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012180int
12181main ()
12182{
Guido van Rossum12580492000-09-24 16:47:19 +000012183pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 ;
12185 return 0;
12186}
12187_ACEOF
12188rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012189if { (ac_try="$ac_compile"
12190case "(($ac_try" in
12191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12192 *) ac_try_echo=$ac_try;;
12193esac
12194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012197 grep -v '^ *+' conftest.er1 >conftest.err
12198 rm -f conftest.er1
12199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012201 (exit $ac_status); } && {
12202 test -z "$ac_c_werror_flag" ||
12203 test ! -s conftest.err
12204 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012205 have_pthread_t=yes
12206else
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012208sed 's/^/| /' conftest.$ac_ext >&5
12209
Martin v. Löwiseba40652007-08-30 20:10:57 +000012210
Trent Mick635f6fb2000-08-23 21:33:05 +000012211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012212
12213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12214{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12215echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012216if test "$have_pthread_t" = yes ; then
12217 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012218 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12219echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12221 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012222else
12223 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012224 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012225else
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012227/* confdefs.h. */
12228_ACEOF
12229cat confdefs.h >>conftest.$ac_ext
12230cat >>conftest.$ac_ext <<_ACEOF
12231/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012232#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012233#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012234 main()
12235 {
12236 FILE *f=fopen("conftestval", "w");
12237 if (!f) exit(1);
12238 fprintf(f, "%d\n", sizeof(pthread_t));
12239 exit(0);
12240 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012241_ACEOF
12242rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012243if { (ac_try="$ac_link"
12244case "(($ac_try" in
12245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12246 *) ac_try_echo=$ac_try;;
12247esac
12248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12249 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012250 ac_status=$?
12251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12252 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012253 { (case "(($ac_try" in
12254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12255 *) ac_try_echo=$ac_try;;
12256esac
12257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12258 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 ac_status=$?
12260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12261 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012262 ac_cv_sizeof_pthread_t=`cat conftestval`
12263else
Martin v. Löwis11437992002-04-12 09:54:03 +000012264 echo "$as_me: program exited with status $ac_status" >&5
12265echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012266sed 's/^/| /' conftest.$ac_ext >&5
12267
Martin v. Löwis11437992002-04-12 09:54:03 +000012268( exit $ac_status )
12269ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012271rm -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 +000012272fi
12273
Martin v. Löwiseba40652007-08-30 20:10:57 +000012274
12275
Trent Mick635f6fb2000-08-23 21:33:05 +000012276fi
12277
Martin v. Löwiseba40652007-08-30 20:10:57 +000012278 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12279echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012280
12281cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012282#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012283_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012284
12285fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012286CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012287
Martin v. Löwiseba40652007-08-30 20:10:57 +000012288{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12289echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12290# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012291if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012292 enableval=$enable_toolbox_glue;
12293fi
Jack Jansene578a632001-08-15 01:27:14 +000012294
12295
12296if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012297then
Jack Jansene578a632001-08-15 01:27:14 +000012298 case $ac_sys_system/$ac_sys_release in
12299 Darwin/*)
12300 enable_toolbox_glue="yes";;
12301 *)
12302 enable_toolbox_glue="no";;
12303 esac
12304fi
12305case "$enable_toolbox_glue" in
12306yes)
Jack Jansene578a632001-08-15 01:27:14 +000012307 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012308 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012309
12310cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012311#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012312_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012313
12314 ;;
12315*)
Jack Jansene578a632001-08-15 01:27:14 +000012316 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012317 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012318 ;;
12319esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012320{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12321echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012322
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012323
12324case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012325 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012326 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12327 ;;
12328 Darwin/*)
12329 OTHER_LIBTOOL_OPT=""
12330 ;;
12331esac
12332
12333
12334case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012335 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012336 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12337 if test "${enable_universalsdk}"; then
12338 :
12339 else
12340 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12341 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012342 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012343 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012344 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012345 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12346 if test ${gcc_version} '<' 4.0
12347 then
12348 LIBTOOL_CRUFT="-lcc_dynamic"
12349 else
12350 LIBTOOL_CRUFT=""
12351 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012352 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012353 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012354 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012355esac
12356
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12358echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012359if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012360then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012361 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012363 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012364
Martin v. Löwis11437992002-04-12 09:54:03 +000012365cat >>confdefs.h <<\_ACEOF
12366#define WITH_NEXT_FRAMEWORK 1
12367_ACEOF
12368
Martin v. Löwiseba40652007-08-30 20:10:57 +000012369 { echo "$as_me:$LINENO: result: yes" >&5
12370echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012371else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372 { echo "$as_me:$LINENO: result: no" >&5
12373echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012374fi
12375
Martin v. Löwiseba40652007-08-30 20:10:57 +000012376{ echo "$as_me:$LINENO: checking for dyld" >&5
12377echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012378case $ac_sys_system/$ac_sys_release in
12379 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381cat >>confdefs.h <<\_ACEOF
12382#define WITH_DYLD 1
12383_ACEOF
12384
Martin v. Löwiseba40652007-08-30 20:10:57 +000012385 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12386echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012387 ;;
12388 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012389 { echo "$as_me:$LINENO: result: no" >&5
12390echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012391 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012392esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012393
Guido van Rossum0a516c91994-09-12 10:58:40 +000012394# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012395
Michael W. Hudson54241132001-12-07 15:38:26 +000012396
12397
12398
12399
Guido van Rossum0a516c91994-09-12 10:58:40 +000012400# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012401# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402{ echo "$as_me:$LINENO: checking SO" >&5
12403echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012404if test -z "$SO"
12405then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012406 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012407 hp*|HP*)
12408 case `uname -m` in
12409 ia64) SO=.so;;
12410 *) SO=.sl;;
12411 esac
12412 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012413 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012414 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012415 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012416else
12417 # this might also be a termcap variable, see #610332
12418 echo
12419 echo '====================================================================='
12420 echo '+ +'
12421 echo '+ WARNING: You have set SO in your environment. +'
12422 echo '+ Do you really mean to change the extension for shared libraries? +'
12423 echo '+ Continuing in 10 seconds to let you to ponder. +'
12424 echo '+ +'
12425 echo '====================================================================='
12426 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012428{ echo "$as_me:$LINENO: result: $SO" >&5
12429echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012430
12431cat >>confdefs.h <<_ACEOF
12432#define SHLIB_EXT "$SO"
12433_ACEOF
12434
Guido van Rossum0a516c91994-09-12 10:58:40 +000012435# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012436# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012437# (Shared libraries in this instance are shared modules to be loaded into
12438# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12440echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012441if test -z "$LDSHARED"
12442then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012444 AIX*)
12445 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012446 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012447 ;;
12448 BeOS*)
12449 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012450 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012451 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012452 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012453 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012454 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012455 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012456 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012457 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012458 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000012459 hp*|HP*)
12460 if test "$GCC" = "yes"
12461 then LDSHARED='$(CC) -shared'
12462 else LDSHARED='ld -b';
12463 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012464 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012465 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012466 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12467 if test "$enable_framework" ; then
12468 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012469 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12470 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012471 else
12472 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012473 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012474 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012475 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012476 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12477 if test "$enable_framework" ; then
12478 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012479 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12480 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012481 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012482 # No framework, use the Python app as bundle-loader
12483 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012484 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012485 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012486 Darwin/*)
12487 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12488 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012489 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012490 if test ${cur_target} '>' 10.2; then
12491 cur_target=10.3
12492 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012493 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012494
12495 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12496 # environment with a value that is the same as what we'll use
12497 # in the Makefile to ensure that we'll get the same compiler
12498 # environment during configure and build time.
12499 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12500 export MACOSX_DEPLOYMENT_TARGET
12501
Ronald Oussoren988117f2006-04-29 11:31:35 +000012502 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012503 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012504 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012505 if test "${enable_universalsdk}"; then
12506 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12507 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012508 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12509 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012510 else
12511 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12512 if test "$enable_framework" ; then
12513 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012514 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12515 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012516 else
12517 # No framework, use the Python app as bundle-loader
12518 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12519 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12520 fi
12521 fi
12522 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012523 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012524 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012525 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012526 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012527 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012528 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012529 else
12530 LDSHARED="ld -Bshareable ${LDFLAGS}"
12531 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012532 OpenBSD*)
12533 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12534 then
12535 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12536 else
12537 case `uname -r` in
12538 [01].* | 2.[0-7] | 2.[0-7].*)
12539 LDSHARED="ld -Bshareable ${LDFLAGS}"
12540 ;;
12541 *)
12542 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12543 ;;
12544 esac
12545 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012546 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012547 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012548 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012549 then LDSHARED='$(CC) -shared'
12550 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012551 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012552 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012553 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012554 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012555 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012556 *) LDSHARED="ld";;
12557 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012559{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12560echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012561BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012562# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012563# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12565echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012566if test -z "$CCSHARED"
12567then
Guido van Rossum07397971997-04-29 21:49:50 +000012568 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012569 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012570 then CCSHARED="-fPIC";
12571 elif test `uname -p` = sparc;
12572 then CCSHARED="-xcode=pic32";
12573 else CCSHARED="-Kpic";
12574 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012575 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012576 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012577 else CCSHARED="+z";
12578 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012579 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012580 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012581 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012582 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012583 if test "$GCC" = "yes"
12584 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012585 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012586 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012587 SCO_SV*)
12588 if test "$GCC" = "yes"
12589 then CCSHARED="-fPIC"
12590 else CCSHARED="-Kpic -belf"
12591 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012592 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012593 IRIX*/6*) case $CC in
12594 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012595 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012596 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012597 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012598 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12601echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012602# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012603# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012604{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12605echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012606if test -z "$LINKFORSHARED"
12607then
Guido van Rossum07397971997-04-29 21:49:50 +000012608 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012609 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012610 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012611 LINKFORSHARED="-Wl,-E -Wl,+s";;
12612# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012613 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012614 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012615 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012616 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012617 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12618 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012619 # not used by the core itself but which needs to be in the core so
12620 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012621 # -prebind is no longer used, because it actually seems to give a
12622 # slowdown in stead of a speedup, maybe due to the large number of
12623 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012624
12625 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012626 if test "$enable_framework"
12627 then
Jack Jansenda49e192005-01-07 13:08:22 +000012628 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012629 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012630 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012631 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012632 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012633 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012634 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012635 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12636 then
12637 LINKFORSHARED="-Wl,--export-dynamic"
12638 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012639 SunOS/5*) case $CC in
12640 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012641 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012642 then
12643 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012644 fi;;
12645 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012646 CYGWIN*)
12647 if test $enable_shared = "no"
12648 then
12649 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12650 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012651 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012653{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12654echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012655
Michael W. Hudson54241132001-12-07 15:38:26 +000012656
Martin v. Löwiseba40652007-08-30 20:10:57 +000012657{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12658echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012659if test ! "$LIBRARY" = "$LDLIBRARY"
12660then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012661 case $ac_sys_system in
12662 CYGWIN*)
12663 # Cygwin needs CCSHARED when building extension DLLs
12664 # but not when building the interpreter DLL.
12665 CFLAGSFORSHARED='';;
12666 *)
12667 CFLAGSFORSHARED='$(CCSHARED)'
12668 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012670{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12671echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012672
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012673# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12674# library (with --enable-shared).
12675# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012676# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12677# if it is not required, since it creates a dependency of the shared library
12678# to LIBS. This, in turn, means that applications linking the shared libpython
12679# don't need to link LIBS explicitly. The default should be only changed
12680# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012681
Martin v. Löwiseba40652007-08-30 20:10:57 +000012682{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12683echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012684case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012685 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012686 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012687esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012688{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12689echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012690
12691
Guido van Rossum627b2d71993-12-24 10:39:16 +000012692# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012693
Martin v. Löwiseba40652007-08-30 20:10:57 +000012694{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12695echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012696if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698else
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012700LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* confdefs.h. */
12703_ACEOF
12704cat confdefs.h >>conftest.$ac_ext
12705cat >>conftest.$ac_ext <<_ACEOF
12706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012707
Martin v. Löwiseba40652007-08-30 20:10:57 +000012708/* Override any GCC internal prototype to avoid an error.
12709 Use char because int might match the return type of a GCC
12710 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012711#ifdef __cplusplus
12712extern "C"
12713#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012714char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012715int
12716main ()
12717{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012718return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 ;
12720 return 0;
12721}
12722_ACEOF
12723rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012724if { (ac_try="$ac_link"
12725case "(($ac_try" in
12726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12727 *) ac_try_echo=$ac_try;;
12728esac
12729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12730 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012732 grep -v '^ *+' conftest.er1 >conftest.err
12733 rm -f conftest.er1
12734 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736 (exit $ac_status); } && {
12737 test -z "$ac_c_werror_flag" ||
12738 test ! -s conftest.err
12739 } && test -s conftest$ac_exeext &&
12740 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012742else
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012744sed 's/^/| /' conftest.$ac_ext >&5
12745
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012748
12749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012751LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012753{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12754echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012755if test $ac_cv_lib_dl_dlopen = yes; then
12756 cat >>confdefs.h <<_ACEOF
12757#define HAVE_LIBDL 1
12758_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012759
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012760 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012761
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762fi
12763 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12766echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012767if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769else
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012771LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012773/* confdefs.h. */
12774_ACEOF
12775cat confdefs.h >>conftest.$ac_ext
12776cat >>conftest.$ac_ext <<_ACEOF
12777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012778
Martin v. Löwiseba40652007-08-30 20:10:57 +000012779/* Override any GCC internal prototype to avoid an error.
12780 Use char because int might match the return type of a GCC
12781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012782#ifdef __cplusplus
12783extern "C"
12784#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012785char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012786int
12787main ()
12788{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012789return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012790 ;
12791 return 0;
12792}
12793_ACEOF
12794rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012795if { (ac_try="$ac_link"
12796case "(($ac_try" in
12797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12798 *) ac_try_echo=$ac_try;;
12799esac
12800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12801 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012803 grep -v '^ *+' conftest.er1 >conftest.err
12804 rm -f conftest.er1
12805 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807 (exit $ac_status); } && {
12808 test -z "$ac_c_werror_flag" ||
12809 test ! -s conftest.err
12810 } && test -s conftest$ac_exeext &&
12811 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012813else
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012815sed 's/^/| /' conftest.$ac_ext >&5
12816
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819
12820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012821 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012822LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012824{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12825echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012826if test $ac_cv_lib_dld_shl_load = yes; then
12827 cat >>confdefs.h <<_ACEOF
12828#define HAVE_LIBDLD 1
12829_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012830
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012831 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012832
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012833fi
12834 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012835
12836# only check for sem_ini if thread support is requested
12837if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012838 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12839echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012840if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012841 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012842else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012843 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012844cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012845/* confdefs.h. */
12846_ACEOF
12847cat confdefs.h >>conftest.$ac_ext
12848cat >>conftest.$ac_ext <<_ACEOF
12849/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012850
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851/* Override any GCC internal prototype to avoid an error.
12852 Use char because int might match the return type of a GCC
12853 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012854#ifdef __cplusplus
12855extern "C"
12856#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012857char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012858int
12859main ()
12860{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012861return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012862 ;
12863 return 0;
12864}
12865_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012866for ac_lib in '' pthread rt posix4; do
12867 if test -z "$ac_lib"; then
12868 ac_res="none required"
12869 else
12870 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012871 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012872 fi
12873 rm -f conftest.$ac_objext conftest$ac_exeext
12874if { (ac_try="$ac_link"
12875case "(($ac_try" in
12876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12877 *) ac_try_echo=$ac_try;;
12878esac
12879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12880 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012881 ac_status=$?
12882 grep -v '^ *+' conftest.er1 >conftest.err
12883 rm -f conftest.er1
12884 cat conftest.err >&5
12885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012886 (exit $ac_status); } && {
12887 test -z "$ac_c_werror_flag" ||
12888 test ! -s conftest.err
12889 } && test -s conftest$ac_exeext &&
12890 $as_test_x conftest$ac_exeext; then
12891 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012892else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012893 echo "$as_me: failed program was:" >&5
12894sed 's/^/| /' conftest.$ac_ext >&5
12895
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896
Brett Cannon19fab762007-06-02 03:02:29 +000012897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012898
12899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12900 conftest$ac_exeext
12901 if test "${ac_cv_search_sem_init+set}" = set; then
12902 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012904done
12905if test "${ac_cv_search_sem_init+set}" = set; then
12906 :
12907else
12908 ac_cv_search_sem_init=no
12909fi
12910rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012911LIBS=$ac_func_search_save_LIBS
12912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012913{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12914echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12915ac_res=$ac_cv_search_sem_init
12916if test "$ac_res" != no; then
12917 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012918
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012919fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012920 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012921 # posix4 on Solaris 2.6
12922 # pthread (first!) on Linux
12923fi
12924
Martin v. Löwis19d17342003-06-14 21:03:05 +000012925# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012926{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12927echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012928if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12929 echo $ECHO_N "(cached) $ECHO_C" >&6
12930else
12931 ac_check_lib_save_LIBS=$LIBS
12932LIBS="-lintl $LIBS"
12933cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012934/* confdefs.h. */
12935_ACEOF
12936cat confdefs.h >>conftest.$ac_ext
12937cat >>conftest.$ac_ext <<_ACEOF
12938/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012939
Martin v. Löwiseba40652007-08-30 20:10:57 +000012940/* Override any GCC internal prototype to avoid an error.
12941 Use char because int might match the return type of a GCC
12942 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012943#ifdef __cplusplus
12944extern "C"
12945#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012946char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012947int
12948main ()
12949{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012950return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012951 ;
12952 return 0;
12953}
12954_ACEOF
12955rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012956if { (ac_try="$ac_link"
12957case "(($ac_try" in
12958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12959 *) ac_try_echo=$ac_try;;
12960esac
12961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12962 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012964 grep -v '^ *+' conftest.er1 >conftest.err
12965 rm -f conftest.er1
12966 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968 (exit $ac_status); } && {
12969 test -z "$ac_c_werror_flag" ||
12970 test ! -s conftest.err
12971 } && test -s conftest$ac_exeext &&
12972 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012973 ac_cv_lib_intl_textdomain=yes
12974else
12975 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012976sed 's/^/| /' conftest.$ac_ext >&5
12977
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012980
12981rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012982 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012983LIBS=$ac_check_lib_save_LIBS
12984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12986echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012987if test $ac_cv_lib_intl_textdomain = yes; then
12988
12989cat >>confdefs.h <<\_ACEOF
12990#define WITH_LIBINTL 1
12991_ACEOF
12992
12993fi
12994
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012995
12996# checks for system dependent C++ extensions support
12997case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012998 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12999echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013001/* confdefs.h. */
13002_ACEOF
13003cat confdefs.h >>conftest.$ac_ext
13004cat >>conftest.$ac_ext <<_ACEOF
13005/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013006#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013007int
13008main ()
13009{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013010loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013011 ;
13012 return 0;
13013}
13014_ACEOF
13015rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013016if { (ac_try="$ac_link"
13017case "(($ac_try" in
13018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13019 *) ac_try_echo=$ac_try;;
13020esac
13021eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13022 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013024 grep -v '^ *+' conftest.er1 >conftest.err
13025 rm -f conftest.er1
13026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028 (exit $ac_status); } && {
13029 test -z "$ac_c_werror_flag" ||
13030 test ! -s conftest.err
13031 } && test -s conftest$ac_exeext &&
13032 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013033
Martin v. Löwis11437992002-04-12 09:54:03 +000013034cat >>confdefs.h <<\_ACEOF
13035#define AIX_GENUINE_CPLUSPLUS 1
13036_ACEOF
13037
Martin v. Löwiseba40652007-08-30 20:10:57 +000013038 { echo "$as_me:$LINENO: result: yes" >&5
13039echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013040else
Martin v. Löwis11437992002-04-12 09:54:03 +000013041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013042sed 's/^/| /' conftest.$ac_ext >&5
13043
Martin v. Löwiseba40652007-08-30 20:10:57 +000013044 { echo "$as_me:$LINENO: result: no" >&5
13045echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013047
13048rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013049 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013050 *) ;;
13051esac
13052
Guido van Rossum70c7f481998-03-26 18:44:10 +000013053# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013054# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13056echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013057if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13058 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013059else
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013061LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013063/* confdefs.h. */
13064_ACEOF
13065cat confdefs.h >>conftest.$ac_ext
13066cat >>conftest.$ac_ext <<_ACEOF
13067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013068
Martin v. Löwiseba40652007-08-30 20:10:57 +000013069/* Override any GCC internal prototype to avoid an error.
13070 Use char because int might match the return type of a GCC
13071 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013072#ifdef __cplusplus
13073extern "C"
13074#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013075char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013076int
13077main ()
13078{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013079return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013080 ;
13081 return 0;
13082}
13083_ACEOF
13084rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013085if { (ac_try="$ac_link"
13086case "(($ac_try" in
13087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13088 *) ac_try_echo=$ac_try;;
13089esac
13090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013093 grep -v '^ *+' conftest.er1 >conftest.err
13094 rm -f conftest.er1
13095 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013097 (exit $ac_status); } && {
13098 test -z "$ac_c_werror_flag" ||
13099 test ! -s conftest.err
13100 } && test -s conftest$ac_exeext &&
13101 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013103else
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013105sed 's/^/| /' conftest.$ac_ext >&5
13106
Martin v. Löwiseba40652007-08-30 20:10:57 +000013107 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013109
13110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013111 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013112LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013114{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13115echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013116if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013117 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013118fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013119 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013120{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13121echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013122if test "${ac_cv_lib_socket_socket+set}" = set; then
13123 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013124else
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013126LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013127cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013128/* confdefs.h. */
13129_ACEOF
13130cat confdefs.h >>conftest.$ac_ext
13131cat >>conftest.$ac_ext <<_ACEOF
13132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013133
Martin v. Löwiseba40652007-08-30 20:10:57 +000013134/* Override any GCC internal prototype to avoid an error.
13135 Use char because int might match the return type of a GCC
13136 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013137#ifdef __cplusplus
13138extern "C"
13139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013140char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013141int
13142main ()
13143{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013144return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013145 ;
13146 return 0;
13147}
13148_ACEOF
13149rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013150if { (ac_try="$ac_link"
13151case "(($ac_try" in
13152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13153 *) ac_try_echo=$ac_try;;
13154esac
13155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13156 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013158 grep -v '^ *+' conftest.er1 >conftest.err
13159 rm -f conftest.er1
13160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013162 (exit $ac_status); } && {
13163 test -z "$ac_c_werror_flag" ||
13164 test ! -s conftest.err
13165 } && test -s conftest$ac_exeext &&
13166 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013167 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013168else
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013170sed 's/^/| /' conftest.$ac_ext >&5
13171
Martin v. Löwiseba40652007-08-30 20:10:57 +000013172 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174
13175rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013177LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013179{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13180echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013181if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013182 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013183fi
13184 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013185
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013186case "$ac_sys_system" in
13187BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013188{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13189echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013190if test "${ac_cv_lib_net_socket+set}" = set; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013192else
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013194LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013195cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013196/* confdefs.h. */
13197_ACEOF
13198cat confdefs.h >>conftest.$ac_ext
13199cat >>conftest.$ac_ext <<_ACEOF
13200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013201
Martin v. Löwiseba40652007-08-30 20:10:57 +000013202/* Override any GCC internal prototype to avoid an error.
13203 Use char because int might match the return type of a GCC
13204 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013205#ifdef __cplusplus
13206extern "C"
13207#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013208char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013209int
13210main ()
13211{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013212return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013213 ;
13214 return 0;
13215}
13216_ACEOF
13217rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013218if { (ac_try="$ac_link"
13219case "(($ac_try" in
13220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13221 *) ac_try_echo=$ac_try;;
13222esac
13223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13224 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013226 grep -v '^ *+' conftest.er1 >conftest.err
13227 rm -f conftest.er1
13228 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013230 (exit $ac_status); } && {
13231 test -z "$ac_c_werror_flag" ||
13232 test ! -s conftest.err
13233 } && test -s conftest$ac_exeext &&
13234 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013236else
Martin v. Löwis11437992002-04-12 09:54:03 +000013237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013238sed 's/^/| /' conftest.$ac_ext >&5
13239
Martin v. Löwiseba40652007-08-30 20:10:57 +000013240 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013242
13243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013245LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013246fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13248echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013249if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013250 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013251fi
13252 # BeOS
13253;;
13254esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013255
Martin v. Löwiseba40652007-08-30 20:10:57 +000013256{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13257echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013258
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013260if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013261 withval=$with_libs;
13262{ echo "$as_me:$LINENO: result: $withval" >&5
13263echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013264LIBS="$withval $LIBS"
13265
13266else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013267 { echo "$as_me:$LINENO: result: no" >&5
13268echo "${ECHO_T}no" >&6; }
13269fi
13270
Guido van Rossum7f43da71994-08-01 12:15:30 +000013271
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013272# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013273{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13274echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013275
Martin v. Löwiseba40652007-08-30 20:10:57 +000013276# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013277if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013278 withval=$with_system_ffi;
13279fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013280
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013281
Martin v. Löwiseba40652007-08-30 20:10:57 +000013282{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13283echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013284
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013285# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013286
13287
Martin v. Löwiseba40652007-08-30 20:10:57 +000013288{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13289echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Martin v. Löwiseba40652007-08-30 20:10:57 +000013291# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013292if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013293 withval=$with_signal_module;
13294fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013295
13296
13297if test -z "$with_signal_module"
13298then with_signal_module="yes"
13299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013300{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13301echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013302
13303if test "${with_signal_module}" = "yes"; then
13304 USE_SIGNAL_MODULE=""
13305 SIGNAL_OBJS=""
13306else
13307 USE_SIGNAL_MODULE="#"
13308 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13309fi
13310
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013311# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013312
Barry Warsawc0d24d82000-06-29 16:12:00 +000013313USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013314
Martin v. Löwiseba40652007-08-30 20:10:57 +000013315{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13316echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Guido van Rossumec2f0731997-01-22 20:54:01 +000013318
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013320if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013321 withval=$with_dec_threads;
13322{ echo "$as_me:$LINENO: result: $withval" >&5
13323echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013324LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013325if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013326 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013327fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013328else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013329 { echo "$as_me:$LINENO: result: no" >&5
13330echo "${ECHO_T}no" >&6; }
13331fi
13332
Martin v. Löwis11437992002-04-12 09:54:03 +000013333
13334# Templates for things AC_DEFINEd more than once.
13335# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013336
13337
Martin v. Löwis11437992002-04-12 09:54:03 +000013338
13339
13340
13341
13342
Martin v. Löwiseba40652007-08-30 20:10:57 +000013343{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13344echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013345
Martin v. Löwiseba40652007-08-30 20:10:57 +000013346# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013347if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013348 withval=$with_threads;
13349fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013350
13351
Barry Warsawc0d24d82000-06-29 16:12:00 +000013352# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Martin v. Löwiseba40652007-08-30 20:10:57 +000013354# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013355if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013356 withval=$with_thread; with_threads=$with_thread
13357fi
13358
Barry Warsawc0d24d82000-06-29 16:12:00 +000013359
13360if test -z "$with_threads"
13361then with_threads="yes"
13362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013363{ echo "$as_me:$LINENO: result: $with_threads" >&5
13364echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013365
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013366
Barry Warsawc0d24d82000-06-29 16:12:00 +000013367if test "$with_threads" = "no"
13368then
13369 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013370elif test "$ac_cv_pthread_is_default" = yes
13371then
Martin v. Löwis11437992002-04-12 09:54:03 +000013372 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013373#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013374_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013375
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013376 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013378#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013379_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013380
13381 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013382 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013383elif test "$ac_cv_kpthread" = "yes"
13384then
13385 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013386 if test "$ac_cv_cxx_thread" = "yes"; then
13387 CXX="$CXX -Kpthread"
13388 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013390#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013391_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013392
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013393 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013394 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013395elif test "$ac_cv_kthread" = "yes"
13396then
13397 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013398 if test "$ac_cv_cxx_thread" = "yes"; then
13399 CXX="$CXX -Kthread"
13400 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013401 cat >>confdefs.h <<\_ACEOF
13402#define WITH_THREAD 1
13403_ACEOF
13404
13405 posix_threads=yes
13406 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013407elif test "$ac_cv_pthread" = "yes"
13408then
13409 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013410 if test "$ac_cv_cxx_thread" = "yes"; then
13411 CXX="$CXX -pthread"
13412 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013413 cat >>confdefs.h <<\_ACEOF
13414#define WITH_THREAD 1
13415_ACEOF
13416
13417 posix_threads=yes
13418 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013419else
13420 if test ! -z "$with_threads" -a -d "$with_threads"
13421 then LDFLAGS="$LDFLAGS -L$with_threads"
13422 fi
13423 if test ! -z "$withval" -a -d "$withval"
13424 then LDFLAGS="$LDFLAGS -L$withval"
13425 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013426
13427 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013428 # define _POSIX_THREADS in unistd.h. Some apparently don't
13429 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013430 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13431echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013433/* confdefs.h. */
13434_ACEOF
13435cat confdefs.h >>conftest.$ac_ext
13436cat >>conftest.$ac_ext <<_ACEOF
13437/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013438
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013439#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013440#ifdef _POSIX_THREADS
13441yes
13442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013443
13444_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013446 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013447 unistd_defines_pthreads=yes
13448else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013449 unistd_defines_pthreads=no
13450fi
13451rm -f conftest*
13452
Martin v. Löwiseba40652007-08-30 20:10:57 +000013453 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13454echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013455
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013457#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013458_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013459
Martin v. Löwis11437992002-04-12 09:54:03 +000013460 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013461 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13462echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013463if test "${ac_cv_header_cthreads_h+set}" = set; then
13464 echo $ECHO_N "(cached) $ECHO_C" >&6
13465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13467echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013468else
Martin v. Löwis11437992002-04-12 09:54:03 +000013469 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013470{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13471echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013472cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013473/* confdefs.h. */
13474_ACEOF
13475cat confdefs.h >>conftest.$ac_ext
13476cat >>conftest.$ac_ext <<_ACEOF
13477/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013478$ac_includes_default
13479#include <cthreads.h>
13480_ACEOF
13481rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013482if { (ac_try="$ac_compile"
13483case "(($ac_try" in
13484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13485 *) ac_try_echo=$ac_try;;
13486esac
13487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013490 grep -v '^ *+' conftest.er1 >conftest.err
13491 rm -f conftest.er1
13492 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013494 (exit $ac_status); } && {
13495 test -z "$ac_c_werror_flag" ||
13496 test ! -s conftest.err
13497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ac_header_compiler=yes
13499else
13500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013501sed 's/^/| /' conftest.$ac_ext >&5
13502
Martin v. Löwiseba40652007-08-30 20:10:57 +000013503 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013505
13506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13507{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13508echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
13510# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013511{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13512echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013514/* confdefs.h. */
13515_ACEOF
13516cat confdefs.h >>conftest.$ac_ext
13517cat >>conftest.$ac_ext <<_ACEOF
13518/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013519#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013520_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013521if { (ac_try="$ac_cpp conftest.$ac_ext"
13522case "(($ac_try" in
13523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13524 *) ac_try_echo=$ac_try;;
13525esac
13526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13527 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013528 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013529 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013530 rm -f conftest.er1
13531 cat conftest.err >&5
13532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013533 (exit $ac_status); } >/dev/null && {
13534 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13535 test ! -s conftest.err
13536 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ac_header_preproc=yes
13538else
13539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013540sed 's/^/| /' conftest.$ac_ext >&5
13541
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013544
Martin v. Löwis11437992002-04-12 09:54:03 +000013545rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013546{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13547echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013548
13549# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013550case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13551 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13553echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013554 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13555echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13556 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013557 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013558 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013559 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13560echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013561 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13562echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13563 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13564echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13565 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13566echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013567 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13568echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013569 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13570echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013571 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013572## ------------------------------------------------ ##
13573## Report this to http://www.python.org/python-bugs ##
13574## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013575_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013576 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013577 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013578esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013579{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13580echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013581if test "${ac_cv_header_cthreads_h+set}" = set; then
13582 echo $ECHO_N "(cached) $ECHO_C" >&6
13583else
13584 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013585fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13587echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013588
13589fi
13590if test $ac_cv_header_cthreads_h = yes; then
13591 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013592#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013593_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013594
Martin v. Löwis11437992002-04-12 09:54:03 +000013595 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013596#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013597_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013598
Martin v. Löwis11437992002-04-12 09:54:03 +000013599
13600cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013601#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013602_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013603
13604 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013605 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013606else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013607
Martin v. Löwis11437992002-04-12 09:54:03 +000013608 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013609 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13610echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013611if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13612 echo $ECHO_N "(cached) $ECHO_C" >&6
13613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013614{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13615echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013616else
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013618{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13619echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013621/* confdefs.h. */
13622_ACEOF
13623cat confdefs.h >>conftest.$ac_ext
13624cat >>conftest.$ac_ext <<_ACEOF
13625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013626$ac_includes_default
13627#include <mach/cthreads.h>
13628_ACEOF
13629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013630if { (ac_try="$ac_compile"
13631case "(($ac_try" in
13632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13633 *) ac_try_echo=$ac_try;;
13634esac
13635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013638 grep -v '^ *+' conftest.er1 >conftest.err
13639 rm -f conftest.er1
13640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013642 (exit $ac_status); } && {
13643 test -z "$ac_c_werror_flag" ||
13644 test ! -s conftest.err
13645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_header_compiler=yes
13647else
13648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013649sed 's/^/| /' conftest.$ac_ext >&5
13650
Martin v. Löwiseba40652007-08-30 20:10:57 +000013651 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013653
13654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13655{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13656echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013657
13658# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013659{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13660echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013662/* confdefs.h. */
13663_ACEOF
13664cat confdefs.h >>conftest.$ac_ext
13665cat >>conftest.$ac_ext <<_ACEOF
13666/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013667#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013668_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669if { (ac_try="$ac_cpp conftest.$ac_ext"
13670case "(($ac_try" in
13671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13672 *) ac_try_echo=$ac_try;;
13673esac
13674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13675 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013677 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013678 rm -f conftest.er1
13679 cat conftest.err >&5
13680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681 (exit $ac_status); } >/dev/null && {
13682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13683 test ! -s conftest.err
13684 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013685 ac_header_preproc=yes
13686else
13687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013688sed 's/^/| /' conftest.$ac_ext >&5
13689
Martin v. Löwis11437992002-04-12 09:54:03 +000013690 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013692
Martin v. Löwis11437992002-04-12 09:54:03 +000013693rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013694{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13695echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013696
13697# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013698case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13699 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13701echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013702 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13703echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13704 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013705 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013706 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013707 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13708echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013709 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13710echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13711 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13712echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13713 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13714echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013715 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13716echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013717 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13718echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013719 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013720## ------------------------------------------------ ##
13721## Report this to http://www.python.org/python-bugs ##
13722## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013723_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013724 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013725 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013726esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013727{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13728echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013729if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13730 echo $ECHO_N "(cached) $ECHO_C" >&6
13731else
13732 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013733fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013734{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13735echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013736
13737fi
13738if test $ac_cv_header_mach_cthreads_h = yes; then
13739 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013740#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013741_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013742
Martin v. Löwis11437992002-04-12 09:54:03 +000013743 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013744#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013745_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013746
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
13748cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013749#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013750_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013751
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013752 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013753else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013754
Martin v. Löwiseba40652007-08-30 20:10:57 +000013755 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13756echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013759if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013760 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13761echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013762 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013763#define WITH_THREAD 1
13764_ACEOF
13765
13766
13767cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013768#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013769_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013770
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013771 LIBS="-lpth $LIBS"
13772 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013773else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013774 { echo "$as_me:$LINENO: result: no" >&5
13775echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013776
13777 # Just looking for pthread_create in libpthread is not enough:
13778 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13779 # So we really have to include pthread.h, and then link.
13780 _libs=$LIBS
13781 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013782 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13783echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013785/* confdefs.h. */
13786_ACEOF
13787cat confdefs.h >>conftest.$ac_ext
13788cat >>conftest.$ac_ext <<_ACEOF
13789/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013790#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013791
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013792void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013793int
13794main ()
13795{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013796
13797pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 ;
13799 return 0;
13800}
13801_ACEOF
13802rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013803if { (ac_try="$ac_link"
13804case "(($ac_try" in
13805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13806 *) ac_try_echo=$ac_try;;
13807esac
13808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13809 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013811 grep -v '^ *+' conftest.er1 >conftest.err
13812 rm -f conftest.er1
13813 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013815 (exit $ac_status); } && {
13816 test -z "$ac_c_werror_flag" ||
13817 test ! -s conftest.err
13818 } && test -s conftest$ac_exeext &&
13819 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013820
Martin v. Löwiseba40652007-08-30 20:10:57 +000013821 { echo "$as_me:$LINENO: result: yes" >&5
13822echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013823 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013824#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013825_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013826
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013827 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013828 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013829else
Martin v. Löwis11437992002-04-12 09:54:03 +000013830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013831sed 's/^/| /' conftest.$ac_ext >&5
13832
Martin v. Löwis11437992002-04-12 09:54:03 +000013833
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013834 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13836echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013837if test "${ac_cv_func_pthread_detach+set}" = set; then
13838 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013839else
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013841/* confdefs.h. */
13842_ACEOF
13843cat confdefs.h >>conftest.$ac_ext
13844cat >>conftest.$ac_ext <<_ACEOF
13845/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013846/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13847 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13848#define pthread_detach innocuous_pthread_detach
13849
Guido van Rossumad678af1998-10-02 14:42:15 +000013850/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013851 which can conflict with char pthread_detach (); below.
13852 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013853 <limits.h> exists even on freestanding compilers. */
13854
13855#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013856# include <limits.h>
13857#else
13858# include <assert.h>
13859#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013860
13861#undef pthread_detach
13862
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863/* Override any GCC internal prototype to avoid an error.
13864 Use char because int might match the return type of a GCC
13865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013866#ifdef __cplusplus
13867extern "C"
13868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013869char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013870/* The GNU C library defines this for functions which it implements
13871 to always fail with ENOSYS. Some functions are actually named
13872 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013874choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013875#endif
13876
Skip Montanaro6dead952003-09-25 14:50:04 +000013877int
13878main ()
13879{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013880return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013881 ;
13882 return 0;
13883}
13884_ACEOF
13885rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013886if { (ac_try="$ac_link"
13887case "(($ac_try" in
13888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13889 *) ac_try_echo=$ac_try;;
13890esac
13891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13892 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013894 grep -v '^ *+' conftest.er1 >conftest.err
13895 rm -f conftest.er1
13896 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013898 (exit $ac_status); } && {
13899 test -z "$ac_c_werror_flag" ||
13900 test ! -s conftest.err
13901 } && test -s conftest$ac_exeext &&
13902 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013903 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013904else
Martin v. Löwis11437992002-04-12 09:54:03 +000013905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013906sed 's/^/| /' conftest.$ac_ext >&5
13907
Martin v. Löwiseba40652007-08-30 20:10:57 +000013908 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013910
13911rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013912 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13915echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013916if test $ac_cv_func_pthread_detach = yes; then
13917 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013918#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013919_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013920
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013921 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013922 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013923else
Guido van Rossumad678af1998-10-02 14:42:15 +000013924
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013925 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13927echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013928if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13929 echo $ECHO_N "(cached) $ECHO_C" >&6
13930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13932echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013933else
13934 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13936echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013937cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013938/* confdefs.h. */
13939_ACEOF
13940cat confdefs.h >>conftest.$ac_ext
13941cat >>conftest.$ac_ext <<_ACEOF
13942/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013943$ac_includes_default
13944#include <atheos/threads.h>
13945_ACEOF
13946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013947if { (ac_try="$ac_compile"
13948case "(($ac_try" in
13949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13950 *) ac_try_echo=$ac_try;;
13951esac
13952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013955 grep -v '^ *+' conftest.er1 >conftest.err
13956 rm -f conftest.er1
13957 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013959 (exit $ac_status); } && {
13960 test -z "$ac_c_werror_flag" ||
13961 test ! -s conftest.err
13962 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013963 ac_header_compiler=yes
13964else
13965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013966sed 's/^/| /' conftest.$ac_ext >&5
13967
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013970
13971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13972{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13973echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013974
13975# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013976{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13977echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +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öwisf90ae202002-06-11 06:22:31 +000013984#include <atheos/threads.h>
13985_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013986if { (ac_try="$ac_cpp conftest.$ac_ext"
13987case "(($ac_try" in
13988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13989 *) ac_try_echo=$ac_try;;
13990esac
13991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13992 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013993 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013994 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013995 rm -f conftest.er1
13996 cat conftest.err >&5
13997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013998 (exit $ac_status); } >/dev/null && {
13999 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14000 test ! -s conftest.err
14001 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014002 ac_header_preproc=yes
14003else
14004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014005sed 's/^/| /' conftest.$ac_ext >&5
14006
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014007 ac_header_preproc=no
14008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014009
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014010rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014011{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14012echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014013
14014# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014015case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14016 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014017 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14018echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014019 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14020echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14021 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014022 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014023 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014024 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14025echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014026 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14027echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14028 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14029echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14030 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14031echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014032 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14033echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014034 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14035echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014036 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014037## ------------------------------------------------ ##
14038## Report this to http://www.python.org/python-bugs ##
14039## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014040_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014041 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014042 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014043esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14045echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014046if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14047 echo $ECHO_N "(cached) $ECHO_C" >&6
14048else
14049 ac_cv_header_atheos_threads_h=$ac_header_preproc
14050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014051{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14052echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014053
14054fi
14055if test $ac_cv_header_atheos_threads_h = yes; then
14056 cat >>confdefs.h <<\_ACEOF
14057#define WITH_THREAD 1
14058_ACEOF
14059
14060
14061cat >>confdefs.h <<\_ACEOF
14062#define ATHEOS_THREADS 1
14063_ACEOF
14064
14065 THREADOBJ="Python/thread.o"
14066else
14067
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014069 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14070echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014071if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14072 echo $ECHO_N "(cached) $ECHO_C" >&6
14073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014074{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14075echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014076else
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014078{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14079echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014081/* confdefs.h. */
14082_ACEOF
14083cat confdefs.h >>conftest.$ac_ext
14084cat >>conftest.$ac_ext <<_ACEOF
14085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014086$ac_includes_default
14087#include <kernel/OS.h>
14088_ACEOF
14089rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090if { (ac_try="$ac_compile"
14091case "(($ac_try" in
14092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14093 *) ac_try_echo=$ac_try;;
14094esac
14095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014098 grep -v '^ *+' conftest.er1 >conftest.err
14099 rm -f conftest.er1
14100 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102 (exit $ac_status); } && {
14103 test -z "$ac_c_werror_flag" ||
14104 test ! -s conftest.err
14105 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 ac_header_compiler=yes
14107else
14108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014109sed 's/^/| /' conftest.$ac_ext >&5
14110
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113
14114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14115{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14116echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014117
14118# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014119{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14120echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* confdefs.h. */
14123_ACEOF
14124cat confdefs.h >>conftest.$ac_ext
14125cat >>conftest.$ac_ext <<_ACEOF
14126/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014127#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014128_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014129if { (ac_try="$ac_cpp conftest.$ac_ext"
14130case "(($ac_try" in
14131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14132 *) ac_try_echo=$ac_try;;
14133esac
14134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14135 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014136 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014137 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014138 rm -f conftest.er1
14139 cat conftest.err >&5
14140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014141 (exit $ac_status); } >/dev/null && {
14142 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14143 test ! -s conftest.err
14144 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 ac_header_preproc=yes
14146else
14147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014148sed 's/^/| /' conftest.$ac_ext >&5
14149
Martin v. Löwis11437992002-04-12 09:54:03 +000014150 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014152
Martin v. Löwis11437992002-04-12 09:54:03 +000014153rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14155echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014156
Martin v. Löwis11437992002-04-12 09:54:03 +000014157# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014158case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14159 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014160 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14161echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014162 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14163echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14164 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014165 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014166 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014167 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14168echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014169 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14170echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14171 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14172echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14173 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14174echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014175 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14176echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014177 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14178echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014179 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014180## ------------------------------------------------ ##
14181## Report this to http://www.python.org/python-bugs ##
14182## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014183_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014184 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014185 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014186esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014187{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14188echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014189if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14190 echo $ECHO_N "(cached) $ECHO_C" >&6
14191else
14192 ac_cv_header_kernel_OS_h=$ac_header_preproc
14193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14195echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014196
14197fi
14198if test $ac_cv_header_kernel_OS_h = yes; then
14199 cat >>confdefs.h <<\_ACEOF
14200#define WITH_THREAD 1
14201_ACEOF
14202
14203
14204cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014205#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014206_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014207
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014208 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014209else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014210
Martin v. Löwiseba40652007-08-30 20:10:57 +000014211 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14212echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014213if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14214 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014215else
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014217LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014219/* confdefs.h. */
14220_ACEOF
14221cat confdefs.h >>conftest.$ac_ext
14222cat >>conftest.$ac_ext <<_ACEOF
14223/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014224
Martin v. Löwiseba40652007-08-30 20:10:57 +000014225/* Override any GCC internal prototype to avoid an error.
14226 Use char because int might match the return type of a GCC
14227 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014228#ifdef __cplusplus
14229extern "C"
14230#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014231char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014232int
14233main ()
14234{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014235return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014236 ;
14237 return 0;
14238}
14239_ACEOF
14240rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241if { (ac_try="$ac_link"
14242case "(($ac_try" in
14243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14244 *) ac_try_echo=$ac_try;;
14245esac
14246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14247 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014249 grep -v '^ *+' conftest.er1 >conftest.err
14250 rm -f conftest.er1
14251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014253 (exit $ac_status); } && {
14254 test -z "$ac_c_werror_flag" ||
14255 test ! -s conftest.err
14256 } && test -s conftest$ac_exeext &&
14257 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014258 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014259else
Martin v. Löwis11437992002-04-12 09:54:03 +000014260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014261sed 's/^/| /' conftest.$ac_ext >&5
14262
Martin v. Löwiseba40652007-08-30 20:10:57 +000014263 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014265
14266rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014268LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014269fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014270{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14271echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014272if test $ac_cv_lib_pthreads_pthread_create = yes; then
14273 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014274#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014275_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014276
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014277 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014278 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014279 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014280else
Greg Steinadf63d62000-07-05 10:38:09 +000014281
Martin v. Löwiseba40652007-08-30 20:10:57 +000014282 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14283echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014284if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14285 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014286else
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014288LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014289cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014290/* confdefs.h. */
14291_ACEOF
14292cat confdefs.h >>conftest.$ac_ext
14293cat >>conftest.$ac_ext <<_ACEOF
14294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014295
Martin v. Löwiseba40652007-08-30 20:10:57 +000014296/* Override any GCC internal prototype to avoid an error.
14297 Use char because int might match the return type of a GCC
14298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014299#ifdef __cplusplus
14300extern "C"
14301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014302char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014303int
14304main ()
14305{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014306return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014307 ;
14308 return 0;
14309}
14310_ACEOF
14311rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014312if { (ac_try="$ac_link"
14313case "(($ac_try" in
14314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14315 *) ac_try_echo=$ac_try;;
14316esac
14317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14318 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014320 grep -v '^ *+' conftest.er1 >conftest.err
14321 rm -f conftest.er1
14322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014324 (exit $ac_status); } && {
14325 test -z "$ac_c_werror_flag" ||
14326 test ! -s conftest.err
14327 } && test -s conftest$ac_exeext &&
14328 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014330else
Martin v. Löwis11437992002-04-12 09:54:03 +000014331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014332sed 's/^/| /' conftest.$ac_ext >&5
14333
Martin v. Löwiseba40652007-08-30 20:10:57 +000014334 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014336
14337rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014338 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014339LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14342echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014343if test $ac_cv_lib_c_r_pthread_create = yes; then
14344 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014345#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014346_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014347
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014348 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014349 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014350 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014351else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014352
Martin v. Löwiseba40652007-08-30 20:10:57 +000014353 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14354echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014355if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14356 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014359LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014361/* confdefs.h. */
14362_ACEOF
14363cat confdefs.h >>conftest.$ac_ext
14364cat >>conftest.$ac_ext <<_ACEOF
14365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014366
Martin v. Löwiseba40652007-08-30 20:10:57 +000014367/* Override any GCC internal prototype to avoid an error.
14368 Use char because int might match the return type of a GCC
14369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014370#ifdef __cplusplus
14371extern "C"
14372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014373char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014374int
14375main ()
14376{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014377return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 ;
14379 return 0;
14380}
14381_ACEOF
14382rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014383if { (ac_try="$ac_link"
14384case "(($ac_try" in
14385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14386 *) ac_try_echo=$ac_try;;
14387esac
14388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14389 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014391 grep -v '^ *+' conftest.er1 >conftest.err
14392 rm -f conftest.er1
14393 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395 (exit $ac_status); } && {
14396 test -z "$ac_c_werror_flag" ||
14397 test ! -s conftest.err
14398 } && test -s conftest$ac_exeext &&
14399 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014401else
Martin v. Löwis11437992002-04-12 09:54:03 +000014402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014403sed 's/^/| /' conftest.$ac_ext >&5
14404
Martin v. Löwiseba40652007-08-30 20:10:57 +000014405 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014407
14408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014409 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014410LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014412{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14413echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014414if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14415 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014416#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014417_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014418
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014419 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014420 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014421 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014422else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014423
Martin v. Löwiseba40652007-08-30 20:10:57 +000014424 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14425echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014426if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14427 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014428else
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014430LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014431cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014432/* confdefs.h. */
14433_ACEOF
14434cat confdefs.h >>conftest.$ac_ext
14435cat >>conftest.$ac_ext <<_ACEOF
14436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
Martin v. Löwiseba40652007-08-30 20:10:57 +000014438/* Override any GCC internal prototype to avoid an error.
14439 Use char because int might match the return type of a GCC
14440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014441#ifdef __cplusplus
14442extern "C"
14443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014444char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014445int
14446main ()
14447{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014448return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 ;
14450 return 0;
14451}
14452_ACEOF
14453rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014454if { (ac_try="$ac_link"
14455case "(($ac_try" in
14456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14457 *) ac_try_echo=$ac_try;;
14458esac
14459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14460 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014462 grep -v '^ *+' conftest.er1 >conftest.err
14463 rm -f conftest.er1
14464 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466 (exit $ac_status); } && {
14467 test -z "$ac_c_werror_flag" ||
14468 test ! -s conftest.err
14469 } && test -s conftest$ac_exeext &&
14470 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014472else
Martin v. Löwis11437992002-04-12 09:54:03 +000014473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014474sed 's/^/| /' conftest.$ac_ext >&5
14475
Martin v. Löwiseba40652007-08-30 20:10:57 +000014476 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014478
14479rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014480 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014481LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014483{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14484echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014485if test $ac_cv_lib_cma_pthread_create = yes; then
14486 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014487#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014488_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014489
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014490 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014491 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014492 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014493else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014494
Martin v. Löwis130fb172001-07-19 11:00:41 +000014495 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014496fi
14497
Guido van Rossum627b2d71993-12-24 10:39:16 +000014498
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014499fi
14500
Guido van Rossum0be3e491997-05-22 20:33:33 +000014501fi
14502
Guido van Rossum49545951997-12-02 19:28:29 +000014503fi
14504
Guido van Rossumb93a8621998-05-07 13:27:32 +000014505fi
14506
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014507
Michael W. Hudson54241132001-12-07 15:38:26 +000014508fi
14509
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014510
14511fi
14512
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514
14515rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014516 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014517fi
14518
Martin v. Löwis11437992002-04-12 09:54:03 +000014519fi
14520
14521
14522fi
14523
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014524
Michael W. Hudson54241132001-12-07 15:38:26 +000014525
Martin v. Löwiseba40652007-08-30 20:10:57 +000014526 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14527echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014528if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14529 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014532LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014533cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014534/* confdefs.h. */
14535_ACEOF
14536cat confdefs.h >>conftest.$ac_ext
14537cat >>conftest.$ac_ext <<_ACEOF
14538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014539
Martin v. Löwiseba40652007-08-30 20:10:57 +000014540/* Override any GCC internal prototype to avoid an error.
14541 Use char because int might match the return type of a GCC
14542 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014543#ifdef __cplusplus
14544extern "C"
14545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014546char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014547int
14548main ()
14549{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014550return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 ;
14552 return 0;
14553}
14554_ACEOF
14555rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014556if { (ac_try="$ac_link"
14557case "(($ac_try" in
14558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14559 *) ac_try_echo=$ac_try;;
14560esac
14561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014564 grep -v '^ *+' conftest.er1 >conftest.err
14565 rm -f conftest.er1
14566 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568 (exit $ac_status); } && {
14569 test -z "$ac_c_werror_flag" ||
14570 test ! -s conftest.err
14571 } && test -s conftest$ac_exeext &&
14572 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014573 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014574else
Martin v. Löwis11437992002-04-12 09:54:03 +000014575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014576sed 's/^/| /' conftest.$ac_ext >&5
14577
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014580
14581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014582 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014583LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14586echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014587if test $ac_cv_lib_mpc_usconfig = yes; then
14588 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014589#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014590_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014591
Martin v. Löwis130fb172001-07-19 11:00:41 +000014592 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014593 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014594 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014595fi
14596
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014597
Neal Norwitza978ab02002-11-02 16:58:05 +000014598 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014599 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14600echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014601if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14602 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014603else
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014605LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014607/* confdefs.h. */
14608_ACEOF
14609cat confdefs.h >>conftest.$ac_ext
14610cat >>conftest.$ac_ext <<_ACEOF
14611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Martin v. Löwiseba40652007-08-30 20:10:57 +000014613/* Override any GCC internal prototype to avoid an error.
14614 Use char because int might match the return type of a GCC
14615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014616#ifdef __cplusplus
14617extern "C"
14618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014619char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014620int
14621main ()
14622{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014623return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 ;
14625 return 0;
14626}
14627_ACEOF
14628rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014629if { (ac_try="$ac_link"
14630case "(($ac_try" in
14631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14632 *) ac_try_echo=$ac_try;;
14633esac
14634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14635 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014637 grep -v '^ *+' conftest.er1 >conftest.err
14638 rm -f conftest.er1
14639 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014641 (exit $ac_status); } && {
14642 test -z "$ac_c_werror_flag" ||
14643 test ! -s conftest.err
14644 } && test -s conftest$ac_exeext &&
14645 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014647else
Martin v. Löwis11437992002-04-12 09:54:03 +000014648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014649sed 's/^/| /' conftest.$ac_ext >&5
14650
Martin v. Löwiseba40652007-08-30 20:10:57 +000014651 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014652fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014653
14654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014655 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014656LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014657fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014658{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14659echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014660if test $ac_cv_lib_thread_thr_create = yes; then
14661 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014662#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014663_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014664
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014665 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014666 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014667 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014668fi
14669
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014670 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014671
Martin v. Löwis130fb172001-07-19 11:00:41 +000014672 if test "$USE_THREAD_MODULE" != "#"
14673 then
14674 # If the above checks didn't disable threads, (at least) OSF1
14675 # needs this '-threads' argument during linking.
14676 case $ac_sys_system in
14677 OSF1) LDLAST=-threads;;
14678 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014679 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014680fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014681
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014682if test "$posix_threads" = "yes"; then
14683 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014684
14685cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014686#define _POSIX_THREADS 1
14687_ACEOF
14688
14689 fi
14690
14691 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14692 case $ac_sys_system/$ac_sys_release in
14693 SunOS/5.6)
14694cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014695#define HAVE_PTHREAD_DESTRUCTOR 1
14696_ACEOF
14697
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014698 ;;
14699 SunOS/5.8)
14700cat >>confdefs.h <<\_ACEOF
14701#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14702_ACEOF
14703
14704 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014705 AIX/5)
14706cat >>confdefs.h <<\_ACEOF
14707#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14708_ACEOF
14709
14710 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014711 esac
14712
Martin v. Löwiseba40652007-08-30 20:10:57 +000014713 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14714echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014715 if test "${ac_cv_pthread_system_supported+set}" = set; then
14716 echo $ECHO_N "(cached) $ECHO_C" >&6
14717else
14718 if test "$cross_compiling" = yes; then
14719 ac_cv_pthread_system_supported=no
14720else
14721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014722/* confdefs.h. */
14723_ACEOF
14724cat confdefs.h >>conftest.$ac_ext
14725cat >>conftest.$ac_ext <<_ACEOF
14726/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014727#include <pthread.h>
14728 void *foo(void *parm) {
14729 return NULL;
14730 }
14731 main() {
14732 pthread_attr_t attr;
14733 pthread_t id;
14734 if (pthread_attr_init(&attr)) exit(-1);
14735 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14736 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14737 exit(0);
14738 }
14739_ACEOF
14740rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014741if { (ac_try="$ac_link"
14742case "(($ac_try" in
14743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14744 *) ac_try_echo=$ac_try;;
14745esac
14746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14747 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014748 ac_status=$?
14749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751 { (case "(($ac_try" in
14752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14753 *) ac_try_echo=$ac_try;;
14754esac
14755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14756 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014757 ac_status=$?
14758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14759 (exit $ac_status); }; }; then
14760 ac_cv_pthread_system_supported=yes
14761else
14762 echo "$as_me: program exited with status $ac_status" >&5
14763echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014764sed 's/^/| /' conftest.$ac_ext >&5
14765
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014766( exit $ac_status )
14767ac_cv_pthread_system_supported=no
14768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014769rm -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 +000014770fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014771
Martin v. Löwiseba40652007-08-30 20:10:57 +000014772
14773
Guido van Rossum627b2d71993-12-24 10:39:16 +000014774fi
14775
Martin v. Löwiseba40652007-08-30 20:10:57 +000014776 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14777echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014778 if test "$ac_cv_pthread_system_supported" = "yes"; then
14779
14780cat >>confdefs.h <<\_ACEOF
14781#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14782_ACEOF
14783
14784 fi
14785
14786for ac_func in pthread_sigmask
14787do
14788as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014789{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14790echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14791if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014792 echo $ECHO_N "(cached) $ECHO_C" >&6
14793else
14794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014795/* confdefs.h. */
14796_ACEOF
14797cat confdefs.h >>conftest.$ac_ext
14798cat >>conftest.$ac_ext <<_ACEOF
14799/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014800/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14801 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14802#define $ac_func innocuous_$ac_func
14803
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014804/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014805 which can conflict with char $ac_func (); below.
14806 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014807 <limits.h> exists even on freestanding compilers. */
14808
14809#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014810# include <limits.h>
14811#else
14812# include <assert.h>
14813#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014814
14815#undef $ac_func
14816
Martin v. Löwiseba40652007-08-30 20:10:57 +000014817/* Override any GCC internal prototype to avoid an error.
14818 Use char because int might match the return type of a GCC
14819 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014820#ifdef __cplusplus
14821extern "C"
14822#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014823char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014824/* The GNU C library defines this for functions which it implements
14825 to always fail with ENOSYS. Some functions are actually named
14826 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014827#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014828choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014829#endif
14830
Skip Montanaro6dead952003-09-25 14:50:04 +000014831int
14832main ()
14833{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014835 ;
14836 return 0;
14837}
14838_ACEOF
14839rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014840if { (ac_try="$ac_link"
14841case "(($ac_try" in
14842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14843 *) ac_try_echo=$ac_try;;
14844esac
14845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14846 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014848 grep -v '^ *+' conftest.er1 >conftest.err
14849 rm -f conftest.er1
14850 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014852 (exit $ac_status); } && {
14853 test -z "$ac_c_werror_flag" ||
14854 test ! -s conftest.err
14855 } && test -s conftest$ac_exeext &&
14856 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014857 eval "$as_ac_var=yes"
14858else
14859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014860sed 's/^/| /' conftest.$ac_ext >&5
14861
Martin v. Löwiseba40652007-08-30 20:10:57 +000014862 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864
14865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014868ac_res=`eval echo '${'$as_ac_var'}'`
14869 { echo "$as_me:$LINENO: result: $ac_res" >&5
14870echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014871if test `eval echo '${'$as_ac_var'}'` = yes; then
14872 cat >>confdefs.h <<_ACEOF
14873#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14874_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014875 case $ac_sys_system in
14876 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014877
Jason Tishlerfac083d2003-07-22 15:20:49 +000014878cat >>confdefs.h <<\_ACEOF
14879#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14880_ACEOF
14881
14882 ;;
14883 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014884fi
14885done
14886
14887fi
14888
14889
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014890# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014891
14892
Martin v. Löwiseba40652007-08-30 20:10:57 +000014893{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14894echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14895# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014896if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014897 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014898 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014899 { echo "$as_me:$LINENO: result: no" >&5
14900echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014901 ipv6=no
14902 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014903 *) { echo "$as_me:$LINENO: result: yes" >&5
14904echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014905 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014906#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014907_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014908
14909 ipv6=yes
14910 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014912else
Martin v. Löwis11437992002-04-12 09:54:03 +000014913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014914 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014915 { echo "$as_me:$LINENO: result: no" >&5
14916echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014917 ipv6=no
14918
14919else
Martin v. Löwis11437992002-04-12 09:54:03 +000014920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014921/* confdefs.h. */
14922_ACEOF
14923cat confdefs.h >>conftest.$ac_ext
14924cat >>conftest.$ac_ext <<_ACEOF
14925/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014926 /* AF_INET6 available check */
14927#include <sys/types.h>
14928#include <sys/socket.h>
14929main()
14930{
14931 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14932 exit(1);
14933 else
14934 exit(0);
14935}
14936
Martin v. Löwis11437992002-04-12 09:54:03 +000014937_ACEOF
14938rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014939if { (ac_try="$ac_link"
14940case "(($ac_try" in
14941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14942 *) ac_try_echo=$ac_try;;
14943esac
14944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14945 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014946 ac_status=$?
14947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14948 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014949 { (case "(($ac_try" in
14950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14951 *) ac_try_echo=$ac_try;;
14952esac
14953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14954 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014955 ac_status=$?
14956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14957 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014958 { echo "$as_me:$LINENO: result: yes" >&5
14959echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014960 ipv6=yes
14961else
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 echo "$as_me: program exited with status $ac_status" >&5
14963echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014964sed 's/^/| /' conftest.$ac_ext >&5
14965
Martin v. Löwis11437992002-04-12 09:54:03 +000014966( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014967{ echo "$as_me:$LINENO: result: no" >&5
14968echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014969 ipv6=no
14970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971rm -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 +000014972fi
14973
Martin v. Löwiseba40652007-08-30 20:10:57 +000014974
14975
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014976if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014977 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14978echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014980/* confdefs.h. */
14981_ACEOF
14982cat confdefs.h >>conftest.$ac_ext
14983cat >>conftest.$ac_ext <<_ACEOF
14984/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014985#include <sys/types.h>
14986#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014987int
14988main ()
14989{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014990struct sockaddr_in6 x;
14991x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014992 ;
14993 return 0;
14994}
14995_ACEOF
14996rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997if { (ac_try="$ac_compile"
14998case "(($ac_try" in
14999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15000 *) ac_try_echo=$ac_try;;
15001esac
15002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015005 grep -v '^ *+' conftest.er1 >conftest.err
15006 rm -f conftest.er1
15007 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015009 (exit $ac_status); } && {
15010 test -z "$ac_c_werror_flag" ||
15011 test ! -s conftest.err
15012 } && test -s conftest.$ac_objext; then
15013 { echo "$as_me:$LINENO: result: yes" >&5
15014echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015015 ipv6=yes
15016else
Martin v. Löwis11437992002-04-12 09:54:03 +000015017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015018sed 's/^/| /' conftest.$ac_ext >&5
15019
Martin v. Löwiseba40652007-08-30 20:10:57 +000015020 { echo "$as_me:$LINENO: result: no" >&5
15021echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015022 ipv6=no
15023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015024
15025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015026fi
15027
15028if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015029 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015030#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015031_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015032
15033fi
15034
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035fi
15036
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015037
15038ipv6type=unknown
15039ipv6lib=none
15040ipv6trylibc=no
15041
15042if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15044echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015045 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15046 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015047 case $i in
15048 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015050/* confdefs.h. */
15051_ACEOF
15052cat confdefs.h >>conftest.$ac_ext
15053cat >>conftest.$ac_ext <<_ACEOF
15054/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015055
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015056#include <netinet/in.h>
15057#ifdef IPV6_INRIA_VERSION
15058yes
15059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015060_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015062 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015063 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015064fi
15065rm -f conftest*
15066
15067 ;;
15068 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015070/* confdefs.h. */
15071_ACEOF
15072cat confdefs.h >>conftest.$ac_ext
15073cat >>conftest.$ac_ext <<_ACEOF
15074/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015075
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015076#include <netinet/in.h>
15077#ifdef __KAME__
15078yes
15079#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015080_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015081if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015082 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015083 ipv6type=$i;
15084 ipv6lib=inet6
15085 ipv6libdir=/usr/local/v6/lib
15086 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015087fi
15088rm -f conftest*
15089
15090 ;;
15091 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015093/* confdefs.h. */
15094_ACEOF
15095cat confdefs.h >>conftest.$ac_ext
15096cat >>conftest.$ac_ext <<_ACEOF
15097/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015098
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015099#include <features.h>
15100#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15101yes
15102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015103_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015104if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015105 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015106 ipv6type=$i;
15107 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015108fi
15109rm -f conftest*
15110
15111 ;;
15112 linux-inet6)
15113 if test -d /usr/inet6; then
15114 ipv6type=$i
15115 ipv6lib=inet6
15116 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015117 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015118 fi
15119 ;;
15120 solaris)
15121 if test -f /etc/netconfig; then
15122 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15123 ipv6type=$i
15124 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015125 fi
15126 fi
15127 ;;
15128 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015130/* confdefs.h. */
15131_ACEOF
15132cat confdefs.h >>conftest.$ac_ext
15133cat >>conftest.$ac_ext <<_ACEOF
15134/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015135
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015136#include <sys/param.h>
15137#ifdef _TOSHIBA_INET6
15138yes
15139#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015140_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015142 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015143 ipv6type=$i;
15144 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015145 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015146fi
15147rm -f conftest*
15148
15149 ;;
15150 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015152/* confdefs.h. */
15153_ACEOF
15154cat confdefs.h >>conftest.$ac_ext
15155cat >>conftest.$ac_ext <<_ACEOF
15156/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015157
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015158#include </usr/local/v6/include/sys/v6config.h>
15159#ifdef __V6D__
15160yes
15161#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015162_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015164 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015165 ipv6type=$i;
15166 ipv6lib=v6;
15167 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015168 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015169fi
15170rm -f conftest*
15171
15172 ;;
15173 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015175/* confdefs.h. */
15176_ACEOF
15177cat confdefs.h >>conftest.$ac_ext
15178cat >>conftest.$ac_ext <<_ACEOF
15179/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015181#include <sys/param.h>
15182#ifdef _ZETA_MINAMI_INET6
15183yes
15184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015185_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015187 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015188 ipv6type=$i;
15189 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015190 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015191fi
15192rm -f conftest*
15193
15194 ;;
15195 esac
15196 if test "$ipv6type" != "unknown"; then
15197 break
15198 fi
15199 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15201echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015202fi
15203
15204if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15205 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15206 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15207 echo "using lib$ipv6lib"
15208 else
15209 if test $ipv6trylibc = "yes"; then
15210 echo "using libc"
15211 else
15212 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15213 echo "You need to fetch lib$ipv6lib.a from appropriate"
15214 echo 'ipv6 kit and compile beforehand.'
15215 exit 1
15216 fi
15217 fi
15218fi
15219
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015220# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015221{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15222echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015223
Martin v. Löwiseba40652007-08-30 20:10:57 +000015224# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015225if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226 withval=$with_doc_strings;
15227fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015228
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015229
15230if test -z "$with_doc_strings"
15231then with_doc_strings="yes"
15232fi
15233if test "$with_doc_strings" != "no"
15234then
15235
15236cat >>confdefs.h <<\_ACEOF
15237#define WITH_DOC_STRINGS 1
15238_ACEOF
15239
15240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15242echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015243
Neil Schemenauera35c6882001-02-27 04:45:05 +000015244# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015245{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15246echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015247
Martin v. Löwiseba40652007-08-30 20:10:57 +000015248# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015249if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015251if test "$withval" != no
15252then
15253
15254cat >>confdefs.h <<\_ACEOF
15255#define WITH_TSC 1
15256_ACEOF
15257
Martin v. Löwiseba40652007-08-30 20:10:57 +000015258 { echo "$as_me:$LINENO: result: yes" >&5
15259echo "${ECHO_T}yes" >&6; }
15260else { echo "$as_me:$LINENO: result: no" >&5
15261echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015262fi
15263else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015264 { echo "$as_me:$LINENO: result: no" >&5
15265echo "${ECHO_T}no" >&6; }
15266fi
15267
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015268
15269# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15271echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015272
Martin v. Löwiseba40652007-08-30 20:10:57 +000015273# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015274if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015275 withval=$with_pymalloc;
15276fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015277
Neil Schemenauera35c6882001-02-27 04:45:05 +000015278
Neil Schemenauer16c22972002-03-22 15:34:49 +000015279if test -z "$with_pymalloc"
15280then with_pymalloc="yes"
15281fi
15282if test "$with_pymalloc" != "no"
15283then
Martin v. Löwis11437992002-04-12 09:54:03 +000015284
15285cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015286#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015287_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015288
15289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015290{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15291echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015292
Barry Warsawef82cd72000-06-30 16:21:01 +000015293# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15295echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015296
Martin v. Löwiseba40652007-08-30 20:10:57 +000015297# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015298if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015299 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015300if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015301then
15302
15303cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015304#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015305_ACEOF
15306
Martin v. Löwiseba40652007-08-30 20:10:57 +000015307 { echo "$as_me:$LINENO: result: yes" >&5
15308echo "${ECHO_T}yes" >&6; }
15309else { echo "$as_me:$LINENO: result: no" >&5
15310echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015311fi
15312else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313 { echo "$as_me:$LINENO: result: no" >&5
15314echo "${ECHO_T}no" >&6; }
15315fi
15316
Barry Warsawef82cd72000-06-30 16:21:01 +000015317
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015318# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015319
Guido van Rossum98935bf2001-09-05 19:13:16 +000015320DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015321
Guido van Rossume97ee181999-12-20 21:27:22 +000015322# the dlopen() function means we might want to use dynload_shlib.o. some
15323# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015324
Thomas Wouters3a584202000-08-05 23:28:51 +000015325for ac_func in dlopen
15326do
Martin v. Löwis11437992002-04-12 09:54:03 +000015327as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15329echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15330if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015331 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015332else
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015334/* confdefs.h. */
15335_ACEOF
15336cat confdefs.h >>conftest.$ac_ext
15337cat >>conftest.$ac_ext <<_ACEOF
15338/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015339/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15340 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15341#define $ac_func innocuous_$ac_func
15342
Guido van Rossume97ee181999-12-20 21:27:22 +000015343/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015344 which can conflict with char $ac_func (); below.
15345 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015346 <limits.h> exists even on freestanding compilers. */
15347
15348#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015349# include <limits.h>
15350#else
15351# include <assert.h>
15352#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015353
15354#undef $ac_func
15355
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356/* Override any GCC internal prototype to avoid an error.
15357 Use char because int might match the return type of a GCC
15358 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015359#ifdef __cplusplus
15360extern "C"
15361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015362char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015363/* The GNU C library defines this for functions which it implements
15364 to always fail with ENOSYS. Some functions are actually named
15365 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015367choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015368#endif
15369
Skip Montanaro6dead952003-09-25 14:50:04 +000015370int
15371main ()
15372{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015374 ;
15375 return 0;
15376}
15377_ACEOF
15378rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015379if { (ac_try="$ac_link"
15380case "(($ac_try" in
15381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15382 *) ac_try_echo=$ac_try;;
15383esac
15384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15385 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015387 grep -v '^ *+' conftest.er1 >conftest.err
15388 rm -f conftest.er1
15389 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391 (exit $ac_status); } && {
15392 test -z "$ac_c_werror_flag" ||
15393 test ! -s conftest.err
15394 } && test -s conftest$ac_exeext &&
15395 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015396 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015397else
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015399sed 's/^/| /' conftest.$ac_ext >&5
15400
Martin v. Löwiseba40652007-08-30 20:10:57 +000015401 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015402fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403
15404rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015405 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407ac_res=`eval echo '${'$as_ac_var'}'`
15408 { echo "$as_me:$LINENO: result: $ac_res" >&5
15409echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015410if test `eval echo '${'$as_ac_var'}'` = yes; then
15411 cat >>confdefs.h <<_ACEOF
15412#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15413_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015414
Guido van Rossume97ee181999-12-20 21:27:22 +000015415fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015416done
Guido van Rossume97ee181999-12-20 21:27:22 +000015417
Michael W. Hudson54241132001-12-07 15:38:26 +000015418
Guido van Rossume97ee181999-12-20 21:27:22 +000015419# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15420# loading of modules.
15421
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15423echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015424if test -z "$DYNLOADFILE"
15425then
15426 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015427 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15428 if test "$ac_cv_func_dlopen" = yes
15429 then DYNLOADFILE="dynload_shlib.o"
15430 else DYNLOADFILE="dynload_aix.o"
15431 fi
15432 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015433 BeOS*) DYNLOADFILE="dynload_beos.o";;
15434 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015435 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15436 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015437 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015438 *)
15439 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15440 # out any dynamic loading
15441 if test "$ac_cv_func_dlopen" = yes
15442 then DYNLOADFILE="dynload_shlib.o"
15443 else DYNLOADFILE="dynload_stub.o"
15444 fi
15445 ;;
15446 esac
15447fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015448{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15449echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015450if test "$DYNLOADFILE" != "dynload_stub.o"
15451then
Martin v. Löwis11437992002-04-12 09:54:03 +000015452
15453cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015454#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015455_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015456
15457fi
15458
Neil Schemenauer4e425612001-06-19 15:44:15 +000015459# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15460
Michael W. Hudson54241132001-12-07 15:38:26 +000015461
Martin v. Löwiseba40652007-08-30 20:10:57 +000015462{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15463echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015464if test -z "$MACHDEP_OBJS"
15465then
Jack Jansene578a632001-08-15 01:27:14 +000015466 MACHDEP_OBJS=$extra_machdep_objs
15467else
15468 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015470{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15471echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015472
Guido van Rossum627b2d71993-12-24 10:39:16 +000015473# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
Martin v. Löwisd6320502004-08-12 13:45:08 +000015545
Martin v. Löwisc3001752005-01-23 09:27:24 +000015546
15547
Neal Norwitz05a45592006-03-20 06:30:08 +000015548
15549
Martin v. Löwis382abef2007-02-19 10:55:19 +000015550
15551
Christian Heimes36281872007-11-30 21:11:28 +000015552
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015553
15554
15555for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15556 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015557 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015558 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015559 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015560 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015561 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015562 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015563 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015564 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015565 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015566 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015567do
Martin v. Löwis11437992002-04-12 09:54:03 +000015568as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15570echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15571if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015573else
Martin v. Löwis11437992002-04-12 09:54:03 +000015574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015575/* confdefs.h. */
15576_ACEOF
15577cat confdefs.h >>conftest.$ac_ext
15578cat >>conftest.$ac_ext <<_ACEOF
15579/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015580/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15581 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15582#define $ac_func innocuous_$ac_func
15583
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015584/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015585 which can conflict with char $ac_func (); below.
15586 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015587 <limits.h> exists even on freestanding compilers. */
15588
15589#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015590# include <limits.h>
15591#else
15592# include <assert.h>
15593#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015594
15595#undef $ac_func
15596
Martin v. Löwiseba40652007-08-30 20:10:57 +000015597/* Override any GCC internal prototype to avoid an error.
15598 Use char because int might match the return type of a GCC
15599 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015600#ifdef __cplusplus
15601extern "C"
15602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015603char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015604/* The GNU C library defines this for functions which it implements
15605 to always fail with ENOSYS. Some functions are actually named
15606 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015607#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015608choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015609#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015610
Skip Montanaro6dead952003-09-25 14:50:04 +000015611int
15612main ()
15613{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015614return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 ;
15616 return 0;
15617}
15618_ACEOF
15619rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620if { (ac_try="$ac_link"
15621case "(($ac_try" in
15622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15623 *) ac_try_echo=$ac_try;;
15624esac
15625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15626 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015628 grep -v '^ *+' conftest.er1 >conftest.err
15629 rm -f conftest.er1
15630 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015632 (exit $ac_status); } && {
15633 test -z "$ac_c_werror_flag" ||
15634 test ! -s conftest.err
15635 } && test -s conftest$ac_exeext &&
15636 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015637 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015638else
Martin v. Löwis11437992002-04-12 09:54:03 +000015639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015640sed 's/^/| /' conftest.$ac_ext >&5
15641
Martin v. Löwiseba40652007-08-30 20:10:57 +000015642 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015643fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015644
15645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015646 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015648ac_res=`eval echo '${'$as_ac_var'}'`
15649 { echo "$as_me:$LINENO: result: $ac_res" >&5
15650echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015651if test `eval echo '${'$as_ac_var'}'` = yes; then
15652 cat >>confdefs.h <<_ACEOF
15653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15654_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015655
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015656fi
15657done
15658
Michael W. Hudson54241132001-12-07 15:38:26 +000015659
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015660# For some functions, having a definition is not sufficient, since
15661# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015662{ echo "$as_me:$LINENO: checking for chroot" >&5
15663echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015665/* confdefs.h. */
15666_ACEOF
15667cat confdefs.h >>conftest.$ac_ext
15668cat >>conftest.$ac_ext <<_ACEOF
15669/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015670#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015671int
15672main ()
15673{
15674void *x=chroot
15675 ;
15676 return 0;
15677}
15678_ACEOF
15679rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015680if { (ac_try="$ac_compile"
15681case "(($ac_try" in
15682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15683 *) ac_try_echo=$ac_try;;
15684esac
15685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015688 grep -v '^ *+' conftest.er1 >conftest.err
15689 rm -f conftest.er1
15690 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015692 (exit $ac_status); } && {
15693 test -z "$ac_c_werror_flag" ||
15694 test ! -s conftest.err
15695 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015696
15697cat >>confdefs.h <<\_ACEOF
15698#define HAVE_CHROOT 1
15699_ACEOF
15700
Martin v. Löwiseba40652007-08-30 20:10:57 +000015701 { echo "$as_me:$LINENO: result: yes" >&5
15702echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015703else
15704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015705sed 's/^/| /' conftest.$ac_ext >&5
15706
Martin v. Löwiseba40652007-08-30 20:10:57 +000015707 { echo "$as_me:$LINENO: result: no" >&5
15708echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015709
15710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015711
15712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15713{ echo "$as_me:$LINENO: checking for link" >&5
15714echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015716/* confdefs.h. */
15717_ACEOF
15718cat confdefs.h >>conftest.$ac_ext
15719cat >>conftest.$ac_ext <<_ACEOF
15720/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015721#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015722int
15723main ()
15724{
15725void *x=link
15726 ;
15727 return 0;
15728}
15729_ACEOF
15730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731if { (ac_try="$ac_compile"
15732case "(($ac_try" in
15733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15734 *) ac_try_echo=$ac_try;;
15735esac
15736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015739 grep -v '^ *+' conftest.er1 >conftest.err
15740 rm -f conftest.er1
15741 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015743 (exit $ac_status); } && {
15744 test -z "$ac_c_werror_flag" ||
15745 test ! -s conftest.err
15746 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015747
15748cat >>confdefs.h <<\_ACEOF
15749#define HAVE_LINK 1
15750_ACEOF
15751
Martin v. Löwiseba40652007-08-30 20:10:57 +000015752 { echo "$as_me:$LINENO: result: yes" >&5
15753echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015754else
15755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015756sed 's/^/| /' conftest.$ac_ext >&5
15757
Martin v. Löwiseba40652007-08-30 20:10:57 +000015758 { echo "$as_me:$LINENO: result: no" >&5
15759echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015760
15761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762
15763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15764{ echo "$as_me:$LINENO: checking for symlink" >&5
15765echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015767/* confdefs.h. */
15768_ACEOF
15769cat confdefs.h >>conftest.$ac_ext
15770cat >>conftest.$ac_ext <<_ACEOF
15771/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015772#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015773int
15774main ()
15775{
15776void *x=symlink
15777 ;
15778 return 0;
15779}
15780_ACEOF
15781rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015782if { (ac_try="$ac_compile"
15783case "(($ac_try" in
15784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15785 *) ac_try_echo=$ac_try;;
15786esac
15787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15788 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015789 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015790 grep -v '^ *+' conftest.er1 >conftest.err
15791 rm -f conftest.er1
15792 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015794 (exit $ac_status); } && {
15795 test -z "$ac_c_werror_flag" ||
15796 test ! -s conftest.err
15797 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015798
15799cat >>confdefs.h <<\_ACEOF
15800#define HAVE_SYMLINK 1
15801_ACEOF
15802
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803 { echo "$as_me:$LINENO: result: yes" >&5
15804echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015805else
15806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015807sed 's/^/| /' conftest.$ac_ext >&5
15808
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809 { echo "$as_me:$LINENO: result: no" >&5
15810echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015811
15812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015813
15814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15815{ echo "$as_me:$LINENO: checking for fchdir" >&5
15816echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015818/* confdefs.h. */
15819_ACEOF
15820cat confdefs.h >>conftest.$ac_ext
15821cat >>conftest.$ac_ext <<_ACEOF
15822/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015823#include <unistd.h>
15824int
15825main ()
15826{
15827void *x=fchdir
15828 ;
15829 return 0;
15830}
15831_ACEOF
15832rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015833if { (ac_try="$ac_compile"
15834case "(($ac_try" in
15835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15836 *) ac_try_echo=$ac_try;;
15837esac
15838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015841 grep -v '^ *+' conftest.er1 >conftest.err
15842 rm -f conftest.er1
15843 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015845 (exit $ac_status); } && {
15846 test -z "$ac_c_werror_flag" ||
15847 test ! -s conftest.err
15848 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015849
15850cat >>confdefs.h <<\_ACEOF
15851#define HAVE_FCHDIR 1
15852_ACEOF
15853
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854 { echo "$as_me:$LINENO: result: yes" >&5
15855echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015856else
15857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015858sed 's/^/| /' conftest.$ac_ext >&5
15859
Martin v. Löwiseba40652007-08-30 20:10:57 +000015860 { echo "$as_me:$LINENO: result: no" >&5
15861echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015862
15863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864
15865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15866{ echo "$as_me:$LINENO: checking for fsync" >&5
15867echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015868cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015869/* confdefs.h. */
15870_ACEOF
15871cat confdefs.h >>conftest.$ac_ext
15872cat >>conftest.$ac_ext <<_ACEOF
15873/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015874#include <unistd.h>
15875int
15876main ()
15877{
15878void *x=fsync
15879 ;
15880 return 0;
15881}
15882_ACEOF
15883rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015884if { (ac_try="$ac_compile"
15885case "(($ac_try" in
15886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15887 *) ac_try_echo=$ac_try;;
15888esac
15889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015892 grep -v '^ *+' conftest.er1 >conftest.err
15893 rm -f conftest.er1
15894 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015896 (exit $ac_status); } && {
15897 test -z "$ac_c_werror_flag" ||
15898 test ! -s conftest.err
15899 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015900
15901cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015902#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015903_ACEOF
15904
Martin v. Löwiseba40652007-08-30 20:10:57 +000015905 { echo "$as_me:$LINENO: result: yes" >&5
15906echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015907else
15908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015909sed 's/^/| /' conftest.$ac_ext >&5
15910
Martin v. Löwiseba40652007-08-30 20:10:57 +000015911 { echo "$as_me:$LINENO: result: no" >&5
15912echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015913
15914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015915
15916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15917{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15918echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015920/* confdefs.h. */
15921_ACEOF
15922cat confdefs.h >>conftest.$ac_ext
15923cat >>conftest.$ac_ext <<_ACEOF
15924/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015925#include <unistd.h>
15926int
15927main ()
15928{
15929void *x=fdatasync
15930 ;
15931 return 0;
15932}
15933_ACEOF
15934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015935if { (ac_try="$ac_compile"
15936case "(($ac_try" in
15937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15938 *) ac_try_echo=$ac_try;;
15939esac
15940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015943 grep -v '^ *+' conftest.er1 >conftest.err
15944 rm -f conftest.er1
15945 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015947 (exit $ac_status); } && {
15948 test -z "$ac_c_werror_flag" ||
15949 test ! -s conftest.err
15950 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015951
15952cat >>confdefs.h <<\_ACEOF
15953#define HAVE_FDATASYNC 1
15954_ACEOF
15955
Martin v. Löwiseba40652007-08-30 20:10:57 +000015956 { echo "$as_me:$LINENO: result: yes" >&5
15957echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015958else
15959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015960sed 's/^/| /' conftest.$ac_ext >&5
15961
Martin v. Löwiseba40652007-08-30 20:10:57 +000015962 { echo "$as_me:$LINENO: result: no" >&5
15963echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015964
15965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015966
15967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015968{ echo "$as_me:$LINENO: checking for epoll" >&5
15969echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15970cat >conftest.$ac_ext <<_ACEOF
15971/* confdefs.h. */
15972_ACEOF
15973cat confdefs.h >>conftest.$ac_ext
15974cat >>conftest.$ac_ext <<_ACEOF
15975/* end confdefs.h. */
15976#include <sys/epoll.h>
15977int
15978main ()
15979{
15980void *x=epoll_create
15981 ;
15982 return 0;
15983}
15984_ACEOF
15985rm -f conftest.$ac_objext
15986if { (ac_try="$ac_compile"
15987case "(($ac_try" in
15988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15989 *) ac_try_echo=$ac_try;;
15990esac
15991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15992 (eval "$ac_compile") 2>conftest.er1
15993 ac_status=$?
15994 grep -v '^ *+' conftest.er1 >conftest.err
15995 rm -f conftest.er1
15996 cat conftest.err >&5
15997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15998 (exit $ac_status); } && {
15999 test -z "$ac_c_werror_flag" ||
16000 test ! -s conftest.err
16001 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016002
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016003cat >>confdefs.h <<\_ACEOF
16004#define HAVE_EPOLL 1
16005_ACEOF
16006
16007 { echo "$as_me:$LINENO: result: yes" >&5
16008echo "${ECHO_T}yes" >&6; }
16009else
16010 echo "$as_me: failed program was:" >&5
16011sed 's/^/| /' conftest.$ac_ext >&5
16012
16013 { echo "$as_me:$LINENO: result: no" >&5
16014echo "${ECHO_T}no" >&6; }
16015
16016fi
16017
16018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16019{ echo "$as_me:$LINENO: checking for kqueue" >&5
16020echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16021cat >conftest.$ac_ext <<_ACEOF
16022/* confdefs.h. */
16023_ACEOF
16024cat confdefs.h >>conftest.$ac_ext
16025cat >>conftest.$ac_ext <<_ACEOF
16026/* end confdefs.h. */
16027
16028#include <sys/types.h>
16029#include <sys/event.h>
16030
16031int
16032main ()
16033{
16034int x=kqueue()
16035 ;
16036 return 0;
16037}
16038_ACEOF
16039rm -f conftest.$ac_objext
16040if { (ac_try="$ac_compile"
16041case "(($ac_try" in
16042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16043 *) ac_try_echo=$ac_try;;
16044esac
16045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16046 (eval "$ac_compile") 2>conftest.er1
16047 ac_status=$?
16048 grep -v '^ *+' conftest.er1 >conftest.err
16049 rm -f conftest.er1
16050 cat conftest.err >&5
16051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16052 (exit $ac_status); } && {
16053 test -z "$ac_c_werror_flag" ||
16054 test ! -s conftest.err
16055 } && test -s conftest.$ac_objext; then
16056
16057cat >>confdefs.h <<\_ACEOF
16058#define HAVE_KQUEUE 1
16059_ACEOF
16060
16061 { echo "$as_me:$LINENO: result: yes" >&5
16062echo "${ECHO_T}yes" >&6; }
16063else
16064 echo "$as_me: failed program was:" >&5
16065sed 's/^/| /' conftest.$ac_ext >&5
16066
16067 { echo "$as_me:$LINENO: result: no" >&5
16068echo "${ECHO_T}no" >&6; }
16069
16070fi
16071
16072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016073# On some systems (eg. FreeBSD 5), we would find a definition of the
16074# functions ctermid_r, setgroups in the library, but no prototype
16075# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16076# address to avoid compiler warnings and potential miscompilations
16077# because of the missing prototypes.
16078
Martin v. Löwiseba40652007-08-30 20:10:57 +000016079{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16080echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016082/* confdefs.h. */
16083_ACEOF
16084cat confdefs.h >>conftest.$ac_ext
16085cat >>conftest.$ac_ext <<_ACEOF
16086/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016087
16088#include "confdefs.h"
16089#include <stdio.h>
16090
Martin v. Löwisd5843682002-11-21 20:41:28 +000016091int
16092main ()
16093{
16094void* p = ctermid_r
16095 ;
16096 return 0;
16097}
16098_ACEOF
16099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016100if { (ac_try="$ac_compile"
16101case "(($ac_try" in
16102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16103 *) ac_try_echo=$ac_try;;
16104esac
16105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016108 grep -v '^ *+' conftest.er1 >conftest.err
16109 rm -f conftest.er1
16110 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016112 (exit $ac_status); } && {
16113 test -z "$ac_c_werror_flag" ||
16114 test ! -s conftest.err
16115 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016116
16117cat >>confdefs.h <<\_ACEOF
16118#define HAVE_CTERMID_R 1
16119_ACEOF
16120
Martin v. Löwiseba40652007-08-30 20:10:57 +000016121 { echo "$as_me:$LINENO: result: yes" >&5
16122echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016123else
16124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016125sed 's/^/| /' conftest.$ac_ext >&5
16126
Martin v. Löwiseba40652007-08-30 20:10:57 +000016127 { echo "$as_me:$LINENO: result: no" >&5
16128echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016129
16130fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016131
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16133
16134{ echo "$as_me:$LINENO: checking for flock" >&5
16135echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016137/* confdefs.h. */
16138_ACEOF
16139cat confdefs.h >>conftest.$ac_ext
16140cat >>conftest.$ac_ext <<_ACEOF
16141/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016142
16143#include "confdefs.h"
16144#include <sys/file.h>
16145
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016146int
16147main ()
16148{
16149void* p = flock
16150 ;
16151 return 0;
16152}
16153_ACEOF
16154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016155if { (ac_try="$ac_compile"
16156case "(($ac_try" in
16157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16158 *) ac_try_echo=$ac_try;;
16159esac
16160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016163 grep -v '^ *+' conftest.er1 >conftest.err
16164 rm -f conftest.er1
16165 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016167 (exit $ac_status); } && {
16168 test -z "$ac_c_werror_flag" ||
16169 test ! -s conftest.err
16170 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016171
16172cat >>confdefs.h <<\_ACEOF
16173#define HAVE_FLOCK 1
16174_ACEOF
16175
Martin v. Löwiseba40652007-08-30 20:10:57 +000016176 { echo "$as_me:$LINENO: result: yes" >&5
16177echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016178else
16179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016180sed 's/^/| /' conftest.$ac_ext >&5
16181
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182 { echo "$as_me:$LINENO: result: no" >&5
16183echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016184
16185fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016186
Martin v. Löwiseba40652007-08-30 20:10:57 +000016187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16188
16189{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16190echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016192/* confdefs.h. */
16193_ACEOF
16194cat confdefs.h >>conftest.$ac_ext
16195cat >>conftest.$ac_ext <<_ACEOF
16196/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016197
16198#include "confdefs.h"
16199#include <unistd.h>
16200
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016201int
16202main ()
16203{
16204void* p = getpagesize
16205 ;
16206 return 0;
16207}
16208_ACEOF
16209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210if { (ac_try="$ac_compile"
16211case "(($ac_try" in
16212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16213 *) ac_try_echo=$ac_try;;
16214esac
16215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016218 grep -v '^ *+' conftest.er1 >conftest.err
16219 rm -f conftest.er1
16220 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016222 (exit $ac_status); } && {
16223 test -z "$ac_c_werror_flag" ||
16224 test ! -s conftest.err
16225 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016226
16227cat >>confdefs.h <<\_ACEOF
16228#define HAVE_GETPAGESIZE 1
16229_ACEOF
16230
Martin v. Löwiseba40652007-08-30 20:10:57 +000016231 { echo "$as_me:$LINENO: result: yes" >&5
16232echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016233else
16234 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016235sed 's/^/| /' conftest.$ac_ext >&5
16236
Martin v. Löwiseba40652007-08-30 20:10:57 +000016237 { echo "$as_me:$LINENO: result: no" >&5
16238echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016239
16240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016241
16242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016243
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016244for ac_prog in true
16245do
16246 # Extract the first word of "$ac_prog", so it can be a program name with args.
16247set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016248{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016250if test "${ac_cv_prog_TRUE+set}" = set; then
16251 echo $ECHO_N "(cached) $ECHO_C" >&6
16252else
16253 if test -n "$TRUE"; then
16254 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16255else
16256as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16257for as_dir in $PATH
16258do
16259 IFS=$as_save_IFS
16260 test -z "$as_dir" && as_dir=.
16261 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016262 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 +000016263 ac_cv_prog_TRUE="$ac_prog"
16264 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16265 break 2
16266 fi
16267done
16268done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016270
16271fi
16272fi
16273TRUE=$ac_cv_prog_TRUE
16274if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275 { echo "$as_me:$LINENO: result: $TRUE" >&5
16276echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016277else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016278 { echo "$as_me:$LINENO: result: no" >&5
16279echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016280fi
16281
Martin v. Löwiseba40652007-08-30 20:10:57 +000016282
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016283 test -n "$TRUE" && break
16284done
16285test -n "$TRUE" || TRUE="/bin/true"
16286
16287
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16289echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016290if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16291 echo $ECHO_N "(cached) $ECHO_C" >&6
16292else
16293 ac_check_lib_save_LIBS=$LIBS
16294LIBS="-lc $LIBS"
16295cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016296/* confdefs.h. */
16297_ACEOF
16298cat confdefs.h >>conftest.$ac_ext
16299cat >>conftest.$ac_ext <<_ACEOF
16300/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016301
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302/* Override any GCC internal prototype to avoid an error.
16303 Use char because int might match the return type of a GCC
16304 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016305#ifdef __cplusplus
16306extern "C"
16307#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016308char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016309int
16310main ()
16311{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016312return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016313 ;
16314 return 0;
16315}
16316_ACEOF
16317rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016318if { (ac_try="$ac_link"
16319case "(($ac_try" in
16320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16321 *) ac_try_echo=$ac_try;;
16322esac
16323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16324 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016325 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016326 grep -v '^ *+' conftest.er1 >conftest.err
16327 rm -f conftest.er1
16328 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016330 (exit $ac_status); } && {
16331 test -z "$ac_c_werror_flag" ||
16332 test ! -s conftest.err
16333 } && test -s conftest$ac_exeext &&
16334 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016335 ac_cv_lib_c_inet_aton=yes
16336else
16337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016338sed 's/^/| /' conftest.$ac_ext >&5
16339
Martin v. Löwiseba40652007-08-30 20:10:57 +000016340 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016342
16343rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016344 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016345LIBS=$ac_check_lib_save_LIBS
16346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016347{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16348echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016349if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016350 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016351else
16352
Martin v. Löwiseba40652007-08-30 20:10:57 +000016353{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16354echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016355if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16356 echo $ECHO_N "(cached) $ECHO_C" >&6
16357else
16358 ac_check_lib_save_LIBS=$LIBS
16359LIBS="-lresolv $LIBS"
16360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016361/* confdefs.h. */
16362_ACEOF
16363cat confdefs.h >>conftest.$ac_ext
16364cat >>conftest.$ac_ext <<_ACEOF
16365/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016366
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367/* Override any GCC internal prototype to avoid an error.
16368 Use char because int might match the return type of a GCC
16369 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016370#ifdef __cplusplus
16371extern "C"
16372#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016373char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016374int
16375main ()
16376{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016377return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016378 ;
16379 return 0;
16380}
16381_ACEOF
16382rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016383if { (ac_try="$ac_link"
16384case "(($ac_try" in
16385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16386 *) ac_try_echo=$ac_try;;
16387esac
16388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16389 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016390 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016391 grep -v '^ *+' conftest.er1 >conftest.err
16392 rm -f conftest.er1
16393 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395 (exit $ac_status); } && {
16396 test -z "$ac_c_werror_flag" ||
16397 test ! -s conftest.err
16398 } && test -s conftest$ac_exeext &&
16399 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016400 ac_cv_lib_resolv_inet_aton=yes
16401else
16402 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016403sed 's/^/| /' conftest.$ac_ext >&5
16404
Martin v. Löwiseba40652007-08-30 20:10:57 +000016405 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016407
16408rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016409 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016410LIBS=$ac_check_lib_save_LIBS
16411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016412{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16413echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016414if test $ac_cv_lib_resolv_inet_aton = yes; then
16415 cat >>confdefs.h <<_ACEOF
16416#define HAVE_LIBRESOLV 1
16417_ACEOF
16418
16419 LIBS="-lresolv $LIBS"
16420
16421fi
16422
16423
16424fi
16425
16426
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016427# On Tru64, chflags seems to be present, but calling it will
16428# exit Python
16429{ echo "$as_me:$LINENO: checking for chflags" >&5
16430echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16431if test "$cross_compiling" = yes; then
16432 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16433See \`config.log' for more details." >&5
16434echo "$as_me: error: cannot run test program while cross compiling
16435See \`config.log' for more details." >&2;}
16436 { (exit 1); exit 1; }; }
16437else
16438 cat >conftest.$ac_ext <<_ACEOF
16439/* confdefs.h. */
16440_ACEOF
16441cat confdefs.h >>conftest.$ac_ext
16442cat >>conftest.$ac_ext <<_ACEOF
16443/* end confdefs.h. */
16444
16445#include <sys/stat.h>
16446#include <unistd.h>
16447int main(int argc, char*argv[])
16448{
16449 if(chflags(argv[0], 0) != 0)
16450 return 1;
16451 return 0;
16452}
16453
16454_ACEOF
16455rm -f conftest$ac_exeext
16456if { (ac_try="$ac_link"
16457case "(($ac_try" in
16458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16459 *) ac_try_echo=$ac_try;;
16460esac
16461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16462 (eval "$ac_link") 2>&5
16463 ac_status=$?
16464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16465 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16466 { (case "(($ac_try" in
16467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16468 *) ac_try_echo=$ac_try;;
16469esac
16470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16471 (eval "$ac_try") 2>&5
16472 ac_status=$?
16473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16474 (exit $ac_status); }; }; then
16475
16476cat >>confdefs.h <<\_ACEOF
16477#define HAVE_CHFLAGS 1
16478_ACEOF
16479
16480 { echo "$as_me:$LINENO: result: yes" >&5
16481echo "${ECHO_T}yes" >&6; }
16482else
16483 echo "$as_me: program exited with status $ac_status" >&5
16484echo "$as_me: failed program was:" >&5
16485sed 's/^/| /' conftest.$ac_ext >&5
16486
16487( exit $ac_status )
16488{ echo "$as_me:$LINENO: result: no" >&5
16489echo "${ECHO_T}no" >&6; }
16490
16491fi
16492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16493fi
16494
16495
16496
16497{ echo "$as_me:$LINENO: checking for lchflags" >&5
16498echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16499if test "$cross_compiling" = yes; then
16500 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16501See \`config.log' for more details." >&5
16502echo "$as_me: error: cannot run test program while cross compiling
16503See \`config.log' for more details." >&2;}
16504 { (exit 1); exit 1; }; }
16505else
16506 cat >conftest.$ac_ext <<_ACEOF
16507/* confdefs.h. */
16508_ACEOF
16509cat confdefs.h >>conftest.$ac_ext
16510cat >>conftest.$ac_ext <<_ACEOF
16511/* end confdefs.h. */
16512
16513#include <sys/stat.h>
16514#include <unistd.h>
16515int main(int argc, char*argv[])
16516{
16517 if(lchflags(argv[0], 0) != 0)
16518 return 1;
16519 return 0;
16520}
16521
16522_ACEOF
16523rm -f conftest$ac_exeext
16524if { (ac_try="$ac_link"
16525case "(($ac_try" in
16526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16527 *) ac_try_echo=$ac_try;;
16528esac
16529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16530 (eval "$ac_link") 2>&5
16531 ac_status=$?
16532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16533 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16534 { (case "(($ac_try" in
16535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16536 *) ac_try_echo=$ac_try;;
16537esac
16538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16539 (eval "$ac_try") 2>&5
16540 ac_status=$?
16541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16542 (exit $ac_status); }; }; then
16543
16544cat >>confdefs.h <<\_ACEOF
16545#define HAVE_LCHFLAGS 1
16546_ACEOF
16547
16548 { echo "$as_me:$LINENO: result: yes" >&5
16549echo "${ECHO_T}yes" >&6; }
16550else
16551 echo "$as_me: program exited with status $ac_status" >&5
16552echo "$as_me: failed program was:" >&5
16553sed 's/^/| /' conftest.$ac_ext >&5
16554
16555( exit $ac_status )
16556{ echo "$as_me:$LINENO: result: no" >&5
16557echo "${ECHO_T}no" >&6; }
16558
16559fi
16560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16561fi
16562
16563
16564
Ronald Oussorenf8752642006-07-06 10:13:35 +000016565case $ac_sys_system/$ac_sys_release in
16566Darwin/*)
16567 _CUR_CFLAGS="${CFLAGS}"
16568 _CUR_LDFLAGS="${LDFLAGS}"
16569 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16570 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16571 ;;
16572esac
16573
Martin v. Löwiseba40652007-08-30 20:10:57 +000016574{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16575echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016576if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16577 echo $ECHO_N "(cached) $ECHO_C" >&6
16578else
16579 ac_check_lib_save_LIBS=$LIBS
16580LIBS="-lz $LIBS"
16581cat >conftest.$ac_ext <<_ACEOF
16582/* confdefs.h. */
16583_ACEOF
16584cat confdefs.h >>conftest.$ac_ext
16585cat >>conftest.$ac_ext <<_ACEOF
16586/* end confdefs.h. */
16587
Martin v. Löwiseba40652007-08-30 20:10:57 +000016588/* Override any GCC internal prototype to avoid an error.
16589 Use char because int might match the return type of a GCC
16590 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016591#ifdef __cplusplus
16592extern "C"
16593#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016594char inflateCopy ();
16595int
16596main ()
16597{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016599 ;
16600 return 0;
16601}
16602_ACEOF
16603rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016604if { (ac_try="$ac_link"
16605case "(($ac_try" in
16606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16607 *) ac_try_echo=$ac_try;;
16608esac
16609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16610 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016611 ac_status=$?
16612 grep -v '^ *+' conftest.er1 >conftest.err
16613 rm -f conftest.er1
16614 cat conftest.err >&5
16615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016616 (exit $ac_status); } && {
16617 test -z "$ac_c_werror_flag" ||
16618 test ! -s conftest.err
16619 } && test -s conftest$ac_exeext &&
16620 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016621 ac_cv_lib_z_inflateCopy=yes
16622else
16623 echo "$as_me: failed program was:" >&5
16624sed 's/^/| /' conftest.$ac_ext >&5
16625
Martin v. Löwiseba40652007-08-30 20:10:57 +000016626 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016628
16629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016630 conftest$ac_exeext conftest.$ac_ext
16631LIBS=$ac_check_lib_save_LIBS
16632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016633{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16634echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016635if test $ac_cv_lib_z_inflateCopy = yes; then
16636
16637cat >>confdefs.h <<\_ACEOF
16638#define HAVE_ZLIB_COPY 1
16639_ACEOF
16640
16641fi
16642
16643
Ronald Oussorenf8752642006-07-06 10:13:35 +000016644case $ac_sys_system/$ac_sys_release in
16645Darwin/*)
16646 CFLAGS="${_CUR_CFLAGS}"
16647 LDFLAGS="${_CUR_LDFLAGS}"
16648 ;;
16649esac
16650
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16652echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016654/* confdefs.h. */
16655_ACEOF
16656cat confdefs.h >>conftest.$ac_ext
16657cat >>conftest.$ac_ext <<_ACEOF
16658/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016659
16660#include "confdefs.h"
16661#include <netdb.h>
16662
Martin v. Löwise9416172003-05-03 10:12:45 +000016663int
16664main ()
16665{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016666void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016667 ;
16668 return 0;
16669}
16670_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016671rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016672if { (ac_try="$ac_link"
16673case "(($ac_try" in
16674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16675 *) ac_try_echo=$ac_try;;
16676esac
16677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16678 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016680 grep -v '^ *+' conftest.er1 >conftest.err
16681 rm -f conftest.er1
16682 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016684 (exit $ac_status); } && {
16685 test -z "$ac_c_werror_flag" ||
16686 test ! -s conftest.err
16687 } && test -s conftest$ac_exeext &&
16688 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016689
16690cat >>confdefs.h <<\_ACEOF
16691#define HAVE_HSTRERROR 1
16692_ACEOF
16693
Martin v. Löwiseba40652007-08-30 20:10:57 +000016694 { echo "$as_me:$LINENO: result: yes" >&5
16695echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016696else
16697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016698sed 's/^/| /' conftest.$ac_ext >&5
16699
Martin v. Löwiseba40652007-08-30 20:10:57 +000016700 { echo "$as_me:$LINENO: result: no" >&5
16701echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016702
16703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016704
16705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016707
Martin v. Löwiseba40652007-08-30 20:10:57 +000016708{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16709echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016711/* confdefs.h. */
16712_ACEOF
16713cat confdefs.h >>conftest.$ac_ext
16714cat >>conftest.$ac_ext <<_ACEOF
16715/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016716
16717#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016718#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016719#include <sys/socket.h>
16720#include <netinet/in.h>
16721#include <arpa/inet.h>
16722
Martin v. Löwise9416172003-05-03 10:12:45 +000016723int
16724main ()
16725{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016726void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016727 ;
16728 return 0;
16729}
16730_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016731rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016732if { (ac_try="$ac_link"
16733case "(($ac_try" in
16734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16735 *) ac_try_echo=$ac_try;;
16736esac
16737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16738 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016740 grep -v '^ *+' conftest.er1 >conftest.err
16741 rm -f conftest.er1
16742 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016744 (exit $ac_status); } && {
16745 test -z "$ac_c_werror_flag" ||
16746 test ! -s conftest.err
16747 } && test -s conftest$ac_exeext &&
16748 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016749
16750cat >>confdefs.h <<\_ACEOF
16751#define HAVE_INET_ATON 1
16752_ACEOF
16753
Martin v. Löwiseba40652007-08-30 20:10:57 +000016754 { echo "$as_me:$LINENO: result: yes" >&5
16755echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016756else
16757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016758sed 's/^/| /' conftest.$ac_ext >&5
16759
Martin v. Löwiseba40652007-08-30 20:10:57 +000016760 { echo "$as_me:$LINENO: result: no" >&5
16761echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016762
16763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016764
16765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016767
Martin v. Löwiseba40652007-08-30 20:10:57 +000016768{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16769echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016770cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016771/* confdefs.h. */
16772_ACEOF
16773cat confdefs.h >>conftest.$ac_ext
16774cat >>conftest.$ac_ext <<_ACEOF
16775/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016776
16777#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016778#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016779#include <sys/socket.h>
16780#include <netinet/in.h>
16781#include <arpa/inet.h>
16782
Martin v. Löwise9416172003-05-03 10:12:45 +000016783int
16784main ()
16785{
16786void* p = inet_pton
16787 ;
16788 return 0;
16789}
16790_ACEOF
16791rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016792if { (ac_try="$ac_compile"
16793case "(($ac_try" in
16794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16795 *) ac_try_echo=$ac_try;;
16796esac
16797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016800 grep -v '^ *+' conftest.er1 >conftest.err
16801 rm -f conftest.er1
16802 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016804 (exit $ac_status); } && {
16805 test -z "$ac_c_werror_flag" ||
16806 test ! -s conftest.err
16807 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016808
16809cat >>confdefs.h <<\_ACEOF
16810#define HAVE_INET_PTON 1
16811_ACEOF
16812
Martin v. Löwiseba40652007-08-30 20:10:57 +000016813 { echo "$as_me:$LINENO: result: yes" >&5
16814echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016815else
16816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016817sed 's/^/| /' conftest.$ac_ext >&5
16818
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819 { echo "$as_me:$LINENO: result: no" >&5
16820echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016821
16822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016823
16824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016825
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016826# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016827{ echo "$as_me:$LINENO: checking for setgroups" >&5
16828echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016830/* confdefs.h. */
16831_ACEOF
16832cat confdefs.h >>conftest.$ac_ext
16833cat >>conftest.$ac_ext <<_ACEOF
16834/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016835
16836#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016837#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016838#ifdef HAVE_GRP_H
16839#include <grp.h>
16840#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016841
Martin v. Löwisd5843682002-11-21 20:41:28 +000016842int
16843main ()
16844{
16845void* p = setgroups
16846 ;
16847 return 0;
16848}
16849_ACEOF
16850rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016851if { (ac_try="$ac_compile"
16852case "(($ac_try" in
16853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16854 *) ac_try_echo=$ac_try;;
16855esac
16856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16857 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016859 grep -v '^ *+' conftest.er1 >conftest.err
16860 rm -f conftest.er1
16861 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016863 (exit $ac_status); } && {
16864 test -z "$ac_c_werror_flag" ||
16865 test ! -s conftest.err
16866 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016867
16868cat >>confdefs.h <<\_ACEOF
16869#define HAVE_SETGROUPS 1
16870_ACEOF
16871
Martin v. Löwiseba40652007-08-30 20:10:57 +000016872 { echo "$as_me:$LINENO: result: yes" >&5
16873echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016874else
16875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016876sed 's/^/| /' conftest.$ac_ext >&5
16877
Martin v. Löwiseba40652007-08-30 20:10:57 +000016878 { echo "$as_me:$LINENO: result: no" >&5
16879echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016880
16881fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016882
16883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016884
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016885# check for openpty and forkpty
16886
Martin v. Löwis11437992002-04-12 09:54:03 +000016887
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016888for ac_func in openpty
16889do
Martin v. Löwis11437992002-04-12 09:54:03 +000016890as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016891{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16892echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16893if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016895else
Martin v. Löwis11437992002-04-12 09:54:03 +000016896 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016897/* confdefs.h. */
16898_ACEOF
16899cat confdefs.h >>conftest.$ac_ext
16900cat >>conftest.$ac_ext <<_ACEOF
16901/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016902/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16903 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16904#define $ac_func innocuous_$ac_func
16905
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016906/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016907 which can conflict with char $ac_func (); below.
16908 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016909 <limits.h> exists even on freestanding compilers. */
16910
16911#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016912# include <limits.h>
16913#else
16914# include <assert.h>
16915#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016916
16917#undef $ac_func
16918
Martin v. Löwiseba40652007-08-30 20:10:57 +000016919/* Override any GCC internal prototype to avoid an error.
16920 Use char because int might match the return type of a GCC
16921 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016922#ifdef __cplusplus
16923extern "C"
16924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016925char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016926/* The GNU C library defines this for functions which it implements
16927 to always fail with ENOSYS. Some functions are actually named
16928 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016929#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016930choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016931#endif
16932
Skip Montanaro6dead952003-09-25 14:50:04 +000016933int
16934main ()
16935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016936return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 ;
16938 return 0;
16939}
16940_ACEOF
16941rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942if { (ac_try="$ac_link"
16943case "(($ac_try" in
16944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16945 *) ac_try_echo=$ac_try;;
16946esac
16947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016950 grep -v '^ *+' conftest.er1 >conftest.err
16951 rm -f conftest.er1
16952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016954 (exit $ac_status); } && {
16955 test -z "$ac_c_werror_flag" ||
16956 test ! -s conftest.err
16957 } && test -s conftest$ac_exeext &&
16958 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016959 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016960else
Martin v. Löwis11437992002-04-12 09:54:03 +000016961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016962sed 's/^/| /' conftest.$ac_ext >&5
16963
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016966
16967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016970ac_res=`eval echo '${'$as_ac_var'}'`
16971 { echo "$as_me:$LINENO: result: $ac_res" >&5
16972echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016973if test `eval echo '${'$as_ac_var'}'` = yes; then
16974 cat >>confdefs.h <<_ACEOF
16975#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16976_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016977
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016978else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016979 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16980echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016981if test "${ac_cv_lib_util_openpty+set}" = set; then
16982 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016983else
Martin v. Löwis11437992002-04-12 09:54:03 +000016984 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016985LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016987/* confdefs.h. */
16988_ACEOF
16989cat confdefs.h >>conftest.$ac_ext
16990cat >>conftest.$ac_ext <<_ACEOF
16991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016992
Martin v. Löwiseba40652007-08-30 20:10:57 +000016993/* Override any GCC internal prototype to avoid an error.
16994 Use char because int might match the return type of a GCC
16995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016996#ifdef __cplusplus
16997extern "C"
16998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016999char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017000int
17001main ()
17002{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017003return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 ;
17005 return 0;
17006}
17007_ACEOF
17008rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009if { (ac_try="$ac_link"
17010case "(($ac_try" in
17011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17012 *) ac_try_echo=$ac_try;;
17013esac
17014eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017017 grep -v '^ *+' conftest.er1 >conftest.err
17018 rm -f conftest.er1
17019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017021 (exit $ac_status); } && {
17022 test -z "$ac_c_werror_flag" ||
17023 test ! -s conftest.err
17024 } && test -s conftest$ac_exeext &&
17025 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017026 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017027else
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017029sed 's/^/| /' conftest.$ac_ext >&5
17030
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017033
17034rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017035 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017036LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017037fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017038{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17039echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017040if test $ac_cv_lib_util_openpty = yes; then
17041 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017042#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017043_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017044 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017045else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017046 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17047echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017048if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17049 echo $ECHO_N "(cached) $ECHO_C" >&6
17050else
17051 ac_check_lib_save_LIBS=$LIBS
17052LIBS="-lbsd $LIBS"
17053cat >conftest.$ac_ext <<_ACEOF
17054/* confdefs.h. */
17055_ACEOF
17056cat confdefs.h >>conftest.$ac_ext
17057cat >>conftest.$ac_ext <<_ACEOF
17058/* end confdefs.h. */
17059
Martin v. Löwiseba40652007-08-30 20:10:57 +000017060/* Override any GCC internal prototype to avoid an error.
17061 Use char because int might match the return type of a GCC
17062 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017063#ifdef __cplusplus
17064extern "C"
17065#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017066char openpty ();
17067int
17068main ()
17069{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017070return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017071 ;
17072 return 0;
17073}
17074_ACEOF
17075rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017076if { (ac_try="$ac_link"
17077case "(($ac_try" in
17078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17079 *) ac_try_echo=$ac_try;;
17080esac
17081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17082 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017083 ac_status=$?
17084 grep -v '^ *+' conftest.er1 >conftest.err
17085 rm -f conftest.er1
17086 cat conftest.err >&5
17087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017088 (exit $ac_status); } && {
17089 test -z "$ac_c_werror_flag" ||
17090 test ! -s conftest.err
17091 } && test -s conftest$ac_exeext &&
17092 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017093 ac_cv_lib_bsd_openpty=yes
17094else
17095 echo "$as_me: failed program was:" >&5
17096sed 's/^/| /' conftest.$ac_ext >&5
17097
Martin v. Löwiseba40652007-08-30 20:10:57 +000017098 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017100
17101rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017102 conftest$ac_exeext conftest.$ac_ext
17103LIBS=$ac_check_lib_save_LIBS
17104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017105{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17106echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017107if test $ac_cv_lib_bsd_openpty = yes; then
17108 cat >>confdefs.h <<\_ACEOF
17109#define HAVE_OPENPTY 1
17110_ACEOF
17111 LIBS="$LIBS -lbsd"
17112fi
17113
17114
17115fi
17116
Fred Drake8cef4cf2000-06-28 16:40:38 +000017117
17118fi
17119done
17120
Martin v. Löwis11437992002-04-12 09:54:03 +000017121
Fred Drake8cef4cf2000-06-28 16:40:38 +000017122for ac_func in forkpty
17123do
Martin v. Löwis11437992002-04-12 09:54:03 +000017124as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017125{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17126echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17127if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017129else
Martin v. Löwis11437992002-04-12 09:54:03 +000017130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017131/* confdefs.h. */
17132_ACEOF
17133cat confdefs.h >>conftest.$ac_ext
17134cat >>conftest.$ac_ext <<_ACEOF
17135/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017136/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17137 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17138#define $ac_func innocuous_$ac_func
17139
Fred Drake8cef4cf2000-06-28 16:40:38 +000017140/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017141 which can conflict with char $ac_func (); below.
17142 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017143 <limits.h> exists even on freestanding compilers. */
17144
17145#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017146# include <limits.h>
17147#else
17148# include <assert.h>
17149#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017150
17151#undef $ac_func
17152
Martin v. Löwiseba40652007-08-30 20:10:57 +000017153/* Override any GCC internal prototype to avoid an error.
17154 Use char because int might match the return type of a GCC
17155 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017156#ifdef __cplusplus
17157extern "C"
17158#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017159char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017160/* The GNU C library defines this for functions which it implements
17161 to always fail with ENOSYS. Some functions are actually named
17162 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017163#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017164choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017165#endif
17166
Skip Montanaro6dead952003-09-25 14:50:04 +000017167int
17168main ()
17169{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017170return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017171 ;
17172 return 0;
17173}
17174_ACEOF
17175rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017176if { (ac_try="$ac_link"
17177case "(($ac_try" in
17178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17179 *) ac_try_echo=$ac_try;;
17180esac
17181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17182 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017184 grep -v '^ *+' conftest.er1 >conftest.err
17185 rm -f conftest.er1
17186 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017188 (exit $ac_status); } && {
17189 test -z "$ac_c_werror_flag" ||
17190 test ! -s conftest.err
17191 } && test -s conftest$ac_exeext &&
17192 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017193 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017194else
Martin v. Löwis11437992002-04-12 09:54:03 +000017195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017196sed 's/^/| /' conftest.$ac_ext >&5
17197
Martin v. Löwiseba40652007-08-30 20:10:57 +000017198 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017200
17201rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017202 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017204ac_res=`eval echo '${'$as_ac_var'}'`
17205 { echo "$as_me:$LINENO: result: $ac_res" >&5
17206echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017207if test `eval echo '${'$as_ac_var'}'` = yes; then
17208 cat >>confdefs.h <<_ACEOF
17209#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17210_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017211
Fred Drake8cef4cf2000-06-28 16:40:38 +000017212else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017213 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17214echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017215if test "${ac_cv_lib_util_forkpty+set}" = set; then
17216 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017217else
Martin v. Löwis11437992002-04-12 09:54:03 +000017218 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017219LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017221/* confdefs.h. */
17222_ACEOF
17223cat confdefs.h >>conftest.$ac_ext
17224cat >>conftest.$ac_ext <<_ACEOF
17225/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017226
Martin v. Löwiseba40652007-08-30 20:10:57 +000017227/* Override any GCC internal prototype to avoid an error.
17228 Use char because int might match the return type of a GCC
17229 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017230#ifdef __cplusplus
17231extern "C"
17232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017233char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017234int
17235main ()
17236{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017237return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017238 ;
17239 return 0;
17240}
17241_ACEOF
17242rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017243if { (ac_try="$ac_link"
17244case "(($ac_try" in
17245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17246 *) ac_try_echo=$ac_try;;
17247esac
17248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17249 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017251 grep -v '^ *+' conftest.er1 >conftest.err
17252 rm -f conftest.er1
17253 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017255 (exit $ac_status); } && {
17256 test -z "$ac_c_werror_flag" ||
17257 test ! -s conftest.err
17258 } && test -s conftest$ac_exeext &&
17259 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017260 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017261else
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017263sed 's/^/| /' conftest.$ac_ext >&5
17264
Martin v. Löwiseba40652007-08-30 20:10:57 +000017265 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017267
17268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017270LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017272{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17273echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017274if test $ac_cv_lib_util_forkpty = yes; then
17275 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017276#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017277_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017278 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017279else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017280 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17281echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017282if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17283 echo $ECHO_N "(cached) $ECHO_C" >&6
17284else
17285 ac_check_lib_save_LIBS=$LIBS
17286LIBS="-lbsd $LIBS"
17287cat >conftest.$ac_ext <<_ACEOF
17288/* confdefs.h. */
17289_ACEOF
17290cat confdefs.h >>conftest.$ac_ext
17291cat >>conftest.$ac_ext <<_ACEOF
17292/* end confdefs.h. */
17293
Martin v. Löwiseba40652007-08-30 20:10:57 +000017294/* Override any GCC internal prototype to avoid an error.
17295 Use char because int might match the return type of a GCC
17296 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017297#ifdef __cplusplus
17298extern "C"
17299#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017300char forkpty ();
17301int
17302main ()
17303{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017304return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017305 ;
17306 return 0;
17307}
17308_ACEOF
17309rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017310if { (ac_try="$ac_link"
17311case "(($ac_try" in
17312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17313 *) ac_try_echo=$ac_try;;
17314esac
17315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17316 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017317 ac_status=$?
17318 grep -v '^ *+' conftest.er1 >conftest.err
17319 rm -f conftest.er1
17320 cat conftest.err >&5
17321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017322 (exit $ac_status); } && {
17323 test -z "$ac_c_werror_flag" ||
17324 test ! -s conftest.err
17325 } && test -s conftest$ac_exeext &&
17326 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017327 ac_cv_lib_bsd_forkpty=yes
17328else
17329 echo "$as_me: failed program was:" >&5
17330sed 's/^/| /' conftest.$ac_ext >&5
17331
Martin v. Löwiseba40652007-08-30 20:10:57 +000017332 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017334
17335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017336 conftest$ac_exeext conftest.$ac_ext
17337LIBS=$ac_check_lib_save_LIBS
17338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017339{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17340echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017341if test $ac_cv_lib_bsd_forkpty = yes; then
17342 cat >>confdefs.h <<\_ACEOF
17343#define HAVE_FORKPTY 1
17344_ACEOF
17345 LIBS="$LIBS -lbsd"
17346fi
17347
17348
17349fi
17350
Fred Drake8cef4cf2000-06-28 16:40:38 +000017351
17352fi
17353done
17354
Jack Jansendd19cf82001-12-06 22:36:17 +000017355
Brett Cannonaa5778d2008-03-18 04:09:00 +000017356# Stuff for expat.
17357
17358for ac_func in memmove
17359do
17360as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17361{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17362echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17363if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17364 echo $ECHO_N "(cached) $ECHO_C" >&6
17365else
17366 cat >conftest.$ac_ext <<_ACEOF
17367/* confdefs.h. */
17368_ACEOF
17369cat confdefs.h >>conftest.$ac_ext
17370cat >>conftest.$ac_ext <<_ACEOF
17371/* end confdefs.h. */
17372/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17373 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17374#define $ac_func innocuous_$ac_func
17375
17376/* System header to define __stub macros and hopefully few prototypes,
17377 which can conflict with char $ac_func (); below.
17378 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17379 <limits.h> exists even on freestanding compilers. */
17380
17381#ifdef __STDC__
17382# include <limits.h>
17383#else
17384# include <assert.h>
17385#endif
17386
17387#undef $ac_func
17388
17389/* Override any GCC internal prototype to avoid an error.
17390 Use char because int might match the return type of a GCC
17391 builtin and then its argument prototype would still apply. */
17392#ifdef __cplusplus
17393extern "C"
17394#endif
17395char $ac_func ();
17396/* The GNU C library defines this for functions which it implements
17397 to always fail with ENOSYS. Some functions are actually named
17398 something starting with __ and the normal name is an alias. */
17399#if defined __stub_$ac_func || defined __stub___$ac_func
17400choke me
17401#endif
17402
17403int
17404main ()
17405{
17406return $ac_func ();
17407 ;
17408 return 0;
17409}
17410_ACEOF
17411rm -f conftest.$ac_objext conftest$ac_exeext
17412if { (ac_try="$ac_link"
17413case "(($ac_try" in
17414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17415 *) ac_try_echo=$ac_try;;
17416esac
17417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17418 (eval "$ac_link") 2>conftest.er1
17419 ac_status=$?
17420 grep -v '^ *+' conftest.er1 >conftest.err
17421 rm -f conftest.er1
17422 cat conftest.err >&5
17423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17424 (exit $ac_status); } && {
17425 test -z "$ac_c_werror_flag" ||
17426 test ! -s conftest.err
17427 } && test -s conftest$ac_exeext &&
17428 $as_test_x conftest$ac_exeext; then
17429 eval "$as_ac_var=yes"
17430else
17431 echo "$as_me: failed program was:" >&5
17432sed 's/^/| /' conftest.$ac_ext >&5
17433
17434 eval "$as_ac_var=no"
17435fi
17436
17437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17438 conftest$ac_exeext conftest.$ac_ext
17439fi
17440ac_res=`eval echo '${'$as_ac_var'}'`
17441 { echo "$as_me:$LINENO: result: $ac_res" >&5
17442echo "${ECHO_T}$ac_res" >&6; }
17443if test `eval echo '${'$as_ac_var'}'` = yes; then
17444 cat >>confdefs.h <<_ACEOF
17445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17446_ACEOF
17447
17448fi
17449done
17450
17451
Michael W. Hudson54241132001-12-07 15:38:26 +000017452# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017453
17454
17455
17456
17457
17458
Fred Drake8cef4cf2000-06-28 16:40:38 +000017459for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17460do
Martin v. Löwis11437992002-04-12 09:54:03 +000017461as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017462{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17463echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17464if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017465 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017466else
Martin v. Löwis11437992002-04-12 09:54:03 +000017467 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017468/* confdefs.h. */
17469_ACEOF
17470cat confdefs.h >>conftest.$ac_ext
17471cat >>conftest.$ac_ext <<_ACEOF
17472/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017473/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17474 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17475#define $ac_func innocuous_$ac_func
17476
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017477/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017478 which can conflict with char $ac_func (); below.
17479 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017480 <limits.h> exists even on freestanding compilers. */
17481
17482#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017483# include <limits.h>
17484#else
17485# include <assert.h>
17486#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017487
17488#undef $ac_func
17489
Martin v. Löwiseba40652007-08-30 20:10:57 +000017490/* Override any GCC internal prototype to avoid an error.
17491 Use char because int might match the return type of a GCC
17492 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017493#ifdef __cplusplus
17494extern "C"
17495#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017496char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017497/* The GNU C library defines this for functions which it implements
17498 to always fail with ENOSYS. Some functions are actually named
17499 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017500#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017501choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017502#endif
17503
Skip Montanaro6dead952003-09-25 14:50:04 +000017504int
17505main ()
17506{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017507return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 ;
17509 return 0;
17510}
17511_ACEOF
17512rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017513if { (ac_try="$ac_link"
17514case "(($ac_try" in
17515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17516 *) ac_try_echo=$ac_try;;
17517esac
17518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17519 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017521 grep -v '^ *+' conftest.er1 >conftest.err
17522 rm -f conftest.er1
17523 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017525 (exit $ac_status); } && {
17526 test -z "$ac_c_werror_flag" ||
17527 test ! -s conftest.err
17528 } && test -s conftest$ac_exeext &&
17529 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017530 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017531else
Martin v. Löwis11437992002-04-12 09:54:03 +000017532 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017533sed 's/^/| /' conftest.$ac_ext >&5
17534
Martin v. Löwiseba40652007-08-30 20:10:57 +000017535 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017537
17538rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017539 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017541ac_res=`eval echo '${'$as_ac_var'}'`
17542 { echo "$as_me:$LINENO: result: $ac_res" >&5
17543echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017544if test `eval echo '${'$as_ac_var'}'` = yes; then
17545 cat >>confdefs.h <<_ACEOF
17546#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17547_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017548
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017549fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017550done
17551
Michael W. Hudson54241132001-12-07 15:38:26 +000017552
Martin v. Löwis11437992002-04-12 09:54:03 +000017553
17554
17555
Brett Cannonaa5778d2008-03-18 04:09:00 +000017556for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017557do
Martin v. Löwis11437992002-04-12 09:54:03 +000017558as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017559{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17560echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17561if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017562 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017563else
Martin v. Löwis11437992002-04-12 09:54:03 +000017564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017565/* confdefs.h. */
17566_ACEOF
17567cat confdefs.h >>conftest.$ac_ext
17568cat >>conftest.$ac_ext <<_ACEOF
17569/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017570/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17571 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17572#define $ac_func innocuous_$ac_func
17573
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017574/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017575 which can conflict with char $ac_func (); below.
17576 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017577 <limits.h> exists even on freestanding compilers. */
17578
17579#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017580# include <limits.h>
17581#else
17582# include <assert.h>
17583#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017584
17585#undef $ac_func
17586
Martin v. Löwiseba40652007-08-30 20:10:57 +000017587/* Override any GCC internal prototype to avoid an error.
17588 Use char because int might match the return type of a GCC
17589 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017590#ifdef __cplusplus
17591extern "C"
17592#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017593char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017594/* The GNU C library defines this for functions which it implements
17595 to always fail with ENOSYS. Some functions are actually named
17596 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017597#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017598choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017599#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017600
Skip Montanaro6dead952003-09-25 14:50:04 +000017601int
17602main ()
17603{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017604return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017605 ;
17606 return 0;
17607}
17608_ACEOF
17609rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017610if { (ac_try="$ac_link"
17611case "(($ac_try" in
17612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17613 *) ac_try_echo=$ac_try;;
17614esac
17615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17616 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017618 grep -v '^ *+' conftest.er1 >conftest.err
17619 rm -f conftest.er1
17620 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017622 (exit $ac_status); } && {
17623 test -z "$ac_c_werror_flag" ||
17624 test ! -s conftest.err
17625 } && test -s conftest$ac_exeext &&
17626 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017627 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017628else
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017630sed 's/^/| /' conftest.$ac_ext >&5
17631
Martin v. Löwiseba40652007-08-30 20:10:57 +000017632 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017634
17635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017637fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017638ac_res=`eval echo '${'$as_ac_var'}'`
17639 { echo "$as_me:$LINENO: result: $ac_res" >&5
17640echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017641if test `eval echo '${'$as_ac_var'}'` = yes; then
17642 cat >>confdefs.h <<_ACEOF
17643#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17644_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017645
Martin v. Löwis1142de32002-03-29 16:28:31 +000017646else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017647 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017648 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017649 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17650 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017651esac
17652
Martin v. Löwis1142de32002-03-29 16:28:31 +000017653fi
17654done
17655
17656
Martin v. Löwis11437992002-04-12 09:54:03 +000017657
Martin v. Löwis1142de32002-03-29 16:28:31 +000017658for ac_func in getpgrp
17659do
Martin v. Löwis11437992002-04-12 09:54:03 +000017660as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017661{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17662echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17663if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017665else
Martin v. Löwis11437992002-04-12 09:54:03 +000017666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017667/* confdefs.h. */
17668_ACEOF
17669cat confdefs.h >>conftest.$ac_ext
17670cat >>conftest.$ac_ext <<_ACEOF
17671/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017672/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17673 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17674#define $ac_func innocuous_$ac_func
17675
Martin v. Löwis1142de32002-03-29 16:28:31 +000017676/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017677 which can conflict with char $ac_func (); below.
17678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017679 <limits.h> exists even on freestanding compilers. */
17680
17681#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017682# include <limits.h>
17683#else
17684# include <assert.h>
17685#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017686
17687#undef $ac_func
17688
Martin v. Löwiseba40652007-08-30 20:10:57 +000017689/* Override any GCC internal prototype to avoid an error.
17690 Use char because int might match the return type of a GCC
17691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017692#ifdef __cplusplus
17693extern "C"
17694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017695char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017696/* The GNU C library defines this for functions which it implements
17697 to always fail with ENOSYS. Some functions are actually named
17698 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017699#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017700choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017701#endif
17702
Skip Montanaro6dead952003-09-25 14:50:04 +000017703int
17704main ()
17705{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017706return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017707 ;
17708 return 0;
17709}
17710_ACEOF
17711rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017712if { (ac_try="$ac_link"
17713case "(($ac_try" in
17714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17715 *) ac_try_echo=$ac_try;;
17716esac
17717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17718 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017720 grep -v '^ *+' conftest.er1 >conftest.err
17721 rm -f conftest.er1
17722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017724 (exit $ac_status); } && {
17725 test -z "$ac_c_werror_flag" ||
17726 test ! -s conftest.err
17727 } && test -s conftest$ac_exeext &&
17728 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017729 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017730else
Martin v. Löwis11437992002-04-12 09:54:03 +000017731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017732sed 's/^/| /' conftest.$ac_ext >&5
17733
Martin v. Löwiseba40652007-08-30 20:10:57 +000017734 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017736
17737rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017738 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017740ac_res=`eval echo '${'$as_ac_var'}'`
17741 { echo "$as_me:$LINENO: result: $ac_res" >&5
17742echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017743if test `eval echo '${'$as_ac_var'}'` = yes; then
17744 cat >>confdefs.h <<_ACEOF
17745#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17746_ACEOF
17747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017748/* confdefs.h. */
17749_ACEOF
17750cat confdefs.h >>conftest.$ac_ext
17751cat >>conftest.$ac_ext <<_ACEOF
17752/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017753#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017754int
17755main ()
17756{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017757getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 ;
17759 return 0;
17760}
17761_ACEOF
17762rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017763if { (ac_try="$ac_compile"
17764case "(($ac_try" in
17765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17766 *) ac_try_echo=$ac_try;;
17767esac
17768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017771 grep -v '^ *+' conftest.er1 >conftest.err
17772 rm -f conftest.er1
17773 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017775 (exit $ac_status); } && {
17776 test -z "$ac_c_werror_flag" ||
17777 test ! -s conftest.err
17778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017779
17780cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017781#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017782_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017783
Martin v. Löwis11437992002-04-12 09:54:03 +000017784
Guido van Rossumf78abae1997-01-21 22:02:36 +000017785else
Martin v. Löwis11437992002-04-12 09:54:03 +000017786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017787sed 's/^/| /' conftest.$ac_ext >&5
17788
Martin v. Löwiseba40652007-08-30 20:10:57 +000017789
Guido van Rossum627b2d71993-12-24 10:39:16 +000017790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017791
17792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017793
Guido van Rossum627b2d71993-12-24 10:39:16 +000017794fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017795done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017796
Jack Jansen150753c2003-03-29 22:07:47 +000017797
17798for ac_func in setpgrp
17799do
17800as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017801{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17802echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17803if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017805else
Martin v. Löwis11437992002-04-12 09:54:03 +000017806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017807/* confdefs.h. */
17808_ACEOF
17809cat confdefs.h >>conftest.$ac_ext
17810cat >>conftest.$ac_ext <<_ACEOF
17811/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017812/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17813 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17814#define $ac_func innocuous_$ac_func
17815
Jack Jansen150753c2003-03-29 22:07:47 +000017816/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017817 which can conflict with char $ac_func (); below.
17818 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017819 <limits.h> exists even on freestanding compilers. */
17820
17821#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017822# include <limits.h>
17823#else
17824# include <assert.h>
17825#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017826
17827#undef $ac_func
17828
Martin v. Löwiseba40652007-08-30 20:10:57 +000017829/* Override any GCC internal prototype to avoid an error.
17830 Use char because int might match the return type of a GCC
17831 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017832#ifdef __cplusplus
17833extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017834#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017835char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017836/* The GNU C library defines this for functions which it implements
17837 to always fail with ENOSYS. Some functions are actually named
17838 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017839#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017840choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017841#endif
17842
Skip Montanaro6dead952003-09-25 14:50:04 +000017843int
17844main ()
17845{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017846return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 ;
17848 return 0;
17849}
17850_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017851rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017852if { (ac_try="$ac_link"
17853case "(($ac_try" in
17854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17855 *) ac_try_echo=$ac_try;;
17856esac
17857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17858 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017860 grep -v '^ *+' conftest.er1 >conftest.err
17861 rm -f conftest.er1
17862 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017864 (exit $ac_status); } && {
17865 test -z "$ac_c_werror_flag" ||
17866 test ! -s conftest.err
17867 } && test -s conftest$ac_exeext &&
17868 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017869 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017870else
Jack Jansen150753c2003-03-29 22:07:47 +000017871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017872sed 's/^/| /' conftest.$ac_ext >&5
17873
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017876
17877rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017878 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017880ac_res=`eval echo '${'$as_ac_var'}'`
17881 { echo "$as_me:$LINENO: result: $ac_res" >&5
17882echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017883if test `eval echo '${'$as_ac_var'}'` = yes; then
17884 cat >>confdefs.h <<_ACEOF
17885#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17886_ACEOF
17887 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017888/* confdefs.h. */
17889_ACEOF
17890cat confdefs.h >>conftest.$ac_ext
17891cat >>conftest.$ac_ext <<_ACEOF
17892/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017893#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017894int
17895main ()
17896{
17897setpgrp(0,0);
17898 ;
17899 return 0;
17900}
17901_ACEOF
17902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017903if { (ac_try="$ac_compile"
17904case "(($ac_try" in
17905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17906 *) ac_try_echo=$ac_try;;
17907esac
17908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17909 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017911 grep -v '^ *+' conftest.er1 >conftest.err
17912 rm -f conftest.er1
17913 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017915 (exit $ac_status); } && {
17916 test -z "$ac_c_werror_flag" ||
17917 test ! -s conftest.err
17918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017919
17920cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017921#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017922_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017923
Jack Jansen150753c2003-03-29 22:07:47 +000017924
17925else
17926 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017927sed 's/^/| /' conftest.$ac_ext >&5
17928
Martin v. Löwiseba40652007-08-30 20:10:57 +000017929
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017930fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017931
17932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017933
17934fi
17935done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017936
Martin v. Löwis11437992002-04-12 09:54:03 +000017937
Thomas Wouters3a584202000-08-05 23:28:51 +000017938for ac_func in gettimeofday
17939do
Martin v. Löwis11437992002-04-12 09:54:03 +000017940as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017941{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17942echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17943if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017944 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017945else
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017947/* confdefs.h. */
17948_ACEOF
17949cat confdefs.h >>conftest.$ac_ext
17950cat >>conftest.$ac_ext <<_ACEOF
17951/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017952/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17953 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17954#define $ac_func innocuous_$ac_func
17955
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017956/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017957 which can conflict with char $ac_func (); below.
17958 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017959 <limits.h> exists even on freestanding compilers. */
17960
17961#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017962# include <limits.h>
17963#else
17964# include <assert.h>
17965#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017966
17967#undef $ac_func
17968
Martin v. Löwiseba40652007-08-30 20:10:57 +000017969/* Override any GCC internal prototype to avoid an error.
17970 Use char because int might match the return type of a GCC
17971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017972#ifdef __cplusplus
17973extern "C"
17974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017975char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017976/* The GNU C library defines this for functions which it implements
17977 to always fail with ENOSYS. Some functions are actually named
17978 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017979#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017980choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017981#endif
17982
Skip Montanaro6dead952003-09-25 14:50:04 +000017983int
17984main ()
17985{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017986return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017987 ;
17988 return 0;
17989}
17990_ACEOF
17991rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017992if { (ac_try="$ac_link"
17993case "(($ac_try" in
17994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17995 *) ac_try_echo=$ac_try;;
17996esac
17997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17998 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018000 grep -v '^ *+' conftest.er1 >conftest.err
18001 rm -f conftest.er1
18002 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018004 (exit $ac_status); } && {
18005 test -z "$ac_c_werror_flag" ||
18006 test ! -s conftest.err
18007 } && test -s conftest$ac_exeext &&
18008 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018009 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018010else
Martin v. Löwis11437992002-04-12 09:54:03 +000018011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018012sed 's/^/| /' conftest.$ac_ext >&5
18013
Martin v. Löwiseba40652007-08-30 20:10:57 +000018014 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018016
18017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018018 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020ac_res=`eval echo '${'$as_ac_var'}'`
18021 { echo "$as_me:$LINENO: result: $ac_res" >&5
18022echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018023if test `eval echo '${'$as_ac_var'}'` = yes; then
18024 cat >>confdefs.h <<_ACEOF
18025#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18026_ACEOF
18027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018028/* confdefs.h. */
18029_ACEOF
18030cat confdefs.h >>conftest.$ac_ext
18031cat >>conftest.$ac_ext <<_ACEOF
18032/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018033#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018034int
18035main ()
18036{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018037gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018038 ;
18039 return 0;
18040}
18041_ACEOF
18042rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018043if { (ac_try="$ac_compile"
18044case "(($ac_try" in
18045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18046 *) ac_try_echo=$ac_try;;
18047esac
18048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018051 grep -v '^ *+' conftest.er1 >conftest.err
18052 rm -f conftest.er1
18053 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018055 (exit $ac_status); } && {
18056 test -z "$ac_c_werror_flag" ||
18057 test ! -s conftest.err
18058 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018059 :
18060else
Martin v. Löwis11437992002-04-12 09:54:03 +000018061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018062sed 's/^/| /' conftest.$ac_ext >&5
18063
Martin v. Löwis11437992002-04-12 09:54:03 +000018064
18065cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018066#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018067_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018068
Martin v. Löwis11437992002-04-12 09:54:03 +000018069
Guido van Rossum627b2d71993-12-24 10:39:16 +000018070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018071
18072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018074fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018075done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018076
Michael W. Hudson54241132001-12-07 15:38:26 +000018077
Martin v. Löwiseba40652007-08-30 20:10:57 +000018078{ echo "$as_me:$LINENO: checking for major" >&5
18079echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018081/* confdefs.h. */
18082_ACEOF
18083cat confdefs.h >>conftest.$ac_ext
18084cat >>conftest.$ac_ext <<_ACEOF
18085/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018086
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018087#if defined(MAJOR_IN_MKDEV)
18088#include <sys/mkdev.h>
18089#elif defined(MAJOR_IN_SYSMACROS)
18090#include <sys/sysmacros.h>
18091#else
18092#include <sys/types.h>
18093#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018094
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018095int
18096main ()
18097{
18098
18099 makedev(major(0),minor(0));
18100
18101 ;
18102 return 0;
18103}
18104_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018105rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018106if { (ac_try="$ac_link"
18107case "(($ac_try" in
18108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18109 *) ac_try_echo=$ac_try;;
18110esac
18111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18112 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018114 grep -v '^ *+' conftest.er1 >conftest.err
18115 rm -f conftest.er1
18116 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018118 (exit $ac_status); } && {
18119 test -z "$ac_c_werror_flag" ||
18120 test ! -s conftest.err
18121 } && test -s conftest$ac_exeext &&
18122 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018123
18124
18125cat >>confdefs.h <<\_ACEOF
18126#define HAVE_DEVICE_MACROS 1
18127_ACEOF
18128
Martin v. Löwiseba40652007-08-30 20:10:57 +000018129 { echo "$as_me:$LINENO: result: yes" >&5
18130echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018131
18132else
18133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018134sed 's/^/| /' conftest.$ac_ext >&5
18135
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018136
Martin v. Löwiseba40652007-08-30 20:10:57 +000018137 { echo "$as_me:$LINENO: result: no" >&5
18138echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018139
18140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018141
18142rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018143 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018144
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018145# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018146# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018147{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18148echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018150/* confdefs.h. */
18151_ACEOF
18152cat confdefs.h >>conftest.$ac_ext
18153cat >>conftest.$ac_ext <<_ACEOF
18154/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018155
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018156#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018157#include <sys/socket.h>
18158#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018159#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018160
Martin v. Löwis11437992002-04-12 09:54:03 +000018161int
18162main ()
18163{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018164
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018165getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018166
Martin v. Löwis11437992002-04-12 09:54:03 +000018167 ;
18168 return 0;
18169}
18170_ACEOF
18171rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018172if { (ac_try="$ac_link"
18173case "(($ac_try" in
18174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18175 *) ac_try_echo=$ac_try;;
18176esac
18177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18178 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018180 grep -v '^ *+' conftest.er1 >conftest.err
18181 rm -f conftest.er1
18182 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018184 (exit $ac_status); } && {
18185 test -z "$ac_c_werror_flag" ||
18186 test ! -s conftest.err
18187 } && test -s conftest$ac_exeext &&
18188 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018189
Martin v. Löwiseba40652007-08-30 20:10:57 +000018190{ echo "$as_me:$LINENO: result: yes" >&5
18191echo "${ECHO_T}yes" >&6; }
18192{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18193echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018194if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018195 { echo "$as_me:$LINENO: result: buggy" >&5
18196echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018197buggygetaddrinfo=yes
18198else
Martin v. Löwis11437992002-04-12 09:54:03 +000018199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018200/* confdefs.h. */
18201_ACEOF
18202cat confdefs.h >>conftest.$ac_ext
18203cat >>conftest.$ac_ext <<_ACEOF
18204/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018205
18206#include <sys/types.h>
18207#include <netdb.h>
18208#include <string.h>
18209#include <sys/socket.h>
18210#include <netinet/in.h>
18211
18212main()
18213{
18214 int passive, gaierr, inet4 = 0, inet6 = 0;
18215 struct addrinfo hints, *ai, *aitop;
18216 char straddr[INET6_ADDRSTRLEN], strport[16];
18217
18218 for (passive = 0; passive <= 1; passive++) {
18219 memset(&hints, 0, sizeof(hints));
18220 hints.ai_family = AF_UNSPEC;
18221 hints.ai_flags = passive ? AI_PASSIVE : 0;
18222 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018223 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018224 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18225 (void)gai_strerror(gaierr);
18226 goto bad;
18227 }
18228 for (ai = aitop; ai; ai = ai->ai_next) {
18229 if (ai->ai_addr == NULL ||
18230 ai->ai_addrlen == 0 ||
18231 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18232 straddr, sizeof(straddr), strport, sizeof(strport),
18233 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18234 goto bad;
18235 }
18236 switch (ai->ai_family) {
18237 case AF_INET:
18238 if (strcmp(strport, "54321") != 0) {
18239 goto bad;
18240 }
18241 if (passive) {
18242 if (strcmp(straddr, "0.0.0.0") != 0) {
18243 goto bad;
18244 }
18245 } else {
18246 if (strcmp(straddr, "127.0.0.1") != 0) {
18247 goto bad;
18248 }
18249 }
18250 inet4++;
18251 break;
18252 case AF_INET6:
18253 if (strcmp(strport, "54321") != 0) {
18254 goto bad;
18255 }
18256 if (passive) {
18257 if (strcmp(straddr, "::") != 0) {
18258 goto bad;
18259 }
18260 } else {
18261 if (strcmp(straddr, "::1") != 0) {
18262 goto bad;
18263 }
18264 }
18265 inet6++;
18266 break;
18267 case AF_UNSPEC:
18268 goto bad;
18269 break;
18270 default:
18271 /* another family support? */
18272 break;
18273 }
18274 }
18275 }
18276
18277 if (!(inet4 == 0 || inet4 == 2))
18278 goto bad;
18279 if (!(inet6 == 0 || inet6 == 2))
18280 goto bad;
18281
18282 if (aitop)
18283 freeaddrinfo(aitop);
18284 exit(0);
18285
18286 bad:
18287 if (aitop)
18288 freeaddrinfo(aitop);
18289 exit(1);
18290}
18291
Martin v. Löwis11437992002-04-12 09:54:03 +000018292_ACEOF
18293rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018294if { (ac_try="$ac_link"
18295case "(($ac_try" in
18296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18297 *) ac_try_echo=$ac_try;;
18298esac
18299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18300 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018301 ac_status=$?
18302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18303 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018304 { (case "(($ac_try" in
18305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18306 *) ac_try_echo=$ac_try;;
18307esac
18308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18309 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018310 ac_status=$?
18311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18312 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018313 { echo "$as_me:$LINENO: result: good" >&5
18314echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018315buggygetaddrinfo=no
18316else
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 echo "$as_me: program exited with status $ac_status" >&5
18318echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018319sed 's/^/| /' conftest.$ac_ext >&5
18320
Martin v. Löwis11437992002-04-12 09:54:03 +000018321( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018322{ echo "$as_me:$LINENO: result: buggy" >&5
18323echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018324buggygetaddrinfo=yes
18325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018326rm -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 +000018327fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018328
18329
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018330else
Martin v. Löwis11437992002-04-12 09:54:03 +000018331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018332sed 's/^/| /' conftest.$ac_ext >&5
18333
Martin v. Löwis11437992002-04-12 09:54:03 +000018334
Martin v. Löwiseba40652007-08-30 20:10:57 +000018335{ echo "$as_me:$LINENO: result: no" >&5
18336echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018337buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018338
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018340
18341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018342 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018343
18344if test "$buggygetaddrinfo" = "yes"; then
18345 if test "$ipv6" = "yes"; then
18346 echo 'Fatal: You must get working getaddrinfo() function.'
18347 echo ' or you can specify "--disable-ipv6"'.
18348 exit 1
18349 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018350else
Martin v. Löwis11437992002-04-12 09:54:03 +000018351
18352cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018353#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018354_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018355
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018357
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018358for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018359do
Martin v. Löwis11437992002-04-12 09:54:03 +000018360as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018361{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18362echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18363if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018364 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018365else
Martin v. Löwis11437992002-04-12 09:54:03 +000018366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018367/* confdefs.h. */
18368_ACEOF
18369cat confdefs.h >>conftest.$ac_ext
18370cat >>conftest.$ac_ext <<_ACEOF
18371/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018372/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18373 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18374#define $ac_func innocuous_$ac_func
18375
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018376/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018377 which can conflict with char $ac_func (); below.
18378 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018379 <limits.h> exists even on freestanding compilers. */
18380
18381#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018382# include <limits.h>
18383#else
18384# include <assert.h>
18385#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018386
18387#undef $ac_func
18388
Martin v. Löwiseba40652007-08-30 20:10:57 +000018389/* Override any GCC internal prototype to avoid an error.
18390 Use char because int might match the return type of a GCC
18391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018392#ifdef __cplusplus
18393extern "C"
18394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018395char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018396/* The GNU C library defines this for functions which it implements
18397 to always fail with ENOSYS. Some functions are actually named
18398 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018399#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018400choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018401#endif
18402
Skip Montanaro6dead952003-09-25 14:50:04 +000018403int
18404main ()
18405{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018406return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018407 ;
18408 return 0;
18409}
18410_ACEOF
18411rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018412if { (ac_try="$ac_link"
18413case "(($ac_try" in
18414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18415 *) ac_try_echo=$ac_try;;
18416esac
18417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18418 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018420 grep -v '^ *+' conftest.er1 >conftest.err
18421 rm -f conftest.er1
18422 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018424 (exit $ac_status); } && {
18425 test -z "$ac_c_werror_flag" ||
18426 test ! -s conftest.err
18427 } && test -s conftest$ac_exeext &&
18428 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018430else
Martin v. Löwis11437992002-04-12 09:54:03 +000018431 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018432sed 's/^/| /' conftest.$ac_ext >&5
18433
Martin v. Löwiseba40652007-08-30 20:10:57 +000018434 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018435fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018436
18437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018438 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018440ac_res=`eval echo '${'$as_ac_var'}'`
18441 { echo "$as_me:$LINENO: result: $ac_res" >&5
18442echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018443if test `eval echo '${'$as_ac_var'}'` = yes; then
18444 cat >>confdefs.h <<_ACEOF
18445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18446_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018447
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018448fi
18449done
18450
Michael W. Hudson54241132001-12-07 15:38:26 +000018451
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018452# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018453{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18454echo $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 +000018455if test "${ac_cv_header_time+set}" = set; then
18456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018457else
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018459/* confdefs.h. */
18460_ACEOF
18461cat confdefs.h >>conftest.$ac_ext
18462cat >>conftest.$ac_ext <<_ACEOF
18463/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018464#include <sys/types.h>
18465#include <sys/time.h>
18466#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018467
Martin v. Löwis11437992002-04-12 09:54:03 +000018468int
18469main ()
18470{
18471if ((struct tm *) 0)
18472return 0;
18473 ;
18474 return 0;
18475}
18476_ACEOF
18477rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018478if { (ac_try="$ac_compile"
18479case "(($ac_try" in
18480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18481 *) ac_try_echo=$ac_try;;
18482esac
18483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018486 grep -v '^ *+' conftest.er1 >conftest.err
18487 rm -f conftest.er1
18488 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018490 (exit $ac_status); } && {
18491 test -z "$ac_c_werror_flag" ||
18492 test ! -s conftest.err
18493 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018494 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018495else
Martin v. Löwis11437992002-04-12 09:54:03 +000018496 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018497sed 's/^/| /' conftest.$ac_ext >&5
18498
Martin v. Löwiseba40652007-08-30 20:10:57 +000018499 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018500fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018501
18502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018504{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18505echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018506if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018507
18508cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018509#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018510_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018511
18512fi
18513
Martin v. Löwiseba40652007-08-30 20:10:57 +000018514{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18515echo $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 +000018516if test "${ac_cv_struct_tm+set}" = set; then
18517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018518else
Martin v. Löwis11437992002-04-12 09:54:03 +000018519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018520/* confdefs.h. */
18521_ACEOF
18522cat confdefs.h >>conftest.$ac_ext
18523cat >>conftest.$ac_ext <<_ACEOF
18524/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018525#include <sys/types.h>
18526#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018527
Martin v. Löwis11437992002-04-12 09:54:03 +000018528int
18529main ()
18530{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018531struct tm tm;
18532 int *p = &tm.tm_sec;
18533 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018534 ;
18535 return 0;
18536}
18537_ACEOF
18538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018539if { (ac_try="$ac_compile"
18540case "(($ac_try" in
18541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18542 *) ac_try_echo=$ac_try;;
18543esac
18544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18545 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018547 grep -v '^ *+' conftest.er1 >conftest.err
18548 rm -f conftest.er1
18549 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018551 (exit $ac_status); } && {
18552 test -z "$ac_c_werror_flag" ||
18553 test ! -s conftest.err
18554 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018555 ac_cv_struct_tm=time.h
18556else
Martin v. Löwis11437992002-04-12 09:54:03 +000018557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018558sed 's/^/| /' conftest.$ac_ext >&5
18559
Martin v. Löwiseba40652007-08-30 20:10:57 +000018560 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018562
18563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018565{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18566echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018567if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018568
18569cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018570#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018571_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018572
18573fi
18574
Martin v. Löwiseba40652007-08-30 20:10:57 +000018575{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18576echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018577if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18578 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018579else
Martin v. Löwis11437992002-04-12 09:54:03 +000018580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018581/* confdefs.h. */
18582_ACEOF
18583cat confdefs.h >>conftest.$ac_ext
18584cat >>conftest.$ac_ext <<_ACEOF
18585/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018586#include <sys/types.h>
18587#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018588
18589
Martin v. Löwis11437992002-04-12 09:54:03 +000018590int
18591main ()
18592{
18593static struct tm ac_aggr;
18594if (ac_aggr.tm_zone)
18595return 0;
18596 ;
18597 return 0;
18598}
18599_ACEOF
18600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018601if { (ac_try="$ac_compile"
18602case "(($ac_try" in
18603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18604 *) ac_try_echo=$ac_try;;
18605esac
18606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018609 grep -v '^ *+' conftest.er1 >conftest.err
18610 rm -f conftest.er1
18611 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613 (exit $ac_status); } && {
18614 test -z "$ac_c_werror_flag" ||
18615 test ! -s conftest.err
18616 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018617 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018618else
Martin v. Löwis11437992002-04-12 09:54:03 +000018619 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018620sed 's/^/| /' conftest.$ac_ext >&5
18621
Martin v. Löwiseba40652007-08-30 20:10:57 +000018622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018623/* confdefs.h. */
18624_ACEOF
18625cat confdefs.h >>conftest.$ac_ext
18626cat >>conftest.$ac_ext <<_ACEOF
18627/* end confdefs.h. */
18628#include <sys/types.h>
18629#include <$ac_cv_struct_tm>
18630
18631
18632int
18633main ()
18634{
18635static struct tm ac_aggr;
18636if (sizeof ac_aggr.tm_zone)
18637return 0;
18638 ;
18639 return 0;
18640}
18641_ACEOF
18642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018643if { (ac_try="$ac_compile"
18644case "(($ac_try" in
18645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18646 *) ac_try_echo=$ac_try;;
18647esac
18648eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18649 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018651 grep -v '^ *+' conftest.er1 >conftest.err
18652 rm -f conftest.er1
18653 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018655 (exit $ac_status); } && {
18656 test -z "$ac_c_werror_flag" ||
18657 test ! -s conftest.err
18658 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018659 ac_cv_member_struct_tm_tm_zone=yes
18660else
18661 echo "$as_me: failed program was:" >&5
18662sed 's/^/| /' conftest.$ac_ext >&5
18663
Martin v. Löwiseba40652007-08-30 20:10:57 +000018664 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018666
18667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018669
18670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018672{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18673echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018674if test $ac_cv_member_struct_tm_tm_zone = yes; then
18675
18676cat >>confdefs.h <<_ACEOF
18677#define HAVE_STRUCT_TM_TM_ZONE 1
18678_ACEOF
18679
18680
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018681fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018682
Martin v. Löwis11437992002-04-12 09:54:03 +000018683if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18684
18685cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018686#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018687_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018688
18689else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018690 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18691echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18692if test "${ac_cv_have_decl_tzname+set}" = set; then
18693 echo $ECHO_N "(cached) $ECHO_C" >&6
18694else
18695 cat >conftest.$ac_ext <<_ACEOF
18696/* confdefs.h. */
18697_ACEOF
18698cat confdefs.h >>conftest.$ac_ext
18699cat >>conftest.$ac_ext <<_ACEOF
18700/* end confdefs.h. */
18701#include <time.h>
18702
18703int
18704main ()
18705{
18706#ifndef tzname
18707 (void) tzname;
18708#endif
18709
18710 ;
18711 return 0;
18712}
18713_ACEOF
18714rm -f conftest.$ac_objext
18715if { (ac_try="$ac_compile"
18716case "(($ac_try" in
18717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18718 *) ac_try_echo=$ac_try;;
18719esac
18720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18721 (eval "$ac_compile") 2>conftest.er1
18722 ac_status=$?
18723 grep -v '^ *+' conftest.er1 >conftest.err
18724 rm -f conftest.er1
18725 cat conftest.err >&5
18726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18727 (exit $ac_status); } && {
18728 test -z "$ac_c_werror_flag" ||
18729 test ! -s conftest.err
18730 } && test -s conftest.$ac_objext; then
18731 ac_cv_have_decl_tzname=yes
18732else
18733 echo "$as_me: failed program was:" >&5
18734sed 's/^/| /' conftest.$ac_ext >&5
18735
18736 ac_cv_have_decl_tzname=no
18737fi
18738
18739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18740fi
18741{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18742echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18743if test $ac_cv_have_decl_tzname = yes; then
18744
18745cat >>confdefs.h <<_ACEOF
18746#define HAVE_DECL_TZNAME 1
18747_ACEOF
18748
18749
18750else
18751 cat >>confdefs.h <<_ACEOF
18752#define HAVE_DECL_TZNAME 0
18753_ACEOF
18754
18755
18756fi
18757
18758
18759 { echo "$as_me:$LINENO: checking for tzname" >&5
18760echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018761if test "${ac_cv_var_tzname+set}" = set; then
18762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018763else
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018765/* confdefs.h. */
18766_ACEOF
18767cat confdefs.h >>conftest.$ac_ext
18768cat >>conftest.$ac_ext <<_ACEOF
18769/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018770#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018771#if !HAVE_DECL_TZNAME
18772extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018774
Martin v. Löwis11437992002-04-12 09:54:03 +000018775int
18776main ()
18777{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018778return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018779 ;
18780 return 0;
18781}
18782_ACEOF
18783rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018784if { (ac_try="$ac_link"
18785case "(($ac_try" in
18786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18787 *) ac_try_echo=$ac_try;;
18788esac
18789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18790 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018792 grep -v '^ *+' conftest.er1 >conftest.err
18793 rm -f conftest.er1
18794 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018796 (exit $ac_status); } && {
18797 test -z "$ac_c_werror_flag" ||
18798 test ! -s conftest.err
18799 } && test -s conftest$ac_exeext &&
18800 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018801 ac_cv_var_tzname=yes
18802else
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018804sed 's/^/| /' conftest.$ac_ext >&5
18805
Martin v. Löwiseba40652007-08-30 20:10:57 +000018806 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018808
18809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018810 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018812{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18813echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018814 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018815
18816cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018817#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018818_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018819
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018820 fi
18821fi
18822
Martin v. Löwiseba40652007-08-30 20:10:57 +000018823{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18824echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018825if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18826 echo $ECHO_N "(cached) $ECHO_C" >&6
18827else
18828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018829/* confdefs.h. */
18830_ACEOF
18831cat confdefs.h >>conftest.$ac_ext
18832cat >>conftest.$ac_ext <<_ACEOF
18833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018834$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018835int
18836main ()
18837{
18838static struct stat ac_aggr;
18839if (ac_aggr.st_rdev)
18840return 0;
18841 ;
18842 return 0;
18843}
18844_ACEOF
18845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018846if { (ac_try="$ac_compile"
18847case "(($ac_try" in
18848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18849 *) ac_try_echo=$ac_try;;
18850esac
18851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18852 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018854 grep -v '^ *+' conftest.er1 >conftest.err
18855 rm -f conftest.er1
18856 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018858 (exit $ac_status); } && {
18859 test -z "$ac_c_werror_flag" ||
18860 test ! -s conftest.err
18861 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018862 ac_cv_member_struct_stat_st_rdev=yes
18863else
18864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018865sed 's/^/| /' conftest.$ac_ext >&5
18866
Martin v. Löwiseba40652007-08-30 20:10:57 +000018867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018868/* confdefs.h. */
18869_ACEOF
18870cat confdefs.h >>conftest.$ac_ext
18871cat >>conftest.$ac_ext <<_ACEOF
18872/* end confdefs.h. */
18873$ac_includes_default
18874int
18875main ()
18876{
18877static struct stat ac_aggr;
18878if (sizeof ac_aggr.st_rdev)
18879return 0;
18880 ;
18881 return 0;
18882}
18883_ACEOF
18884rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018885if { (ac_try="$ac_compile"
18886case "(($ac_try" in
18887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18888 *) ac_try_echo=$ac_try;;
18889esac
18890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18891 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018893 grep -v '^ *+' conftest.er1 >conftest.err
18894 rm -f conftest.er1
18895 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018897 (exit $ac_status); } && {
18898 test -z "$ac_c_werror_flag" ||
18899 test ! -s conftest.err
18900 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018901 ac_cv_member_struct_stat_st_rdev=yes
18902else
18903 echo "$as_me: failed program was:" >&5
18904sed 's/^/| /' conftest.$ac_ext >&5
18905
Martin v. Löwiseba40652007-08-30 20:10:57 +000018906 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018907fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018908
18909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018911
18912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018914{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18915echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018916if test $ac_cv_member_struct_stat_st_rdev = yes; then
18917
18918cat >>confdefs.h <<_ACEOF
18919#define HAVE_STRUCT_STAT_ST_RDEV 1
18920_ACEOF
18921
18922
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018923fi
18924
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18926echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018927if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18928 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018929else
Martin v. Löwis11437992002-04-12 09:54:03 +000018930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018931/* confdefs.h. */
18932_ACEOF
18933cat confdefs.h >>conftest.$ac_ext
18934cat >>conftest.$ac_ext <<_ACEOF
18935/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018936$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018937int
18938main ()
18939{
18940static struct stat ac_aggr;
18941if (ac_aggr.st_blksize)
18942return 0;
18943 ;
18944 return 0;
18945}
18946_ACEOF
18947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948if { (ac_try="$ac_compile"
18949case "(($ac_try" in
18950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18951 *) ac_try_echo=$ac_try;;
18952esac
18953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018956 grep -v '^ *+' conftest.er1 >conftest.err
18957 rm -f conftest.er1
18958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018960 (exit $ac_status); } && {
18961 test -z "$ac_c_werror_flag" ||
18962 test ! -s conftest.err
18963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018964 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018965else
Martin v. Löwis11437992002-04-12 09:54:03 +000018966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018967sed 's/^/| /' conftest.$ac_ext >&5
18968
Martin v. Löwiseba40652007-08-30 20:10:57 +000018969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018970/* confdefs.h. */
18971_ACEOF
18972cat confdefs.h >>conftest.$ac_ext
18973cat >>conftest.$ac_ext <<_ACEOF
18974/* end confdefs.h. */
18975$ac_includes_default
18976int
18977main ()
18978{
18979static struct stat ac_aggr;
18980if (sizeof ac_aggr.st_blksize)
18981return 0;
18982 ;
18983 return 0;
18984}
18985_ACEOF
18986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018987if { (ac_try="$ac_compile"
18988case "(($ac_try" in
18989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18990 *) ac_try_echo=$ac_try;;
18991esac
18992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18993 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018995 grep -v '^ *+' conftest.er1 >conftest.err
18996 rm -f conftest.er1
18997 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018999 (exit $ac_status); } && {
19000 test -z "$ac_c_werror_flag" ||
19001 test ! -s conftest.err
19002 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019003 ac_cv_member_struct_stat_st_blksize=yes
19004else
19005 echo "$as_me: failed program was:" >&5
19006sed 's/^/| /' conftest.$ac_ext >&5
19007
Martin v. Löwiseba40652007-08-30 20:10:57 +000019008 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019010
19011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019013
19014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019016{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19017echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019018if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019019
Martin v. Löwis11437992002-04-12 09:54:03 +000019020cat >>confdefs.h <<_ACEOF
19021#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19022_ACEOF
19023
19024
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019025fi
19026
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19028echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019029if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19030 echo $ECHO_N "(cached) $ECHO_C" >&6
19031else
19032 cat >conftest.$ac_ext <<_ACEOF
19033/* confdefs.h. */
19034_ACEOF
19035cat confdefs.h >>conftest.$ac_ext
19036cat >>conftest.$ac_ext <<_ACEOF
19037/* end confdefs.h. */
19038$ac_includes_default
19039int
19040main ()
19041{
19042static struct stat ac_aggr;
19043if (ac_aggr.st_flags)
19044return 0;
19045 ;
19046 return 0;
19047}
19048_ACEOF
19049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019050if { (ac_try="$ac_compile"
19051case "(($ac_try" in
19052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19053 *) ac_try_echo=$ac_try;;
19054esac
19055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19056 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019057 ac_status=$?
19058 grep -v '^ *+' conftest.er1 >conftest.err
19059 rm -f conftest.er1
19060 cat conftest.err >&5
19061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019062 (exit $ac_status); } && {
19063 test -z "$ac_c_werror_flag" ||
19064 test ! -s conftest.err
19065 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019066 ac_cv_member_struct_stat_st_flags=yes
19067else
19068 echo "$as_me: failed program was:" >&5
19069sed 's/^/| /' conftest.$ac_ext >&5
19070
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019072/* confdefs.h. */
19073_ACEOF
19074cat confdefs.h >>conftest.$ac_ext
19075cat >>conftest.$ac_ext <<_ACEOF
19076/* end confdefs.h. */
19077$ac_includes_default
19078int
19079main ()
19080{
19081static struct stat ac_aggr;
19082if (sizeof ac_aggr.st_flags)
19083return 0;
19084 ;
19085 return 0;
19086}
19087_ACEOF
19088rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089if { (ac_try="$ac_compile"
19090case "(($ac_try" in
19091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19092 *) ac_try_echo=$ac_try;;
19093esac
19094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19095 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019096 ac_status=$?
19097 grep -v '^ *+' conftest.er1 >conftest.err
19098 rm -f conftest.er1
19099 cat conftest.err >&5
19100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019101 (exit $ac_status); } && {
19102 test -z "$ac_c_werror_flag" ||
19103 test ! -s conftest.err
19104 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019105 ac_cv_member_struct_stat_st_flags=yes
19106else
19107 echo "$as_me: failed program was:" >&5
19108sed 's/^/| /' conftest.$ac_ext >&5
19109
Martin v. Löwiseba40652007-08-30 20:10:57 +000019110 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019112
19113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019115
19116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019118{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19119echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019120if test $ac_cv_member_struct_stat_st_flags = yes; then
19121
19122cat >>confdefs.h <<_ACEOF
19123#define HAVE_STRUCT_STAT_ST_FLAGS 1
19124_ACEOF
19125
19126
19127fi
19128
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19130echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019131if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19132 echo $ECHO_N "(cached) $ECHO_C" >&6
19133else
19134 cat >conftest.$ac_ext <<_ACEOF
19135/* confdefs.h. */
19136_ACEOF
19137cat confdefs.h >>conftest.$ac_ext
19138cat >>conftest.$ac_ext <<_ACEOF
19139/* end confdefs.h. */
19140$ac_includes_default
19141int
19142main ()
19143{
19144static struct stat ac_aggr;
19145if (ac_aggr.st_gen)
19146return 0;
19147 ;
19148 return 0;
19149}
19150_ACEOF
19151rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152if { (ac_try="$ac_compile"
19153case "(($ac_try" in
19154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19155 *) ac_try_echo=$ac_try;;
19156esac
19157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019159 ac_status=$?
19160 grep -v '^ *+' conftest.er1 >conftest.err
19161 rm -f conftest.er1
19162 cat conftest.err >&5
19163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019164 (exit $ac_status); } && {
19165 test -z "$ac_c_werror_flag" ||
19166 test ! -s conftest.err
19167 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019168 ac_cv_member_struct_stat_st_gen=yes
19169else
19170 echo "$as_me: failed program was:" >&5
19171sed 's/^/| /' conftest.$ac_ext >&5
19172
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019174/* confdefs.h. */
19175_ACEOF
19176cat confdefs.h >>conftest.$ac_ext
19177cat >>conftest.$ac_ext <<_ACEOF
19178/* end confdefs.h. */
19179$ac_includes_default
19180int
19181main ()
19182{
19183static struct stat ac_aggr;
19184if (sizeof ac_aggr.st_gen)
19185return 0;
19186 ;
19187 return 0;
19188}
19189_ACEOF
19190rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019191if { (ac_try="$ac_compile"
19192case "(($ac_try" in
19193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19194 *) ac_try_echo=$ac_try;;
19195esac
19196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019198 ac_status=$?
19199 grep -v '^ *+' conftest.er1 >conftest.err
19200 rm -f conftest.er1
19201 cat conftest.err >&5
19202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019203 (exit $ac_status); } && {
19204 test -z "$ac_c_werror_flag" ||
19205 test ! -s conftest.err
19206 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019207 ac_cv_member_struct_stat_st_gen=yes
19208else
19209 echo "$as_me: failed program was:" >&5
19210sed 's/^/| /' conftest.$ac_ext >&5
19211
Martin v. Löwiseba40652007-08-30 20:10:57 +000019212 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019213fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019214
19215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019217
19218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019220{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19221echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019222if test $ac_cv_member_struct_stat_st_gen = yes; then
19223
19224cat >>confdefs.h <<_ACEOF
19225#define HAVE_STRUCT_STAT_ST_GEN 1
19226_ACEOF
19227
19228
19229fi
19230
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19232echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019233if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19234 echo $ECHO_N "(cached) $ECHO_C" >&6
19235else
19236 cat >conftest.$ac_ext <<_ACEOF
19237/* confdefs.h. */
19238_ACEOF
19239cat confdefs.h >>conftest.$ac_ext
19240cat >>conftest.$ac_ext <<_ACEOF
19241/* end confdefs.h. */
19242$ac_includes_default
19243int
19244main ()
19245{
19246static struct stat ac_aggr;
19247if (ac_aggr.st_birthtime)
19248return 0;
19249 ;
19250 return 0;
19251}
19252_ACEOF
19253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019254if { (ac_try="$ac_compile"
19255case "(($ac_try" in
19256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19257 *) ac_try_echo=$ac_try;;
19258esac
19259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019261 ac_status=$?
19262 grep -v '^ *+' conftest.er1 >conftest.err
19263 rm -f conftest.er1
19264 cat conftest.err >&5
19265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019266 (exit $ac_status); } && {
19267 test -z "$ac_c_werror_flag" ||
19268 test ! -s conftest.err
19269 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019270 ac_cv_member_struct_stat_st_birthtime=yes
19271else
19272 echo "$as_me: failed program was:" >&5
19273sed 's/^/| /' conftest.$ac_ext >&5
19274
Martin v. Löwiseba40652007-08-30 20:10:57 +000019275 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019276/* confdefs.h. */
19277_ACEOF
19278cat confdefs.h >>conftest.$ac_ext
19279cat >>conftest.$ac_ext <<_ACEOF
19280/* end confdefs.h. */
19281$ac_includes_default
19282int
19283main ()
19284{
19285static struct stat ac_aggr;
19286if (sizeof ac_aggr.st_birthtime)
19287return 0;
19288 ;
19289 return 0;
19290}
19291_ACEOF
19292rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019293if { (ac_try="$ac_compile"
19294case "(($ac_try" in
19295 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19296 *) ac_try_echo=$ac_try;;
19297esac
19298eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019300 ac_status=$?
19301 grep -v '^ *+' conftest.er1 >conftest.err
19302 rm -f conftest.er1
19303 cat conftest.err >&5
19304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019305 (exit $ac_status); } && {
19306 test -z "$ac_c_werror_flag" ||
19307 test ! -s conftest.err
19308 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019309 ac_cv_member_struct_stat_st_birthtime=yes
19310else
19311 echo "$as_me: failed program was:" >&5
19312sed 's/^/| /' conftest.$ac_ext >&5
19313
Martin v. Löwiseba40652007-08-30 20:10:57 +000019314 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019316
19317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019319
19320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019322{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19323echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019324if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19325
19326cat >>confdefs.h <<_ACEOF
19327#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19328_ACEOF
19329
19330
19331fi
19332
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19334echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019335if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19336 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019337else
Martin v. Löwis11437992002-04-12 09:54:03 +000019338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019339/* confdefs.h. */
19340_ACEOF
19341cat confdefs.h >>conftest.$ac_ext
19342cat >>conftest.$ac_ext <<_ACEOF
19343/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019344$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019345int
19346main ()
19347{
19348static struct stat ac_aggr;
19349if (ac_aggr.st_blocks)
19350return 0;
19351 ;
19352 return 0;
19353}
19354_ACEOF
19355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019356if { (ac_try="$ac_compile"
19357case "(($ac_try" in
19358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19359 *) ac_try_echo=$ac_try;;
19360esac
19361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019364 grep -v '^ *+' conftest.er1 >conftest.err
19365 rm -f conftest.er1
19366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019368 (exit $ac_status); } && {
19369 test -z "$ac_c_werror_flag" ||
19370 test ! -s conftest.err
19371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019372 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019373else
Martin v. Löwis11437992002-04-12 09:54:03 +000019374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019375sed 's/^/| /' conftest.$ac_ext >&5
19376
Martin v. Löwiseba40652007-08-30 20:10:57 +000019377 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019378/* confdefs.h. */
19379_ACEOF
19380cat confdefs.h >>conftest.$ac_ext
19381cat >>conftest.$ac_ext <<_ACEOF
19382/* end confdefs.h. */
19383$ac_includes_default
19384int
19385main ()
19386{
19387static struct stat ac_aggr;
19388if (sizeof ac_aggr.st_blocks)
19389return 0;
19390 ;
19391 return 0;
19392}
19393_ACEOF
19394rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019395if { (ac_try="$ac_compile"
19396case "(($ac_try" in
19397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19398 *) ac_try_echo=$ac_try;;
19399esac
19400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19401 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019403 grep -v '^ *+' conftest.er1 >conftest.err
19404 rm -f conftest.er1
19405 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019407 (exit $ac_status); } && {
19408 test -z "$ac_c_werror_flag" ||
19409 test ! -s conftest.err
19410 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019411 ac_cv_member_struct_stat_st_blocks=yes
19412else
19413 echo "$as_me: failed program was:" >&5
19414sed 's/^/| /' conftest.$ac_ext >&5
19415
Martin v. Löwiseba40652007-08-30 20:10:57 +000019416 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019417fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019418
19419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019421
19422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019424{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19425echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019426if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019427
Martin v. Löwis11437992002-04-12 09:54:03 +000019428cat >>confdefs.h <<_ACEOF
19429#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19430_ACEOF
19431
19432
19433cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019434#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019435_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019436
19437else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019438 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019439 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019440 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19441 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019442esac
19443
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019444fi
19445
Michael W. Hudson54241132001-12-07 15:38:26 +000019446
Martin v. Löwis11437992002-04-12 09:54:03 +000019447
Martin v. Löwiseba40652007-08-30 20:10:57 +000019448{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19449echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019450if test "${ac_cv_header_time_altzone+set}" = set; then
19451 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019452else
Martin v. Löwis11437992002-04-12 09:54:03 +000019453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019454/* confdefs.h. */
19455_ACEOF
19456cat confdefs.h >>conftest.$ac_ext
19457cat >>conftest.$ac_ext <<_ACEOF
19458/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019459#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019460int
19461main ()
19462{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019463return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019464 ;
19465 return 0;
19466}
19467_ACEOF
19468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019469if { (ac_try="$ac_compile"
19470case "(($ac_try" in
19471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19472 *) ac_try_echo=$ac_try;;
19473esac
19474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019477 grep -v '^ *+' conftest.er1 >conftest.err
19478 rm -f conftest.er1
19479 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019481 (exit $ac_status); } && {
19482 test -z "$ac_c_werror_flag" ||
19483 test ! -s conftest.err
19484 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019485 ac_cv_header_time_altzone=yes
19486else
Martin v. Löwis11437992002-04-12 09:54:03 +000019487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019488sed 's/^/| /' conftest.$ac_ext >&5
19489
Martin v. Löwiseba40652007-08-30 20:10:57 +000019490 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019491fi
19492
Martin v. Löwiseba40652007-08-30 20:10:57 +000019493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19494fi
19495
19496{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19497echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019498if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019499
19500cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019501#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019502_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019503
19504fi
19505
Guido van Rossumda88dad1995-01-26 00:46:29 +000019506was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019507{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19508echo $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 +000019509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019510/* confdefs.h. */
19511_ACEOF
19512cat confdefs.h >>conftest.$ac_ext
19513cat >>conftest.$ac_ext <<_ACEOF
19514/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019515
19516#include <sys/types.h>
19517#include <sys/select.h>
19518#include <sys/time.h>
19519
Martin v. Löwis11437992002-04-12 09:54:03 +000019520int
19521main ()
19522{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019523;
Martin v. Löwis11437992002-04-12 09:54:03 +000019524 ;
19525 return 0;
19526}
19527_ACEOF
19528rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019529if { (ac_try="$ac_compile"
19530case "(($ac_try" in
19531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19532 *) ac_try_echo=$ac_try;;
19533esac
19534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019537 grep -v '^ *+' conftest.er1 >conftest.err
19538 rm -f conftest.er1
19539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019541 (exit $ac_status); } && {
19542 test -z "$ac_c_werror_flag" ||
19543 test ! -s conftest.err
19544 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019545
19546
19547cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019548#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019549_ACEOF
19550
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019551 was_it_defined=yes
19552
Guido van Rossumf78abae1997-01-21 22:02:36 +000019553else
Martin v. Löwis11437992002-04-12 09:54:03 +000019554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019555sed 's/^/| /' conftest.$ac_ext >&5
19556
Brett Cannon19fab762007-06-02 03:02:29 +000019557
Martin v. Löwiseba40652007-08-30 20:10:57 +000019558fi
19559
19560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19561{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19562echo "${ECHO_T}$was_it_defined" >&6; }
19563
19564{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19565echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019566if test "${ac_cv_struct_addrinfo+set}" = set; then
19567 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019568else
Martin v. Löwis11437992002-04-12 09:54:03 +000019569 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019570/* confdefs.h. */
19571_ACEOF
19572cat confdefs.h >>conftest.$ac_ext
19573cat >>conftest.$ac_ext <<_ACEOF
19574/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019575
19576# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019577int
19578main ()
19579{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019580struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019581 ;
19582 return 0;
19583}
19584_ACEOF
19585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019586if { (ac_try="$ac_compile"
19587case "(($ac_try" in
19588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19589 *) ac_try_echo=$ac_try;;
19590esac
19591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019594 grep -v '^ *+' conftest.er1 >conftest.err
19595 rm -f conftest.er1
19596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019598 (exit $ac_status); } && {
19599 test -z "$ac_c_werror_flag" ||
19600 test ! -s conftest.err
19601 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019602 ac_cv_struct_addrinfo=yes
19603else
Martin v. Löwis11437992002-04-12 09:54:03 +000019604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019605sed 's/^/| /' conftest.$ac_ext >&5
19606
Martin v. Löwiseba40652007-08-30 20:10:57 +000019607 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019608fi
19609
Martin v. Löwiseba40652007-08-30 20:10:57 +000019610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19611fi
19612
19613{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19614echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019615if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019616
19617cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019618#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019619_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019620
19621fi
19622
Martin v. Löwiseba40652007-08-30 20:10:57 +000019623{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19624echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019625if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19626 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019627else
Martin v. Löwis11437992002-04-12 09:54:03 +000019628 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019629/* confdefs.h. */
19630_ACEOF
19631cat confdefs.h >>conftest.$ac_ext
19632cat >>conftest.$ac_ext <<_ACEOF
19633/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019634
19635# include <sys/types.h>
19636# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019637int
19638main ()
19639{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019640struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019641 ;
19642 return 0;
19643}
19644_ACEOF
19645rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019646if { (ac_try="$ac_compile"
19647case "(($ac_try" in
19648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19649 *) ac_try_echo=$ac_try;;
19650esac
19651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019654 grep -v '^ *+' conftest.er1 >conftest.err
19655 rm -f conftest.er1
19656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019658 (exit $ac_status); } && {
19659 test -z "$ac_c_werror_flag" ||
19660 test ! -s conftest.err
19661 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019662 ac_cv_struct_sockaddr_storage=yes
19663else
Martin v. Löwis11437992002-04-12 09:54:03 +000019664 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019665sed 's/^/| /' conftest.$ac_ext >&5
19666
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019668fi
19669
Martin v. Löwiseba40652007-08-30 20:10:57 +000019670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19671fi
19672
19673{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19674echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019675if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019676
19677cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019678#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019679_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019680
19681fi
19682
Guido van Rossum627b2d71993-12-24 10:39:16 +000019683# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019684
Michael W. Hudson54241132001-12-07 15:38:26 +000019685
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19687echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019688if test "${ac_cv_c_char_unsigned+set}" = set; then
19689 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019690else
Martin v. Löwis11437992002-04-12 09:54:03 +000019691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019692/* confdefs.h. */
19693_ACEOF
19694cat confdefs.h >>conftest.$ac_ext
19695cat >>conftest.$ac_ext <<_ACEOF
19696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019697$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019698int
19699main ()
19700{
19701static int test_array [1 - 2 * !(((char) -1) < 0)];
19702test_array [0] = 0
19703
19704 ;
19705 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019706}
Martin v. Löwis11437992002-04-12 09:54:03 +000019707_ACEOF
19708rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019709if { (ac_try="$ac_compile"
19710case "(($ac_try" in
19711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19712 *) ac_try_echo=$ac_try;;
19713esac
19714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19715 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019717 grep -v '^ *+' conftest.er1 >conftest.err
19718 rm -f conftest.er1
19719 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019721 (exit $ac_status); } && {
19722 test -z "$ac_c_werror_flag" ||
19723 test ! -s conftest.err
19724 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019725 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019726else
19727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019728sed 's/^/| /' conftest.$ac_ext >&5
19729
Martin v. Löwiseba40652007-08-30 20:10:57 +000019730 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019731fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019732
19733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019735{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19736echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019737if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019738 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019739#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019740_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019741
19742fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019743
Martin v. Löwiseba40652007-08-30 20:10:57 +000019744{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19745echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019746if test "${ac_cv_c_const+set}" = set; then
19747 echo $ECHO_N "(cached) $ECHO_C" >&6
19748else
19749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019750/* confdefs.h. */
19751_ACEOF
19752cat confdefs.h >>conftest.$ac_ext
19753cat >>conftest.$ac_ext <<_ACEOF
19754/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019755
Martin v. Löwis11437992002-04-12 09:54:03 +000019756int
19757main ()
19758{
19759/* FIXME: Include the comments suggested by Paul. */
19760#ifndef __cplusplus
19761 /* Ultrix mips cc rejects this. */
19762 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019763 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019764 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019765 char const *const *pcpcc;
19766 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019767 /* NEC SVR4.0.2 mips cc rejects this. */
19768 struct point {int x, y;};
19769 static struct point const zero = {0,0};
19770 /* AIX XL C 1.02.0.0 rejects this.
19771 It does not let you subtract one const X* pointer from another in
19772 an arm of an if-expression whose if-part is not a constant
19773 expression */
19774 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019775 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019776 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019777 ++pcpcc;
19778 ppc = (char**) pcpcc;
19779 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019780 { /* SCO 3.2v4 cc rejects this. */
19781 char *t;
19782 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019783
Martin v. Löwis11437992002-04-12 09:54:03 +000019784 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019785 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019786 }
19787 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19788 int x[] = {25, 17};
19789 const int *foo = &x[0];
19790 ++foo;
19791 }
19792 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19793 typedef const int *iptr;
19794 iptr p = 0;
19795 ++p;
19796 }
19797 { /* AIX XL C 1.02.0.0 rejects this saying
19798 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19799 struct s { int j; const int *ap[3]; };
19800 struct s *b; b->j = 5;
19801 }
19802 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19803 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019804 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019805 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019806 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019807#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019808
Martin v. Löwis11437992002-04-12 09:54:03 +000019809 ;
19810 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019811}
Martin v. Löwis11437992002-04-12 09:54:03 +000019812_ACEOF
19813rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019814if { (ac_try="$ac_compile"
19815case "(($ac_try" in
19816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19817 *) ac_try_echo=$ac_try;;
19818esac
19819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19820 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019822 grep -v '^ *+' conftest.er1 >conftest.err
19823 rm -f conftest.er1
19824 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019826 (exit $ac_status); } && {
19827 test -z "$ac_c_werror_flag" ||
19828 test ! -s conftest.err
19829 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019830 ac_cv_c_const=yes
19831else
Martin v. Löwis11437992002-04-12 09:54:03 +000019832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019833sed 's/^/| /' conftest.$ac_ext >&5
19834
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019837
19838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019840{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19841echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019842if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019843
19844cat >>confdefs.h <<\_ACEOF
19845#define const
19846_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019847
19848fi
19849
Michael W. Hudson54241132001-12-07 15:38:26 +000019850
Guido van Rossumda88dad1995-01-26 00:46:29 +000019851works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019852{ echo "$as_me:$LINENO: checking for working volatile" >&5
19853echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019854cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019855/* confdefs.h. */
19856_ACEOF
19857cat confdefs.h >>conftest.$ac_ext
19858cat >>conftest.$ac_ext <<_ACEOF
19859/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019860
Martin v. Löwis11437992002-04-12 09:54:03 +000019861int
19862main ()
19863{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019864volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019865 ;
19866 return 0;
19867}
19868_ACEOF
19869rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019870if { (ac_try="$ac_compile"
19871case "(($ac_try" in
19872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19873 *) ac_try_echo=$ac_try;;
19874esac
19875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019878 grep -v '^ *+' conftest.er1 >conftest.err
19879 rm -f conftest.er1
19880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019882 (exit $ac_status); } && {
19883 test -z "$ac_c_werror_flag" ||
19884 test ! -s conftest.err
19885 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019886 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019887else
Martin v. Löwis11437992002-04-12 09:54:03 +000019888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019889sed 's/^/| /' conftest.$ac_ext >&5
19890
Martin v. Löwis11437992002-04-12 09:54:03 +000019891
19892cat >>confdefs.h <<\_ACEOF
19893#define volatile
19894_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019895
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019896
Guido van Rossum627b2d71993-12-24 10:39:16 +000019897fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019898
19899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19900{ echo "$as_me:$LINENO: result: $works" >&5
19901echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019902
Guido van Rossumda88dad1995-01-26 00:46:29 +000019903works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019904{ echo "$as_me:$LINENO: checking for working signed char" >&5
19905echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019907/* confdefs.h. */
19908_ACEOF
19909cat confdefs.h >>conftest.$ac_ext
19910cat >>conftest.$ac_ext <<_ACEOF
19911/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019912
Martin v. Löwis11437992002-04-12 09:54:03 +000019913int
19914main ()
19915{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019916signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 ;
19918 return 0;
19919}
19920_ACEOF
19921rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019922if { (ac_try="$ac_compile"
19923case "(($ac_try" in
19924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19925 *) ac_try_echo=$ac_try;;
19926esac
19927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19928 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019929 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019930 grep -v '^ *+' conftest.er1 >conftest.err
19931 rm -f conftest.er1
19932 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019934 (exit $ac_status); } && {
19935 test -z "$ac_c_werror_flag" ||
19936 test ! -s conftest.err
19937 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019938 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019939else
Martin v. Löwis11437992002-04-12 09:54:03 +000019940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019941sed 's/^/| /' conftest.$ac_ext >&5
19942
Martin v. Löwis11437992002-04-12 09:54:03 +000019943
19944cat >>confdefs.h <<\_ACEOF
19945#define signed
19946_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019947
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019948
Guido van Rossum7f43da71994-08-01 12:15:30 +000019949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950
19951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19952{ echo "$as_me:$LINENO: result: $works" >&5
19953echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019954
Guido van Rossumda88dad1995-01-26 00:46:29 +000019955have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956{ echo "$as_me:$LINENO: checking for prototypes" >&5
19957echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019958cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019959/* confdefs.h. */
19960_ACEOF
19961cat confdefs.h >>conftest.$ac_ext
19962cat >>conftest.$ac_ext <<_ACEOF
19963/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019964int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019965int
19966main ()
19967{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019968return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019969 ;
19970 return 0;
19971}
19972_ACEOF
19973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019974if { (ac_try="$ac_compile"
19975case "(($ac_try" in
19976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19977 *) ac_try_echo=$ac_try;;
19978esac
19979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019982 grep -v '^ *+' conftest.er1 >conftest.err
19983 rm -f conftest.er1
19984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019986 (exit $ac_status); } && {
19987 test -z "$ac_c_werror_flag" ||
19988 test ! -s conftest.err
19989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019990
19991
19992cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019993#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019994_ACEOF
19995
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019996 have_prototypes=yes
19997
Guido van Rossumf78abae1997-01-21 22:02:36 +000019998else
Martin v. Löwis11437992002-04-12 09:54:03 +000019999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020000sed 's/^/| /' conftest.$ac_ext >&5
20001
Martin v. Löwiseba40652007-08-30 20:10:57 +000020002
Guido van Rossum7f43da71994-08-01 12:15:30 +000020003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020004
20005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20006{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20007echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020008
Guido van Rossumda88dad1995-01-26 00:46:29 +000020009works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020010{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20011echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020013/* confdefs.h. */
20014_ACEOF
20015cat confdefs.h >>conftest.$ac_ext
20016cat >>conftest.$ac_ext <<_ACEOF
20017/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020018
20019#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020020int foo(int x, ...) {
20021 va_list va;
20022 va_start(va, x);
20023 va_arg(va, int);
20024 va_arg(va, char *);
20025 va_arg(va, double);
20026 return 0;
20027}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020028
Martin v. Löwis11437992002-04-12 09:54:03 +000020029int
20030main ()
20031{
Guido van Rossum90eea071996-08-30 20:58:57 +000020032return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020033 ;
20034 return 0;
20035}
20036_ACEOF
20037rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020038if { (ac_try="$ac_compile"
20039case "(($ac_try" in
20040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20041 *) ac_try_echo=$ac_try;;
20042esac
20043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020046 grep -v '^ *+' conftest.er1 >conftest.err
20047 rm -f conftest.er1
20048 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020050 (exit $ac_status); } && {
20051 test -z "$ac_c_werror_flag" ||
20052 test ! -s conftest.err
20053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020054
20055
20056cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020057#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020058_ACEOF
20059
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020060 works=yes
20061
Guido van Rossumf78abae1997-01-21 22:02:36 +000020062else
Martin v. Löwis11437992002-04-12 09:54:03 +000020063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020064sed 's/^/| /' conftest.$ac_ext >&5
20065
Martin v. Löwiseba40652007-08-30 20:10:57 +000020066
Guido van Rossum627b2d71993-12-24 10:39:16 +000020067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020068
20069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20070{ echo "$as_me:$LINENO: result: $works" >&5
20071echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020072
Martin v. Löwisd6320502004-08-12 13:45:08 +000020073# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020074{ echo "$as_me:$LINENO: checking for socketpair" >&5
20075echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020076cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020077/* confdefs.h. */
20078_ACEOF
20079cat confdefs.h >>conftest.$ac_ext
20080cat >>conftest.$ac_ext <<_ACEOF
20081/* end confdefs.h. */
20082
20083#include <sys/types.h>
20084#include <sys/socket.h>
20085
20086int
20087main ()
20088{
20089void *x=socketpair
20090 ;
20091 return 0;
20092}
20093_ACEOF
20094rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020095if { (ac_try="$ac_compile"
20096case "(($ac_try" in
20097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20098 *) ac_try_echo=$ac_try;;
20099esac
20100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20101 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020102 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020103 grep -v '^ *+' conftest.er1 >conftest.err
20104 rm -f conftest.er1
20105 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020107 (exit $ac_status); } && {
20108 test -z "$ac_c_werror_flag" ||
20109 test ! -s conftest.err
20110 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020111
20112cat >>confdefs.h <<\_ACEOF
20113#define HAVE_SOCKETPAIR 1
20114_ACEOF
20115
Martin v. Löwiseba40652007-08-30 20:10:57 +000020116 { echo "$as_me:$LINENO: result: yes" >&5
20117echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020118else
20119 echo "$as_me: failed program was:" >&5
20120sed 's/^/| /' conftest.$ac_ext >&5
20121
Martin v. Löwiseba40652007-08-30 20:10:57 +000020122 { echo "$as_me:$LINENO: result: no" >&5
20123echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020124
20125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020126
20127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020128
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020129# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20131echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020133/* confdefs.h. */
20134_ACEOF
20135cat confdefs.h >>conftest.$ac_ext
20136cat >>conftest.$ac_ext <<_ACEOF
20137/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020138#include <sys/types.h>
20139#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020140int
20141main ()
20142{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020143struct sockaddr x;
20144x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020145 ;
20146 return 0;
20147}
20148_ACEOF
20149rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020150if { (ac_try="$ac_compile"
20151case "(($ac_try" in
20152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20153 *) ac_try_echo=$ac_try;;
20154esac
20155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20156 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020157 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020158 grep -v '^ *+' conftest.er1 >conftest.err
20159 rm -f conftest.er1
20160 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020162 (exit $ac_status); } && {
20163 test -z "$ac_c_werror_flag" ||
20164 test ! -s conftest.err
20165 } && test -s conftest.$ac_objext; then
20166 { echo "$as_me:$LINENO: result: yes" >&5
20167echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020168
20169cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020170#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020171_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020172
20173else
Martin v. Löwis11437992002-04-12 09:54:03 +000020174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020175sed 's/^/| /' conftest.$ac_ext >&5
20176
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177 { echo "$as_me:$LINENO: result: no" >&5
20178echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020180
20181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020182
Guido van Rossumda88dad1995-01-26 00:46:29 +000020183va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020184{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20185echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020186cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020187/* confdefs.h. */
20188_ACEOF
20189cat confdefs.h >>conftest.$ac_ext
20190cat >>conftest.$ac_ext <<_ACEOF
20191/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020192
20193#ifdef HAVE_STDARG_PROTOTYPES
20194#include <stdarg.h>
20195#else
20196#include <varargs.h>
20197#endif
20198
Martin v. Löwis11437992002-04-12 09:54:03 +000020199int
20200main ()
20201{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020202va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020203 ;
20204 return 0;
20205}
20206_ACEOF
20207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020208if { (ac_try="$ac_compile"
20209case "(($ac_try" in
20210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20211 *) ac_try_echo=$ac_try;;
20212esac
20213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020216 grep -v '^ *+' conftest.er1 >conftest.err
20217 rm -f conftest.er1
20218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020220 (exit $ac_status); } && {
20221 test -z "$ac_c_werror_flag" ||
20222 test ! -s conftest.err
20223 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020224 :
20225else
Martin v. Löwis11437992002-04-12 09:54:03 +000020226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020227sed 's/^/| /' conftest.$ac_ext >&5
20228
Martin v. Löwis11437992002-04-12 09:54:03 +000020229
20230
20231cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020232#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020233_ACEOF
20234
Guido van Rossumda88dad1995-01-26 00:46:29 +000020235 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020236
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020238
20239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20240{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20241echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020242
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020243# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020244
20245
20246
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20248echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020249if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20250 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020251else
Martin v. Löwis11437992002-04-12 09:54:03 +000020252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020253/* confdefs.h. */
20254_ACEOF
20255cat confdefs.h >>conftest.$ac_ext
20256cat >>conftest.$ac_ext <<_ACEOF
20257/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020258/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20259 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20260#define gethostbyname_r innocuous_gethostbyname_r
20261
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020262/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020263 which can conflict with char gethostbyname_r (); below.
20264 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020265 <limits.h> exists even on freestanding compilers. */
20266
20267#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020268# include <limits.h>
20269#else
20270# include <assert.h>
20271#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020272
20273#undef gethostbyname_r
20274
Martin v. Löwiseba40652007-08-30 20:10:57 +000020275/* Override any GCC internal prototype to avoid an error.
20276 Use char because int might match the return type of a GCC
20277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020278#ifdef __cplusplus
20279extern "C"
20280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020281char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020282/* The GNU C library defines this for functions which it implements
20283 to always fail with ENOSYS. Some functions are actually named
20284 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020285#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020286choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020287#endif
20288
Skip Montanaro6dead952003-09-25 14:50:04 +000020289int
20290main ()
20291{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020292return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020293 ;
20294 return 0;
20295}
20296_ACEOF
20297rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020298if { (ac_try="$ac_link"
20299case "(($ac_try" in
20300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20301 *) ac_try_echo=$ac_try;;
20302esac
20303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20304 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020306 grep -v '^ *+' conftest.er1 >conftest.err
20307 rm -f conftest.er1
20308 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020310 (exit $ac_status); } && {
20311 test -z "$ac_c_werror_flag" ||
20312 test ! -s conftest.err
20313 } && test -s conftest$ac_exeext &&
20314 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020316else
Martin v. Löwis11437992002-04-12 09:54:03 +000020317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020318sed 's/^/| /' conftest.$ac_ext >&5
20319
Martin v. Löwiseba40652007-08-30 20:10:57 +000020320 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020322
20323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020324 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020326{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20327echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020328if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020329
Martin v. Löwis11437992002-04-12 09:54:03 +000020330 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020331#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020332_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020333
Martin v. Löwiseba40652007-08-30 20:10:57 +000020334 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20335echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020336 OLD_CFLAGS=$CFLAGS
20337 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020339/* confdefs.h. */
20340_ACEOF
20341cat confdefs.h >>conftest.$ac_ext
20342cat >>conftest.$ac_ext <<_ACEOF
20343/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020344
20345# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020346
Martin v. Löwis11437992002-04-12 09:54:03 +000020347int
20348main ()
20349{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020350
20351 char *name;
20352 struct hostent *he, *res;
20353 char buffer[2048];
20354 int buflen = 2048;
20355 int h_errnop;
20356
20357 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020358
20359 ;
20360 return 0;
20361}
20362_ACEOF
20363rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020364if { (ac_try="$ac_compile"
20365case "(($ac_try" in
20366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20367 *) ac_try_echo=$ac_try;;
20368esac
20369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20370 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020372 grep -v '^ *+' conftest.er1 >conftest.err
20373 rm -f conftest.er1
20374 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020376 (exit $ac_status); } && {
20377 test -z "$ac_c_werror_flag" ||
20378 test ! -s conftest.err
20379 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020380
20381 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020382#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020383_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020384
Martin v. Löwis11437992002-04-12 09:54:03 +000020385
20386cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020387#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020388_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020389
Martin v. Löwiseba40652007-08-30 20:10:57 +000020390 { echo "$as_me:$LINENO: result: yes" >&5
20391echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020393else
Martin v. Löwis11437992002-04-12 09:54:03 +000020394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020395sed 's/^/| /' conftest.$ac_ext >&5
20396
Martin v. Löwis11437992002-04-12 09:54:03 +000020397
Martin v. Löwiseba40652007-08-30 20:10:57 +000020398 { echo "$as_me:$LINENO: result: no" >&5
20399echo "${ECHO_T}no" >&6; }
20400 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20401echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020403/* confdefs.h. */
20404_ACEOF
20405cat confdefs.h >>conftest.$ac_ext
20406cat >>conftest.$ac_ext <<_ACEOF
20407/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020408
20409# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020410
Martin v. Löwis11437992002-04-12 09:54:03 +000020411int
20412main ()
20413{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020414
20415 char *name;
20416 struct hostent *he;
20417 char buffer[2048];
20418 int buflen = 2048;
20419 int h_errnop;
20420
20421 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020422
20423 ;
20424 return 0;
20425}
20426_ACEOF
20427rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020428if { (ac_try="$ac_compile"
20429case "(($ac_try" in
20430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20431 *) ac_try_echo=$ac_try;;
20432esac
20433eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20434 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020436 grep -v '^ *+' conftest.er1 >conftest.err
20437 rm -f conftest.er1
20438 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020440 (exit $ac_status); } && {
20441 test -z "$ac_c_werror_flag" ||
20442 test ! -s conftest.err
20443 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020444
20445 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020446#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020447_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020448
Martin v. Löwis11437992002-04-12 09:54:03 +000020449
20450cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020451#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020452_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020453
Martin v. Löwiseba40652007-08-30 20:10:57 +000020454 { echo "$as_me:$LINENO: result: yes" >&5
20455echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020456
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020457else
Martin v. Löwis11437992002-04-12 09:54:03 +000020458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020459sed 's/^/| /' conftest.$ac_ext >&5
20460
Martin v. Löwis11437992002-04-12 09:54:03 +000020461
Martin v. Löwiseba40652007-08-30 20:10:57 +000020462 { echo "$as_me:$LINENO: result: no" >&5
20463echo "${ECHO_T}no" >&6; }
20464 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20465echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020467/* confdefs.h. */
20468_ACEOF
20469cat confdefs.h >>conftest.$ac_ext
20470cat >>conftest.$ac_ext <<_ACEOF
20471/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020472
20473# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020474
Martin v. Löwis11437992002-04-12 09:54:03 +000020475int
20476main ()
20477{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020478
20479 char *name;
20480 struct hostent *he;
20481 struct hostent_data data;
20482
20483 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020484
20485 ;
20486 return 0;
20487}
20488_ACEOF
20489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020490if { (ac_try="$ac_compile"
20491case "(($ac_try" in
20492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20493 *) ac_try_echo=$ac_try;;
20494esac
20495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020498 grep -v '^ *+' conftest.er1 >conftest.err
20499 rm -f conftest.er1
20500 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502 (exit $ac_status); } && {
20503 test -z "$ac_c_werror_flag" ||
20504 test ! -s conftest.err
20505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020506
20507 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020508#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020509_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020510
Martin v. Löwis11437992002-04-12 09:54:03 +000020511
20512cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020513#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020514_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020515
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516 { echo "$as_me:$LINENO: result: yes" >&5
20517echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020518
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020519else
Martin v. Löwis11437992002-04-12 09:54:03 +000020520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020521sed 's/^/| /' conftest.$ac_ext >&5
20522
Martin v. Löwis11437992002-04-12 09:54:03 +000020523
Martin v. Löwiseba40652007-08-30 20:10:57 +000020524 { echo "$as_me:$LINENO: result: no" >&5
20525echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020528
20529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020530
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020532
20533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020534
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020536
20537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020538 CFLAGS=$OLD_CFLAGS
20539
20540else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020541
Martin v. Löwis11437992002-04-12 09:54:03 +000020542
20543for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020544do
Martin v. Löwis11437992002-04-12 09:54:03 +000020545as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020546{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20547echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20548if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020550else
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020552/* confdefs.h. */
20553_ACEOF
20554cat confdefs.h >>conftest.$ac_ext
20555cat >>conftest.$ac_ext <<_ACEOF
20556/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020557/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20558 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20559#define $ac_func innocuous_$ac_func
20560
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020561/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020562 which can conflict with char $ac_func (); below.
20563 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020564 <limits.h> exists even on freestanding compilers. */
20565
20566#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020567# include <limits.h>
20568#else
20569# include <assert.h>
20570#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020571
20572#undef $ac_func
20573
Martin v. Löwiseba40652007-08-30 20:10:57 +000020574/* Override any GCC internal prototype to avoid an error.
20575 Use char because int might match the return type of a GCC
20576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020577#ifdef __cplusplus
20578extern "C"
20579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020580char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020581/* The GNU C library defines this for functions which it implements
20582 to always fail with ENOSYS. Some functions are actually named
20583 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020584#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020585choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020586#endif
20587
Skip Montanaro6dead952003-09-25 14:50:04 +000020588int
20589main ()
20590{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020591return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 ;
20593 return 0;
20594}
20595_ACEOF
20596rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020597if { (ac_try="$ac_link"
20598case "(($ac_try" in
20599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20600 *) ac_try_echo=$ac_try;;
20601esac
20602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20603 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020605 grep -v '^ *+' conftest.er1 >conftest.err
20606 rm -f conftest.er1
20607 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020609 (exit $ac_status); } && {
20610 test -z "$ac_c_werror_flag" ||
20611 test ! -s conftest.err
20612 } && test -s conftest$ac_exeext &&
20613 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020614 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020615else
Martin v. Löwis11437992002-04-12 09:54:03 +000020616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020617sed 's/^/| /' conftest.$ac_ext >&5
20618
Martin v. Löwiseba40652007-08-30 20:10:57 +000020619 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020621
20622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020623 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625ac_res=`eval echo '${'$as_ac_var'}'`
20626 { echo "$as_me:$LINENO: result: $ac_res" >&5
20627echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020628if test `eval echo '${'$as_ac_var'}'` = yes; then
20629 cat >>confdefs.h <<_ACEOF
20630#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20631_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020632
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020633fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020634done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020635
Michael W. Hudson54241132001-12-07 15:38:26 +000020636
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020637fi
20638
Michael W. Hudson54241132001-12-07 15:38:26 +000020639
20640
20641
20642
20643
20644
Guido van Rossum627b2d71993-12-24 10:39:16 +000020645# checks for system services
20646# (none yet)
20647
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020648# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020649{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20650echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020651if test "${ac_cv_func___fpu_control+set}" = set; then
20652 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020653else
Martin v. Löwis11437992002-04-12 09:54:03 +000020654 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020655/* confdefs.h. */
20656_ACEOF
20657cat confdefs.h >>conftest.$ac_ext
20658cat >>conftest.$ac_ext <<_ACEOF
20659/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020660/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20661 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20662#define __fpu_control innocuous___fpu_control
20663
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020664/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020665 which can conflict with char __fpu_control (); below.
20666 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020667 <limits.h> exists even on freestanding compilers. */
20668
20669#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020670# include <limits.h>
20671#else
20672# include <assert.h>
20673#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020674
20675#undef __fpu_control
20676
Martin v. Löwiseba40652007-08-30 20:10:57 +000020677/* Override any GCC internal prototype to avoid an error.
20678 Use char because int might match the return type of a GCC
20679 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020680#ifdef __cplusplus
20681extern "C"
20682#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020683char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020684/* The GNU C library defines this for functions which it implements
20685 to always fail with ENOSYS. Some functions are actually named
20686 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020688choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020689#endif
20690
Skip Montanaro6dead952003-09-25 14:50:04 +000020691int
20692main ()
20693{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020694return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020695 ;
20696 return 0;
20697}
20698_ACEOF
20699rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020700if { (ac_try="$ac_link"
20701case "(($ac_try" in
20702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20703 *) ac_try_echo=$ac_try;;
20704esac
20705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20706 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020708 grep -v '^ *+' conftest.er1 >conftest.err
20709 rm -f conftest.er1
20710 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020712 (exit $ac_status); } && {
20713 test -z "$ac_c_werror_flag" ||
20714 test ! -s conftest.err
20715 } && test -s conftest$ac_exeext &&
20716 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020717 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020718else
Martin v. Löwis11437992002-04-12 09:54:03 +000020719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020720sed 's/^/| /' conftest.$ac_ext >&5
20721
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020724
20725rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020726 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020728{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20729echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020730if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020731 :
20732else
Martin v. Löwis11437992002-04-12 09:54:03 +000020733
Martin v. Löwiseba40652007-08-30 20:10:57 +000020734{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20735echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020736if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020738else
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020740LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020742/* confdefs.h. */
20743_ACEOF
20744cat confdefs.h >>conftest.$ac_ext
20745cat >>conftest.$ac_ext <<_ACEOF
20746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020747
Martin v. Löwiseba40652007-08-30 20:10:57 +000020748/* Override any GCC internal prototype to avoid an error.
20749 Use char because int might match the return type of a GCC
20750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020751#ifdef __cplusplus
20752extern "C"
20753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020754char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020755int
20756main ()
20757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020758return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020759 ;
20760 return 0;
20761}
20762_ACEOF
20763rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020764if { (ac_try="$ac_link"
20765case "(($ac_try" in
20766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20767 *) ac_try_echo=$ac_try;;
20768esac
20769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20770 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020772 grep -v '^ *+' conftest.er1 >conftest.err
20773 rm -f conftest.er1
20774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020776 (exit $ac_status); } && {
20777 test -z "$ac_c_werror_flag" ||
20778 test ! -s conftest.err
20779 } && test -s conftest$ac_exeext &&
20780 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020781 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020782else
Martin v. Löwis11437992002-04-12 09:54:03 +000020783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020784sed 's/^/| /' conftest.$ac_ext >&5
20785
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020787fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020788
20789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020791LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020793{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20794echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020795if test $ac_cv_lib_ieee___fpu_control = yes; then
20796 cat >>confdefs.h <<_ACEOF
20797#define HAVE_LIBIEEE 1
20798_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020799
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020800 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020801
Guido van Rossum627b2d71993-12-24 10:39:16 +000020802fi
20803
Michael W. Hudson54241132001-12-07 15:38:26 +000020804
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020805fi
20806
Michael W. Hudson54241132001-12-07 15:38:26 +000020807
Guido van Rossum7f253911997-05-09 02:42:48 +000020808# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20810echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020811
Martin v. Löwiseba40652007-08-30 20:10:57 +000020812# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020813if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020814 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020815if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020816then
20817
20818cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020819#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020820_ACEOF
20821
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822 { echo "$as_me:$LINENO: result: yes" >&5
20823echo "${ECHO_T}yes" >&6; }
20824else { echo "$as_me:$LINENO: result: no" >&5
20825echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020826fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020827else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020828 { echo "$as_me:$LINENO: result: no" >&5
20829echo "${ECHO_T}no" >&6; }
20830fi
20831
Guido van Rossum7f253911997-05-09 02:42:48 +000020832
Guido van Rossum7f43da71994-08-01 12:15:30 +000020833# check for --with-libm=...
20834
Guido van Rossum563e7081996-09-10 18:20:48 +000020835case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020836Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020837BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020838*) LIBM=-lm
20839esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020840{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20841echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020842
Martin v. Löwiseba40652007-08-30 20:10:57 +000020843# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020844if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020845 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020846if test "$withval" = no
20847then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20849echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020850elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020851then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020852 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20853echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020854else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20855echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20856 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020857fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020858else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020859 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20860echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20861fi
20862
Guido van Rossum7f43da71994-08-01 12:15:30 +000020863
20864# check for --with-libc=...
20865
Martin v. Löwiseba40652007-08-30 20:10:57 +000020866{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20867echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020868
Martin v. Löwiseba40652007-08-30 20:10:57 +000020869# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020870if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020871 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020872if test "$withval" = no
20873then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020874 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20875echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020876elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020877then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020878 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20879echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020880else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20881echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20882 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020883fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020884else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20886echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20887fi
20888
Guido van Rossum7f43da71994-08-01 12:15:30 +000020889
Christian Heimes0a8143f2007-12-18 23:22:54 +000020890# ************************************
20891# * Check for mathematical functions *
20892# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000020893
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020894LIBS_SAVE=$LIBS
20895LIBS="$LIBS $LIBM"
20896
Mark Dickinson265d7382008-04-21 22:32:24 +000020897# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
20898# -0. on some architectures.
20899{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
20900echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
20901if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
20902 echo $ECHO_N "(cached) $ECHO_C" >&6
20903else
20904
20905if test "$cross_compiling" = yes; then
20906 ac_cv_tanh_preserves_zero_sign=no
20907else
20908 cat >conftest.$ac_ext <<_ACEOF
20909/* confdefs.h. */
20910_ACEOF
20911cat confdefs.h >>conftest.$ac_ext
20912cat >>conftest.$ac_ext <<_ACEOF
20913/* end confdefs.h. */
20914
20915#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000020916#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000020917int main() {
20918 /* return 0 if either negative zeros don't exist
20919 on this platform or if negative zeros exist
20920 and tanh(-0.) == -0. */
20921 if (atan2(0., -1.) == atan2(-0., -1.) ||
20922 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
20923 else exit(1);
20924}
20925
20926_ACEOF
20927rm -f conftest$ac_exeext
20928if { (ac_try="$ac_link"
20929case "(($ac_try" in
20930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20931 *) ac_try_echo=$ac_try;;
20932esac
20933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20934 (eval "$ac_link") 2>&5
20935 ac_status=$?
20936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20938 { (case "(($ac_try" in
20939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20940 *) ac_try_echo=$ac_try;;
20941esac
20942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20943 (eval "$ac_try") 2>&5
20944 ac_status=$?
20945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20946 (exit $ac_status); }; }; then
20947 ac_cv_tanh_preserves_zero_sign=yes
20948else
20949 echo "$as_me: program exited with status $ac_status" >&5
20950echo "$as_me: failed program was:" >&5
20951sed 's/^/| /' conftest.$ac_ext >&5
20952
20953( exit $ac_status )
20954ac_cv_tanh_preserves_zero_sign=no
20955fi
20956rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20957fi
20958
20959
20960fi
20961
20962{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
20963echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
20964if test "$ac_cv_tanh_preserves_zero_sign" = yes
20965then
20966
20967cat >>confdefs.h <<\_ACEOF
20968#define TANH_PRESERVES_ZERO_SIGN 1
20969_ACEOF
20970
20971fi
20972
Martin v. Löwis11437992002-04-12 09:54:03 +000020973
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020974for ac_func in hypot
20975do
Martin v. Löwis11437992002-04-12 09:54:03 +000020976as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020977{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20978echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20979if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020980 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020981else
Martin v. Löwis11437992002-04-12 09:54:03 +000020982 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020983/* confdefs.h. */
20984_ACEOF
20985cat confdefs.h >>conftest.$ac_ext
20986cat >>conftest.$ac_ext <<_ACEOF
20987/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020988/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20989 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20990#define $ac_func innocuous_$ac_func
20991
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020992/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020993 which can conflict with char $ac_func (); below.
20994 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020995 <limits.h> exists even on freestanding compilers. */
20996
20997#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020998# include <limits.h>
20999#else
21000# include <assert.h>
21001#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021002
21003#undef $ac_func
21004
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005/* Override any GCC internal prototype to avoid an error.
21006 Use char because int might match the return type of a GCC
21007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021008#ifdef __cplusplus
21009extern "C"
21010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021011char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021012/* The GNU C library defines this for functions which it implements
21013 to always fail with ENOSYS. Some functions are actually named
21014 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021015#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021016choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021017#endif
21018
Skip Montanaro6dead952003-09-25 14:50:04 +000021019int
21020main ()
21021{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021022return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021023 ;
21024 return 0;
21025}
21026_ACEOF
21027rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021028if { (ac_try="$ac_link"
21029case "(($ac_try" in
21030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21031 *) ac_try_echo=$ac_try;;
21032esac
21033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21034 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021036 grep -v '^ *+' conftest.er1 >conftest.err
21037 rm -f conftest.er1
21038 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021040 (exit $ac_status); } && {
21041 test -z "$ac_c_werror_flag" ||
21042 test ! -s conftest.err
21043 } && test -s conftest$ac_exeext &&
21044 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021045 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021046else
Martin v. Löwis11437992002-04-12 09:54:03 +000021047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021048sed 's/^/| /' conftest.$ac_ext >&5
21049
Martin v. Löwiseba40652007-08-30 20:10:57 +000021050 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021052
21053rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021054 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021056ac_res=`eval echo '${'$as_ac_var'}'`
21057 { echo "$as_me:$LINENO: result: $ac_res" >&5
21058echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021059if test `eval echo '${'$as_ac_var'}'` = yes; then
21060 cat >>confdefs.h <<_ACEOF
21061#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21062_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000021063
Michael W. Hudson54241132001-12-07 15:38:26 +000021064else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021065 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021066 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021067 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
21068 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021069esac
21070
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021071fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021072done
21073
Michael W. Hudson54241132001-12-07 15:38:26 +000021074
Christian Heimes0a8143f2007-12-18 23:22:54 +000021075
21076
21077
21078
21079
Christian Heimes48723512008-01-20 14:28:28 +000021080
21081
21082
21083
21084
21085for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021086do
21087as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21088{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21089echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21090if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21091 echo $ECHO_N "(cached) $ECHO_C" >&6
21092else
21093 cat >conftest.$ac_ext <<_ACEOF
21094/* confdefs.h. */
21095_ACEOF
21096cat confdefs.h >>conftest.$ac_ext
21097cat >>conftest.$ac_ext <<_ACEOF
21098/* end confdefs.h. */
21099/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21100 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21101#define $ac_func innocuous_$ac_func
21102
21103/* System header to define __stub macros and hopefully few prototypes,
21104 which can conflict with char $ac_func (); below.
21105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21106 <limits.h> exists even on freestanding compilers. */
21107
21108#ifdef __STDC__
21109# include <limits.h>
21110#else
21111# include <assert.h>
21112#endif
21113
21114#undef $ac_func
21115
21116/* Override any GCC internal prototype to avoid an error.
21117 Use char because int might match the return type of a GCC
21118 builtin and then its argument prototype would still apply. */
21119#ifdef __cplusplus
21120extern "C"
21121#endif
21122char $ac_func ();
21123/* The GNU C library defines this for functions which it implements
21124 to always fail with ENOSYS. Some functions are actually named
21125 something starting with __ and the normal name is an alias. */
21126#if defined __stub_$ac_func || defined __stub___$ac_func
21127choke me
21128#endif
21129
21130int
21131main ()
21132{
21133return $ac_func ();
21134 ;
21135 return 0;
21136}
21137_ACEOF
21138rm -f conftest.$ac_objext conftest$ac_exeext
21139if { (ac_try="$ac_link"
21140case "(($ac_try" in
21141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21142 *) ac_try_echo=$ac_try;;
21143esac
21144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21145 (eval "$ac_link") 2>conftest.er1
21146 ac_status=$?
21147 grep -v '^ *+' conftest.er1 >conftest.err
21148 rm -f conftest.er1
21149 cat conftest.err >&5
21150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21151 (exit $ac_status); } && {
21152 test -z "$ac_c_werror_flag" ||
21153 test ! -s conftest.err
21154 } && test -s conftest$ac_exeext &&
21155 $as_test_x conftest$ac_exeext; then
21156 eval "$as_ac_var=yes"
21157else
21158 echo "$as_me: failed program was:" >&5
21159sed 's/^/| /' conftest.$ac_ext >&5
21160
21161 eval "$as_ac_var=no"
21162fi
21163
21164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21165 conftest$ac_exeext conftest.$ac_ext
21166fi
21167ac_res=`eval echo '${'$as_ac_var'}'`
21168 { echo "$as_me:$LINENO: result: $ac_res" >&5
21169echo "${ECHO_T}$ac_res" >&6; }
21170if test `eval echo '${'$as_ac_var'}'` = yes; then
21171 cat >>confdefs.h <<_ACEOF
21172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21173_ACEOF
21174
21175fi
21176done
21177
21178
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021179LIBS=$LIBS_SAVE
21180
Guido van Rossumef2255b2000-03-10 22:30:29 +000021181# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021182if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021183 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21184echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021185if test "${ac_cv_header_wchar_h+set}" = set; then
21186 echo $ECHO_N "(cached) $ECHO_C" >&6
21187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021188{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21189echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021190else
Martin v. Löwis11437992002-04-12 09:54:03 +000021191 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021192{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21193echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021195/* confdefs.h. */
21196_ACEOF
21197cat confdefs.h >>conftest.$ac_ext
21198cat >>conftest.$ac_ext <<_ACEOF
21199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021200$ac_includes_default
21201#include <wchar.h>
21202_ACEOF
21203rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021204if { (ac_try="$ac_compile"
21205case "(($ac_try" in
21206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21207 *) ac_try_echo=$ac_try;;
21208esac
21209eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21210 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021212 grep -v '^ *+' conftest.er1 >conftest.err
21213 rm -f conftest.er1
21214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021216 (exit $ac_status); } && {
21217 test -z "$ac_c_werror_flag" ||
21218 test ! -s conftest.err
21219 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021220 ac_header_compiler=yes
21221else
21222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021223sed 's/^/| /' conftest.$ac_ext >&5
21224
Martin v. Löwiseba40652007-08-30 20:10:57 +000021225 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021227
21228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21229{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21230echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021231
21232# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021233{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21234echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021235cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021236/* confdefs.h. */
21237_ACEOF
21238cat confdefs.h >>conftest.$ac_ext
21239cat >>conftest.$ac_ext <<_ACEOF
21240/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021241#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021242_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243if { (ac_try="$ac_cpp conftest.$ac_ext"
21244case "(($ac_try" in
21245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21246 *) ac_try_echo=$ac_try;;
21247esac
21248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21249 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021250 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021251 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021252 rm -f conftest.er1
21253 cat conftest.err >&5
21254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021255 (exit $ac_status); } >/dev/null && {
21256 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21257 test ! -s conftest.err
21258 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021259 ac_header_preproc=yes
21260else
21261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021262sed 's/^/| /' conftest.$ac_ext >&5
21263
Martin v. Löwis11437992002-04-12 09:54:03 +000021264 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021266
Martin v. Löwis11437992002-04-12 09:54:03 +000021267rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021268{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21269echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021270
21271# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021272case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21273 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021274 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21275echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021276 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21277echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21278 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021279 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021280 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021281 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21282echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021283 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21284echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21285 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21286echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21287 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21288echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021289 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21290echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021291 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21292echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021293 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021294## ------------------------------------------------ ##
21295## Report this to http://www.python.org/python-bugs ##
21296## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021297_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021298 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021299 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021300esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021301{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21302echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021303if test "${ac_cv_header_wchar_h+set}" = set; then
21304 echo $ECHO_N "(cached) $ECHO_C" >&6
21305else
21306 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021308{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21309echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021310
21311fi
21312if test $ac_cv_header_wchar_h = yes; then
21313
21314
21315cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021316#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021317_ACEOF
21318
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021319 wchar_h="yes"
21320
Guido van Rossumef2255b2000-03-10 22:30:29 +000021321else
Martin v. Löwis11437992002-04-12 09:54:03 +000021322 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021323
21324fi
21325
Michael W. Hudson54241132001-12-07 15:38:26 +000021326
Martin v. Löwis11437992002-04-12 09:54:03 +000021327
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021328# determine wchar_t size
21329if test "$wchar_h" = yes
21330then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21332echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021333if test "${ac_cv_type_wchar_t+set}" = set; then
21334 echo $ECHO_N "(cached) $ECHO_C" >&6
21335else
21336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021337/* confdefs.h. */
21338_ACEOF
21339cat confdefs.h >>conftest.$ac_ext
21340cat >>conftest.$ac_ext <<_ACEOF
21341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021342#include <wchar.h>
21343
Martin v. Löwiseba40652007-08-30 20:10:57 +000021344typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021345int
21346main ()
21347{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021350if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021351 return 0;
21352 ;
21353 return 0;
21354}
21355_ACEOF
21356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021357if { (ac_try="$ac_compile"
21358case "(($ac_try" in
21359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21360 *) ac_try_echo=$ac_try;;
21361esac
21362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021365 grep -v '^ *+' conftest.er1 >conftest.err
21366 rm -f conftest.er1
21367 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021369 (exit $ac_status); } && {
21370 test -z "$ac_c_werror_flag" ||
21371 test ! -s conftest.err
21372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021373 ac_cv_type_wchar_t=yes
21374else
21375 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021376sed 's/^/| /' conftest.$ac_ext >&5
21377
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021379fi
Brett Cannon19fab762007-06-02 03:02:29 +000021380
Martin v. Löwiseba40652007-08-30 20:10:57 +000021381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21382fi
21383{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21384echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21385
21386# The cast to long int works around a bug in the HP C Compiler
21387# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21388# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21389# This bug is HP SR number 8606223364.
21390{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21391echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021392if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21393 echo $ECHO_N "(cached) $ECHO_C" >&6
21394else
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 if test "$cross_compiling" = yes; then
21396 # Depending upon the size, compute the lo and hi bounds.
21397cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021398/* confdefs.h. */
21399_ACEOF
21400cat confdefs.h >>conftest.$ac_ext
21401cat >>conftest.$ac_ext <<_ACEOF
21402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021403#include <wchar.h>
21404
Martin v. Löwiseba40652007-08-30 20:10:57 +000021405 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021406int
21407main ()
21408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021410test_array [0] = 0
21411
21412 ;
21413 return 0;
21414}
21415_ACEOF
21416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021417if { (ac_try="$ac_compile"
21418case "(($ac_try" in
21419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21420 *) ac_try_echo=$ac_try;;
21421esac
21422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021425 grep -v '^ *+' conftest.er1 >conftest.err
21426 rm -f conftest.er1
21427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021429 (exit $ac_status); } && {
21430 test -z "$ac_c_werror_flag" ||
21431 test ! -s conftest.err
21432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 ac_lo=0 ac_mid=0
21434 while :; do
21435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021436/* confdefs.h. */
21437_ACEOF
21438cat confdefs.h >>conftest.$ac_ext
21439cat >>conftest.$ac_ext <<_ACEOF
21440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021441#include <wchar.h>
21442
Martin v. Löwiseba40652007-08-30 20:10:57 +000021443 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021444int
21445main ()
21446{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021447static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021448test_array [0] = 0
21449
21450 ;
21451 return 0;
21452}
21453_ACEOF
21454rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021455if { (ac_try="$ac_compile"
21456case "(($ac_try" in
21457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21458 *) ac_try_echo=$ac_try;;
21459esac
21460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21461 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021463 grep -v '^ *+' conftest.er1 >conftest.err
21464 rm -f conftest.er1
21465 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021467 (exit $ac_status); } && {
21468 test -z "$ac_c_werror_flag" ||
21469 test ! -s conftest.err
21470 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021471 ac_hi=$ac_mid; break
21472else
21473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021474sed 's/^/| /' conftest.$ac_ext >&5
21475
Martin v. Löwiseba40652007-08-30 20:10:57 +000021476 ac_lo=`expr $ac_mid + 1`
21477 if test $ac_lo -le $ac_mid; then
21478 ac_lo= ac_hi=
21479 break
21480 fi
21481 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483
21484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021485 done
21486else
21487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021488sed 's/^/| /' conftest.$ac_ext >&5
21489
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021491/* confdefs.h. */
21492_ACEOF
21493cat confdefs.h >>conftest.$ac_ext
21494cat >>conftest.$ac_ext <<_ACEOF
21495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021496#include <wchar.h>
21497
Martin v. Löwiseba40652007-08-30 20:10:57 +000021498 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021499int
21500main ()
21501{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021502static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021503test_array [0] = 0
21504
21505 ;
21506 return 0;
21507}
21508_ACEOF
21509rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021510if { (ac_try="$ac_compile"
21511case "(($ac_try" in
21512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21513 *) ac_try_echo=$ac_try;;
21514esac
21515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21516 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021518 grep -v '^ *+' conftest.er1 >conftest.err
21519 rm -f conftest.er1
21520 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021522 (exit $ac_status); } && {
21523 test -z "$ac_c_werror_flag" ||
21524 test ! -s conftest.err
21525 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021526 ac_hi=-1 ac_mid=-1
21527 while :; do
21528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021529/* confdefs.h. */
21530_ACEOF
21531cat confdefs.h >>conftest.$ac_ext
21532cat >>conftest.$ac_ext <<_ACEOF
21533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021534#include <wchar.h>
21535
Martin v. Löwiseba40652007-08-30 20:10:57 +000021536 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021537int
21538main ()
21539{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021540static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021541test_array [0] = 0
21542
21543 ;
21544 return 0;
21545}
21546_ACEOF
21547rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021548if { (ac_try="$ac_compile"
21549case "(($ac_try" in
21550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21551 *) ac_try_echo=$ac_try;;
21552esac
21553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021556 grep -v '^ *+' conftest.er1 >conftest.err
21557 rm -f conftest.er1
21558 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021560 (exit $ac_status); } && {
21561 test -z "$ac_c_werror_flag" ||
21562 test ! -s conftest.err
21563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021564 ac_lo=$ac_mid; break
21565else
21566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021567sed 's/^/| /' conftest.$ac_ext >&5
21568
Martin v. Löwiseba40652007-08-30 20:10:57 +000021569 ac_hi=`expr '(' $ac_mid ')' - 1`
21570 if test $ac_mid -le $ac_hi; then
21571 ac_lo= ac_hi=
21572 break
21573 fi
21574 ac_mid=`expr 2 '*' $ac_mid`
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 +000021578 done
21579else
21580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021581sed 's/^/| /' conftest.$ac_ext >&5
21582
Martin v. Löwiseba40652007-08-30 20:10:57 +000021583 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021585
21586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021588
21589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021590# Binary search between lo and hi bounds.
21591while test "x$ac_lo" != "x$ac_hi"; do
21592 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021594/* confdefs.h. */
21595_ACEOF
21596cat confdefs.h >>conftest.$ac_ext
21597cat >>conftest.$ac_ext <<_ACEOF
21598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021599#include <wchar.h>
21600
Martin v. Löwiseba40652007-08-30 20:10:57 +000021601 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021602int
21603main ()
21604{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021606test_array [0] = 0
21607
21608 ;
21609 return 0;
21610}
21611_ACEOF
21612rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021613if { (ac_try="$ac_compile"
21614case "(($ac_try" in
21615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21616 *) ac_try_echo=$ac_try;;
21617esac
21618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21619 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021621 grep -v '^ *+' conftest.er1 >conftest.err
21622 rm -f conftest.er1
21623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021625 (exit $ac_status); } && {
21626 test -z "$ac_c_werror_flag" ||
21627 test ! -s conftest.err
21628 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021629 ac_hi=$ac_mid
21630else
21631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021632sed 's/^/| /' conftest.$ac_ext >&5
21633
Martin v. Löwiseba40652007-08-30 20:10:57 +000021634 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021636
21637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021638done
21639case $ac_lo in
21640?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021641'') if test "$ac_cv_type_wchar_t" = yes; then
21642 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021643See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021644echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021645See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021646 { (exit 77); exit 77; }; }
21647 else
21648 ac_cv_sizeof_wchar_t=0
21649 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021650esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021651else
Martin v. Löwis11437992002-04-12 09:54:03 +000021652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021653/* confdefs.h. */
21654_ACEOF
21655cat confdefs.h >>conftest.$ac_ext
21656cat >>conftest.$ac_ext <<_ACEOF
21657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021658#include <wchar.h>
21659
Martin v. Löwiseba40652007-08-30 20:10:57 +000021660 typedef wchar_t ac__type_sizeof_;
21661static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21662static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021663#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021664#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021665int
21666main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021667{
Martin v. Löwis11437992002-04-12 09:54:03 +000021668
21669 FILE *f = fopen ("conftest.val", "w");
21670 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021671 return 1;
21672 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021673 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674 long int i = longval ();
21675 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21676 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021677 fprintf (f, "%ld\n", i);
21678 }
21679 else
21680 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021681 unsigned long int i = ulongval ();
21682 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21683 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021684 fprintf (f, "%lu\n", i);
21685 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021686 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021687
21688 ;
21689 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021690}
Martin v. Löwis11437992002-04-12 09:54:03 +000021691_ACEOF
21692rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021693if { (ac_try="$ac_link"
21694case "(($ac_try" in
21695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21696 *) ac_try_echo=$ac_try;;
21697esac
21698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21699 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021700 ac_status=$?
21701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021703 { (case "(($ac_try" in
21704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21705 *) ac_try_echo=$ac_try;;
21706esac
21707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21708 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021709 ac_status=$?
21710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21711 (exit $ac_status); }; }; then
21712 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021713else
Martin v. Löwis11437992002-04-12 09:54:03 +000021714 echo "$as_me: program exited with status $ac_status" >&5
21715echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021716sed 's/^/| /' conftest.$ac_ext >&5
21717
Martin v. Löwis11437992002-04-12 09:54:03 +000021718( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021719if test "$ac_cv_type_wchar_t" = yes; then
21720 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021721See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021722echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021723See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021724 { (exit 77); exit 77; }; }
21725 else
21726 ac_cv_sizeof_wchar_t=0
21727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021729rm -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 +000021730fi
21731rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021732fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021733{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21734echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21735
21736
21737
Martin v. Löwis11437992002-04-12 09:54:03 +000021738cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021739#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021740_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021741
Michael W. Hudson54241132001-12-07 15:38:26 +000021742
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021743fi
21744
Martin v. Löwiseba40652007-08-30 20:10:57 +000021745{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21746echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021747have_ucs4_tcl=no
21748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021749/* confdefs.h. */
21750_ACEOF
21751cat confdefs.h >>conftest.$ac_ext
21752cat >>conftest.$ac_ext <<_ACEOF
21753/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021754
21755#include <tcl.h>
21756#if TCL_UTF_MAX != 6
21757# error "NOT UCS4_TCL"
21758#endif
21759int
21760main ()
21761{
21762
21763 ;
21764 return 0;
21765}
21766_ACEOF
21767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021768if { (ac_try="$ac_compile"
21769case "(($ac_try" in
21770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21771 *) ac_try_echo=$ac_try;;
21772esac
21773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021776 grep -v '^ *+' conftest.er1 >conftest.err
21777 rm -f conftest.er1
21778 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021780 (exit $ac_status); } && {
21781 test -z "$ac_c_werror_flag" ||
21782 test ! -s conftest.err
21783 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021784
21785
21786cat >>confdefs.h <<\_ACEOF
21787#define HAVE_UCS4_TCL 1
21788_ACEOF
21789
21790 have_ucs4_tcl=yes
21791
21792else
21793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021794sed 's/^/| /' conftest.$ac_ext >&5
21795
Martin v. Löwiseba40652007-08-30 20:10:57 +000021796
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021798
21799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21800{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21801echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021802
Skip Montanaro6dead952003-09-25 14:50:04 +000021803# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021804if test "$wchar_h" = yes
21805then
21806 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21808echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021809 if test "${ac_cv_wchar_t_signed+set}" = set; then
21810 echo $ECHO_N "(cached) $ECHO_C" >&6
21811else
21812
21813 if test "$cross_compiling" = yes; then
21814 ac_cv_wchar_t_signed=yes
21815else
21816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021817/* confdefs.h. */
21818_ACEOF
21819cat confdefs.h >>conftest.$ac_ext
21820cat >>conftest.$ac_ext <<_ACEOF
21821/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021822
21823 #include <wchar.h>
21824 int main()
21825 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021826 /* Success: exit code 0 */
21827 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021828 }
21829
21830_ACEOF
21831rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021832if { (ac_try="$ac_link"
21833case "(($ac_try" in
21834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21835 *) ac_try_echo=$ac_try;;
21836esac
21837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21838 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021839 ac_status=$?
21840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021842 { (case "(($ac_try" in
21843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21844 *) ac_try_echo=$ac_try;;
21845esac
21846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21847 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021848 ac_status=$?
21849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21850 (exit $ac_status); }; }; then
21851 ac_cv_wchar_t_signed=yes
21852else
21853 echo "$as_me: program exited with status $ac_status" >&5
21854echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021855sed 's/^/| /' conftest.$ac_ext >&5
21856
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021857( exit $ac_status )
21858ac_cv_wchar_t_signed=no
21859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021860rm -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 +000021861fi
21862
Martin v. Löwiseba40652007-08-30 20:10:57 +000021863
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021864fi
21865
Martin v. Löwiseba40652007-08-30 20:10:57 +000021866 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21867echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21868fi
21869
21870{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21871echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21872# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021873if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021875else
21876 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021877fi
21878
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021879
21880if test $enable_unicode = yes
21881then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021882 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021883 case "$have_ucs4_tcl" in
21884 yes) enable_unicode="ucs4"
21885 ;;
21886 *) enable_unicode="ucs2"
21887 ;;
21888 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021889fi
21890
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021891
21892
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021893case "$enable_unicode" in
21894ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021895 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021896#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021897_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021898
21899 ;;
21900ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021901 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021902#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021903_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021904
21905 ;;
21906esac
21907
Michael W. Hudson54241132001-12-07 15:38:26 +000021908
Martin v. Löwis11437992002-04-12 09:54:03 +000021909
21910
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021911
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021912if test "$enable_unicode" = "no"
21913then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021914 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021915 { echo "$as_me:$LINENO: result: not used" >&5
21916echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021917else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021918 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021919
21920cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021921#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021922_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021923
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021924
21925 # wchar_t is only usable if it maps to an unsigned type
21926 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021927 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021928 then
21929 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021930
Martin v. Löwis11437992002-04-12 09:54:03 +000021931cat >>confdefs.h <<\_ACEOF
21932#define HAVE_USABLE_WCHAR_T 1
21933_ACEOF
21934
21935 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021936#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021937_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021938
21939 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21940 then
21941 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021942 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021943#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021944_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021945
21946 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21947 then
21948 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021949 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021950#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021951_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021952
21953 else
21954 PY_UNICODE_TYPE="no type found"
21955 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021956 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21957echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021958fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021959
21960# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021961{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21962echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021963if test "${ac_cv_c_bigendian+set}" = set; then
21964 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021965else
Martin v. Löwis11437992002-04-12 09:54:03 +000021966 # See if sys/param.h defines the BYTE_ORDER macro.
21967cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021968/* confdefs.h. */
21969_ACEOF
21970cat confdefs.h >>conftest.$ac_ext
21971cat >>conftest.$ac_ext <<_ACEOF
21972/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021973#include <sys/types.h>
21974#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021975
Martin v. Löwis11437992002-04-12 09:54:03 +000021976int
21977main ()
21978{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021979#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21980 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021981 bogus endian macros
21982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021983
21984 ;
21985 return 0;
21986}
21987_ACEOF
21988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989if { (ac_try="$ac_compile"
21990case "(($ac_try" in
21991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21992 *) ac_try_echo=$ac_try;;
21993esac
21994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021997 grep -v '^ *+' conftest.er1 >conftest.err
21998 rm -f conftest.er1
21999 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 (exit $ac_status); } && {
22002 test -z "$ac_c_werror_flag" ||
22003 test ! -s conftest.err
22004 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022005 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022006cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022007/* confdefs.h. */
22008_ACEOF
22009cat confdefs.h >>conftest.$ac_ext
22010cat >>conftest.$ac_ext <<_ACEOF
22011/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022012#include <sys/types.h>
22013#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022014
Martin v. Löwis11437992002-04-12 09:54:03 +000022015int
22016main ()
22017{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022018#if BYTE_ORDER != BIG_ENDIAN
22019 not big endian
22020#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022021
22022 ;
22023 return 0;
22024}
22025_ACEOF
22026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022027if { (ac_try="$ac_compile"
22028case "(($ac_try" in
22029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22030 *) ac_try_echo=$ac_try;;
22031esac
22032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022035 grep -v '^ *+' conftest.er1 >conftest.err
22036 rm -f conftest.er1
22037 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022039 (exit $ac_status); } && {
22040 test -z "$ac_c_werror_flag" ||
22041 test ! -s conftest.err
22042 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022043 ac_cv_c_bigendian=yes
22044else
Martin v. Löwis11437992002-04-12 09:54:03 +000022045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022046sed 's/^/| /' conftest.$ac_ext >&5
22047
Martin v. Löwiseba40652007-08-30 20:10:57 +000022048 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022050
22051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022052else
Martin v. Löwis11437992002-04-12 09:54:03 +000022053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022054sed 's/^/| /' conftest.$ac_ext >&5
22055
Martin v. Löwiseba40652007-08-30 20:10:57 +000022056 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022057if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022058 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022059 ac_cv_c_bigendian=unknown
22060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022061/* confdefs.h. */
22062_ACEOF
22063cat confdefs.h >>conftest.$ac_ext
22064cat >>conftest.$ac_ext <<_ACEOF
22065/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022066short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
22067short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022068void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022069short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
22070short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000022071void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022072int
22073main ()
22074{
22075 _ascii (); _ebcdic ();
22076 ;
22077 return 0;
22078}
22079_ACEOF
22080rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022081if { (ac_try="$ac_compile"
22082case "(($ac_try" in
22083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22084 *) ac_try_echo=$ac_try;;
22085esac
22086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022089 grep -v '^ *+' conftest.er1 >conftest.err
22090 rm -f conftest.er1
22091 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022093 (exit $ac_status); } && {
22094 test -z "$ac_c_werror_flag" ||
22095 test ! -s conftest.err
22096 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022097 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022098 ac_cv_c_bigendian=yes
22099fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022100if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022101 if test "$ac_cv_c_bigendian" = unknown; then
22102 ac_cv_c_bigendian=no
22103 else
22104 # finding both strings is unlikely to happen, but who knows?
22105 ac_cv_c_bigendian=unknown
22106 fi
22107fi
22108else
22109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022110sed 's/^/| /' conftest.$ac_ext >&5
22111
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112
Martin v. Löwis11437992002-04-12 09:54:03 +000022113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022114
22115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022116else
22117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022118/* confdefs.h. */
22119_ACEOF
22120cat confdefs.h >>conftest.$ac_ext
22121cat >>conftest.$ac_ext <<_ACEOF
22122/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022123$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022124int
22125main ()
22126{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022127
Guido van Rossumef2255b2000-03-10 22:30:29 +000022128 /* Are we little or big endian? From Harbison&Steele. */
22129 union
22130 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131 long int l;
22132 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022133 } u;
22134 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022135 return u.c[sizeof (long int) - 1] == 1;
22136
22137 ;
22138 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022139}
Martin v. Löwis11437992002-04-12 09:54:03 +000022140_ACEOF
22141rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022142if { (ac_try="$ac_link"
22143case "(($ac_try" in
22144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22145 *) ac_try_echo=$ac_try;;
22146esac
22147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22148 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022149 ac_status=$?
22150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22151 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022152 { (case "(($ac_try" in
22153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22154 *) ac_try_echo=$ac_try;;
22155esac
22156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22157 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022158 ac_status=$?
22159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22160 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022161 ac_cv_c_bigendian=no
22162else
Martin v. Löwis11437992002-04-12 09:54:03 +000022163 echo "$as_me: program exited with status $ac_status" >&5
22164echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022165sed 's/^/| /' conftest.$ac_ext >&5
22166
Martin v. Löwis11437992002-04-12 09:54:03 +000022167( exit $ac_status )
22168ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170rm -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 +000022171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022172
22173
Martin v. Löwis11437992002-04-12 09:54:03 +000022174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022175
22176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022178{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22179echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022180case $ac_cv_c_bigendian in
22181 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022182
Martin v. Löwis11437992002-04-12 09:54:03 +000022183cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022184#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022185_ACEOF
22186 ;;
22187 no)
22188 ;;
22189 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022190 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022191presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022192echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022193presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22194 { (exit 1); exit 1; }; } ;;
22195esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022196
Michael W. Hudson54241132001-12-07 15:38:26 +000022197
Ronald Oussoren988117f2006-04-29 11:31:35 +000022198
22199
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022200# Check whether right shifting a negative integer extends the sign bit
22201# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022202{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22203echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022204if test "${ac_cv_rshift_extends_sign+set}" = set; then
22205 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022206else
Martin v. Löwis11437992002-04-12 09:54:03 +000022207
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022208if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022209 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022210else
Martin v. Löwis11437992002-04-12 09:54:03 +000022211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022212/* confdefs.h. */
22213_ACEOF
22214cat confdefs.h >>conftest.$ac_ext
22215cat >>conftest.$ac_ext <<_ACEOF
22216/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022217
22218int main()
22219{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022220 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022221}
22222
Martin v. Löwis11437992002-04-12 09:54:03 +000022223_ACEOF
22224rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022225if { (ac_try="$ac_link"
22226case "(($ac_try" in
22227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22228 *) ac_try_echo=$ac_try;;
22229esac
22230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22231 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022232 ac_status=$?
22233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22234 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022235 { (case "(($ac_try" in
22236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22237 *) ac_try_echo=$ac_try;;
22238esac
22239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22240 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022241 ac_status=$?
22242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22243 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022244 ac_cv_rshift_extends_sign=yes
22245else
Martin v. Löwis11437992002-04-12 09:54:03 +000022246 echo "$as_me: program exited with status $ac_status" >&5
22247echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022248sed 's/^/| /' conftest.$ac_ext >&5
22249
Martin v. Löwis11437992002-04-12 09:54:03 +000022250( exit $ac_status )
22251ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022252fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022253rm -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 +000022254fi
22255
Martin v. Löwiseba40652007-08-30 20:10:57 +000022256
22257fi
22258
22259{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22260echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022261if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022262then
Martin v. Löwis11437992002-04-12 09:54:03 +000022263
22264cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022265#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022266_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022267
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022268fi
22269
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022270# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022271{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22272echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022273if test "${ac_cv_have_getc_unlocked+set}" = set; then
22274 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022275else
Martin v. Löwis11437992002-04-12 09:54:03 +000022276
22277cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022278/* confdefs.h. */
22279_ACEOF
22280cat confdefs.h >>conftest.$ac_ext
22281cat >>conftest.$ac_ext <<_ACEOF
22282/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022283#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022284int
22285main ()
22286{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022287
22288 FILE *f = fopen("/dev/null", "r");
22289 flockfile(f);
22290 getc_unlocked(f);
22291 funlockfile(f);
22292
Martin v. Löwis11437992002-04-12 09:54:03 +000022293 ;
22294 return 0;
22295}
22296_ACEOF
22297rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022298if { (ac_try="$ac_link"
22299case "(($ac_try" in
22300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22301 *) ac_try_echo=$ac_try;;
22302esac
22303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22304 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022306 grep -v '^ *+' conftest.er1 >conftest.err
22307 rm -f conftest.er1
22308 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022310 (exit $ac_status); } && {
22311 test -z "$ac_c_werror_flag" ||
22312 test ! -s conftest.err
22313 } && test -s conftest$ac_exeext &&
22314 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022315 ac_cv_have_getc_unlocked=yes
22316else
Martin v. Löwis11437992002-04-12 09:54:03 +000022317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022318sed 's/^/| /' conftest.$ac_ext >&5
22319
Martin v. Löwiseba40652007-08-30 20:10:57 +000022320 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022322
22323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022324 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022325fi
22326
Martin v. Löwiseba40652007-08-30 20:10:57 +000022327{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22328echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022329if test "$ac_cv_have_getc_unlocked" = yes
22330then
Martin v. Löwis11437992002-04-12 09:54:03 +000022331
22332cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022333#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022334_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022335
22336fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022337
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022338# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022339# save the value of LIBS so we don't actually link Python with readline
22340LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022341
Martin v. Löwiseba40652007-08-30 20:10:57 +000022342{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22343echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022344if test "${ac_cv_lib_readline_readline+set}" = set; then
22345 echo $ECHO_N "(cached) $ECHO_C" >&6
22346else
22347 ac_check_lib_save_LIBS=$LIBS
22348LIBS="-lreadline $LIBS"
22349cat >conftest.$ac_ext <<_ACEOF
22350/* confdefs.h. */
22351_ACEOF
22352cat confdefs.h >>conftest.$ac_ext
22353cat >>conftest.$ac_ext <<_ACEOF
22354/* end confdefs.h. */
22355
Martin v. Löwiseba40652007-08-30 20:10:57 +000022356/* Override any GCC internal prototype to avoid an error.
22357 Use char because int might match the return type of a GCC
22358 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022359#ifdef __cplusplus
22360extern "C"
22361#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022362char readline ();
22363int
22364main ()
22365{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022366return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022367 ;
22368 return 0;
22369}
22370_ACEOF
22371rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022372if { (ac_try="$ac_link"
22373case "(($ac_try" in
22374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22375 *) ac_try_echo=$ac_try;;
22376esac
22377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22378 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022379 ac_status=$?
22380 grep -v '^ *+' conftest.er1 >conftest.err
22381 rm -f conftest.er1
22382 cat conftest.err >&5
22383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022384 (exit $ac_status); } && {
22385 test -z "$ac_c_werror_flag" ||
22386 test ! -s conftest.err
22387 } && test -s conftest$ac_exeext &&
22388 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022389 ac_cv_lib_readline_readline=yes
22390else
22391 echo "$as_me: failed program was:" >&5
22392sed 's/^/| /' conftest.$ac_ext >&5
22393
Martin v. Löwiseba40652007-08-30 20:10:57 +000022394 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396
22397rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022398 conftest$ac_exeext conftest.$ac_ext
22399LIBS=$ac_check_lib_save_LIBS
22400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22402echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022403if test $ac_cv_lib_readline_readline = yes; then
22404 cat >>confdefs.h <<_ACEOF
22405#define HAVE_LIBREADLINE 1
22406_ACEOF
22407
22408 LIBS="-lreadline $LIBS"
22409
22410fi
22411
22412if test "$ac_cv_have_readline_readline" = no
22413then
22414
Martin v. Löwiseba40652007-08-30 20:10:57 +000022415{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22416echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022417if test "${ac_cv_lib_termcap_readline+set}" = set; then
22418 echo $ECHO_N "(cached) $ECHO_C" >&6
22419else
22420 ac_check_lib_save_LIBS=$LIBS
22421LIBS="-ltermcap $LIBS"
22422cat >conftest.$ac_ext <<_ACEOF
22423/* confdefs.h. */
22424_ACEOF
22425cat confdefs.h >>conftest.$ac_ext
22426cat >>conftest.$ac_ext <<_ACEOF
22427/* end confdefs.h. */
22428
Martin v. Löwiseba40652007-08-30 20:10:57 +000022429/* Override any GCC internal prototype to avoid an error.
22430 Use char because int might match the return type of a GCC
22431 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022432#ifdef __cplusplus
22433extern "C"
22434#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022435char readline ();
22436int
22437main ()
22438{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022439return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022440 ;
22441 return 0;
22442}
22443_ACEOF
22444rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022445if { (ac_try="$ac_link"
22446case "(($ac_try" in
22447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22448 *) ac_try_echo=$ac_try;;
22449esac
22450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22451 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022452 ac_status=$?
22453 grep -v '^ *+' conftest.er1 >conftest.err
22454 rm -f conftest.er1
22455 cat conftest.err >&5
22456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022457 (exit $ac_status); } && {
22458 test -z "$ac_c_werror_flag" ||
22459 test ! -s conftest.err
22460 } && test -s conftest$ac_exeext &&
22461 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022462 ac_cv_lib_termcap_readline=yes
22463else
22464 echo "$as_me: failed program was:" >&5
22465sed 's/^/| /' conftest.$ac_ext >&5
22466
Martin v. Löwiseba40652007-08-30 20:10:57 +000022467 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022468fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022469
22470rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022471 conftest$ac_exeext conftest.$ac_ext
22472LIBS=$ac_check_lib_save_LIBS
22473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22475echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022476if test $ac_cv_lib_termcap_readline = yes; then
22477 cat >>confdefs.h <<_ACEOF
22478#define HAVE_LIBTERMCAP 1
22479_ACEOF
22480
22481 LIBS="-ltermcap $LIBS"
22482
22483fi
22484
22485fi
22486
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022487# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022488{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22489echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022490if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22491 echo $ECHO_N "(cached) $ECHO_C" >&6
22492else
22493 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022494LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022495cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022496/* confdefs.h. */
22497_ACEOF
22498cat confdefs.h >>conftest.$ac_ext
22499cat >>conftest.$ac_ext <<_ACEOF
22500/* end confdefs.h. */
22501
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502/* Override any GCC internal prototype to avoid an error.
22503 Use char because int might match the return type of a GCC
22504 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022505#ifdef __cplusplus
22506extern "C"
22507#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022508char rl_callback_handler_install ();
22509int
22510main ()
22511{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022512return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022513 ;
22514 return 0;
22515}
22516_ACEOF
22517rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022518if { (ac_try="$ac_link"
22519case "(($ac_try" in
22520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22521 *) ac_try_echo=$ac_try;;
22522esac
22523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22524 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022526 grep -v '^ *+' conftest.er1 >conftest.err
22527 rm -f conftest.er1
22528 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022530 (exit $ac_status); } && {
22531 test -z "$ac_c_werror_flag" ||
22532 test ! -s conftest.err
22533 } && test -s conftest$ac_exeext &&
22534 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022535 ac_cv_lib_readline_rl_callback_handler_install=yes
22536else
22537 echo "$as_me: failed program was:" >&5
22538sed 's/^/| /' conftest.$ac_ext >&5
22539
Martin v. Löwiseba40652007-08-30 20:10:57 +000022540 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022542
22543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022544 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022545LIBS=$ac_check_lib_save_LIBS
22546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22548echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022549if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22550
22551cat >>confdefs.h <<\_ACEOF
22552#define HAVE_RL_CALLBACK 1
22553_ACEOF
22554
22555fi
22556
22557
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022558# check for readline 2.2
22559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022560/* confdefs.h. */
22561_ACEOF
22562cat confdefs.h >>conftest.$ac_ext
22563cat >>conftest.$ac_ext <<_ACEOF
22564/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022565#include <readline/readline.h>
22566_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022567if { (ac_try="$ac_cpp conftest.$ac_ext"
22568case "(($ac_try" in
22569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22570 *) ac_try_echo=$ac_try;;
22571esac
22572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022574 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022575 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022576 rm -f conftest.er1
22577 cat conftest.err >&5
22578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022579 (exit $ac_status); } >/dev/null && {
22580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22581 test ! -s conftest.err
22582 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022583 have_readline=yes
22584else
22585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022586sed 's/^/| /' conftest.$ac_ext >&5
22587
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022588 have_readline=no
22589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022590
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022591rm -f conftest.err conftest.$ac_ext
22592if test $have_readline = yes
22593then
22594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022595/* confdefs.h. */
22596_ACEOF
22597cat confdefs.h >>conftest.$ac_ext
22598cat >>conftest.$ac_ext <<_ACEOF
22599/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022600#include <readline/readline.h>
22601
22602_ACEOF
22603if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022604 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022605
22606cat >>confdefs.h <<\_ACEOF
22607#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22608_ACEOF
22609
22610fi
22611rm -f conftest*
22612
22613fi
22614
Martin v. Löwis0daad592001-09-30 21:09:59 +000022615# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022616{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22617echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022618if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22619 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022620else
Martin v. Löwis11437992002-04-12 09:54:03 +000022621 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022622LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022624/* confdefs.h. */
22625_ACEOF
22626cat confdefs.h >>conftest.$ac_ext
22627cat >>conftest.$ac_ext <<_ACEOF
22628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022629
Martin v. Löwiseba40652007-08-30 20:10:57 +000022630/* Override any GCC internal prototype to avoid an error.
22631 Use char because int might match the return type of a GCC
22632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022633#ifdef __cplusplus
22634extern "C"
22635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022636char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022637int
22638main ()
22639{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022640return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022641 ;
22642 return 0;
22643}
22644_ACEOF
22645rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022646if { (ac_try="$ac_link"
22647case "(($ac_try" in
22648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22649 *) ac_try_echo=$ac_try;;
22650esac
22651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22652 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022654 grep -v '^ *+' conftest.er1 >conftest.err
22655 rm -f conftest.er1
22656 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022658 (exit $ac_status); } && {
22659 test -z "$ac_c_werror_flag" ||
22660 test ! -s conftest.err
22661 } && test -s conftest$ac_exeext &&
22662 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022663 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022664else
Martin v. Löwis11437992002-04-12 09:54:03 +000022665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022666sed 's/^/| /' conftest.$ac_ext >&5
22667
Martin v. Löwiseba40652007-08-30 20:10:57 +000022668 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022669fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022670
22671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022672 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022673LIBS=$ac_check_lib_save_LIBS
22674fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022675{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22676echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022677if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022678
Martin v. Löwis11437992002-04-12 09:54:03 +000022679cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022680#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022681_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022682
Martin v. Löwis0daad592001-09-30 21:09:59 +000022683fi
22684
Michael W. Hudson54241132001-12-07 15:38:26 +000022685
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022686# also in 4.0
22687{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22688echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22689if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22690 echo $ECHO_N "(cached) $ECHO_C" >&6
22691else
22692 ac_check_lib_save_LIBS=$LIBS
22693LIBS="-lreadline $LIBS"
22694cat >conftest.$ac_ext <<_ACEOF
22695/* confdefs.h. */
22696_ACEOF
22697cat confdefs.h >>conftest.$ac_ext
22698cat >>conftest.$ac_ext <<_ACEOF
22699/* end confdefs.h. */
22700
22701/* Override any GCC internal prototype to avoid an error.
22702 Use char because int might match the return type of a GCC
22703 builtin and then its argument prototype would still apply. */
22704#ifdef __cplusplus
22705extern "C"
22706#endif
22707char rl_completion_display_matches_hook ();
22708int
22709main ()
22710{
22711return rl_completion_display_matches_hook ();
22712 ;
22713 return 0;
22714}
22715_ACEOF
22716rm -f conftest.$ac_objext conftest$ac_exeext
22717if { (ac_try="$ac_link"
22718case "(($ac_try" in
22719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22720 *) ac_try_echo=$ac_try;;
22721esac
22722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22723 (eval "$ac_link") 2>conftest.er1
22724 ac_status=$?
22725 grep -v '^ *+' conftest.er1 >conftest.err
22726 rm -f conftest.er1
22727 cat conftest.err >&5
22728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22729 (exit $ac_status); } && {
22730 test -z "$ac_c_werror_flag" ||
22731 test ! -s conftest.err
22732 } && test -s conftest$ac_exeext &&
22733 $as_test_x conftest$ac_exeext; then
22734 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22735else
22736 echo "$as_me: failed program was:" >&5
22737sed 's/^/| /' conftest.$ac_ext >&5
22738
22739 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22740fi
22741
22742rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22743 conftest$ac_exeext conftest.$ac_ext
22744LIBS=$ac_check_lib_save_LIBS
22745fi
22746{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22747echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22748if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22749
22750cat >>confdefs.h <<\_ACEOF
22751#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22752_ACEOF
22753
22754fi
22755
22756
Martin v. Löwis0daad592001-09-30 21:09:59 +000022757# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022758{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22759echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022760if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22761 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022762else
Martin v. Löwis11437992002-04-12 09:54:03 +000022763 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022764LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022766/* confdefs.h. */
22767_ACEOF
22768cat confdefs.h >>conftest.$ac_ext
22769cat >>conftest.$ac_ext <<_ACEOF
22770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022771
Martin v. Löwiseba40652007-08-30 20:10:57 +000022772/* Override any GCC internal prototype to avoid an error.
22773 Use char because int might match the return type of a GCC
22774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022775#ifdef __cplusplus
22776extern "C"
22777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022778char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022779int
22780main ()
22781{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022782return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022783 ;
22784 return 0;
22785}
22786_ACEOF
22787rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022788if { (ac_try="$ac_link"
22789case "(($ac_try" in
22790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22791 *) ac_try_echo=$ac_try;;
22792esac
22793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22794 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022796 grep -v '^ *+' conftest.er1 >conftest.err
22797 rm -f conftest.er1
22798 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800 (exit $ac_status); } && {
22801 test -z "$ac_c_werror_flag" ||
22802 test ! -s conftest.err
22803 } && test -s conftest$ac_exeext &&
22804 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022805 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022806else
Martin v. Löwis11437992002-04-12 09:54:03 +000022807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022808sed 's/^/| /' conftest.$ac_ext >&5
22809
Martin v. Löwiseba40652007-08-30 20:10:57 +000022810 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022812
22813rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022814 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022815LIBS=$ac_check_lib_save_LIBS
22816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022817{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22818echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022819if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022820
Martin v. Löwis11437992002-04-12 09:54:03 +000022821cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022822#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022823_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022824
Guido van Rossum353ae582001-07-10 16:45:32 +000022825fi
22826
Jack Jansendd19cf82001-12-06 22:36:17 +000022827
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022828# also in readline 4.2
22829cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022830/* confdefs.h. */
22831_ACEOF
22832cat confdefs.h >>conftest.$ac_ext
22833cat >>conftest.$ac_ext <<_ACEOF
22834/* end confdefs.h. */
22835#include <readline/readline.h>
22836_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837if { (ac_try="$ac_cpp conftest.$ac_ext"
22838case "(($ac_try" in
22839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22840 *) ac_try_echo=$ac_try;;
22841esac
22842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22843 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022844 ac_status=$?
22845 grep -v '^ *+' conftest.er1 >conftest.err
22846 rm -f conftest.er1
22847 cat conftest.err >&5
22848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022849 (exit $ac_status); } >/dev/null && {
22850 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22851 test ! -s conftest.err
22852 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022853 have_readline=yes
22854else
22855 echo "$as_me: failed program was:" >&5
22856sed 's/^/| /' conftest.$ac_ext >&5
22857
22858 have_readline=no
22859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022860
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022861rm -f conftest.err conftest.$ac_ext
22862if test $have_readline = yes
22863then
22864 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022865/* confdefs.h. */
22866_ACEOF
22867cat confdefs.h >>conftest.$ac_ext
22868cat >>conftest.$ac_ext <<_ACEOF
22869/* end confdefs.h. */
22870#include <readline/readline.h>
22871
22872_ACEOF
22873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22874 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22875
22876cat >>confdefs.h <<\_ACEOF
22877#define HAVE_RL_CATCH_SIGNAL 1
22878_ACEOF
22879
22880fi
22881rm -f conftest*
22882
22883fi
22884
Martin v. Löwis82bca632006-02-10 20:49:30 +000022885# End of readline checks: restore LIBS
22886LIBS=$LIBS_no_readline
22887
Martin v. Löwiseba40652007-08-30 20:10:57 +000022888{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22889echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022890if test "${ac_cv_broken_nice+set}" = set; then
22891 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022892else
Martin v. Löwis11437992002-04-12 09:54:03 +000022893
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022894if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022895 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022896else
Martin v. Löwis11437992002-04-12 09:54:03 +000022897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022898/* confdefs.h. */
22899_ACEOF
22900cat confdefs.h >>conftest.$ac_ext
22901cat >>conftest.$ac_ext <<_ACEOF
22902/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022903
22904int main()
22905{
22906 int val1 = nice(1);
22907 if (val1 != -1 && val1 == nice(2))
22908 exit(0);
22909 exit(1);
22910}
22911
Martin v. Löwis11437992002-04-12 09:54:03 +000022912_ACEOF
22913rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022914if { (ac_try="$ac_link"
22915case "(($ac_try" in
22916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22917 *) ac_try_echo=$ac_try;;
22918esac
22919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22920 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022921 ac_status=$?
22922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22923 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022924 { (case "(($ac_try" in
22925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22926 *) ac_try_echo=$ac_try;;
22927esac
22928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22929 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022930 ac_status=$?
22931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22932 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022933 ac_cv_broken_nice=yes
22934else
Martin v. Löwis11437992002-04-12 09:54:03 +000022935 echo "$as_me: program exited with status $ac_status" >&5
22936echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022937sed 's/^/| /' conftest.$ac_ext >&5
22938
Martin v. Löwis11437992002-04-12 09:54:03 +000022939( exit $ac_status )
22940ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942rm -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 +000022943fi
22944
Martin v. Löwiseba40652007-08-30 20:10:57 +000022945
22946fi
22947
22948{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22949echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022950if test "$ac_cv_broken_nice" = yes
22951then
Martin v. Löwis11437992002-04-12 09:54:03 +000022952
22953cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022954#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022955_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022956
22957fi
22958
Martin v. Löwiseba40652007-08-30 20:10:57 +000022959{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22960echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022961if test "$cross_compiling" = yes; then
22962 ac_cv_broken_poll=no
22963else
22964 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022965/* confdefs.h. */
22966_ACEOF
22967cat confdefs.h >>conftest.$ac_ext
22968cat >>conftest.$ac_ext <<_ACEOF
22969/* end confdefs.h. */
22970
22971#include <poll.h>
22972
22973int main (void)
22974 {
22975 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22976
22977 close (42);
22978
22979 int poll_test = poll (&poll_struct, 1, 0);
22980
22981 if (poll_test < 0)
22982 {
22983 exit(0);
22984 }
22985 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22986 {
22987 exit(0);
22988 }
22989 else
22990 {
22991 exit(1);
22992 }
22993 }
22994
22995_ACEOF
22996rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022997if { (ac_try="$ac_link"
22998case "(($ac_try" in
22999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23000 *) ac_try_echo=$ac_try;;
23001esac
23002eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23003 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023004 ac_status=$?
23005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23006 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023007 { (case "(($ac_try" in
23008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23009 *) ac_try_echo=$ac_try;;
23010esac
23011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23012 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023013 ac_status=$?
23014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23015 (exit $ac_status); }; }; then
23016 ac_cv_broken_poll=yes
23017else
23018 echo "$as_me: program exited with status $ac_status" >&5
23019echo "$as_me: failed program was:" >&5
23020sed 's/^/| /' conftest.$ac_ext >&5
23021
23022( exit $ac_status )
23023ac_cv_broken_poll=no
23024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023025rm -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 +000023026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023027
23028
23029{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23030echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023031if test "$ac_cv_broken_poll" = yes
23032then
23033
23034cat >>confdefs.h <<\_ACEOF
23035#define HAVE_BROKEN_POLL 1
23036_ACEOF
23037
23038fi
23039
Brett Cannon43802422005-02-10 20:48:03 +000023040# 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 +000023041# (which is not required by ISO C or UNIX spec) and/or if we support
23042# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023043{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23044echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023045if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23046 echo $ECHO_N "(cached) $ECHO_C" >&6
23047else
23048 cat >conftest.$ac_ext <<_ACEOF
23049/* confdefs.h. */
23050_ACEOF
23051cat confdefs.h >>conftest.$ac_ext
23052cat >>conftest.$ac_ext <<_ACEOF
23053/* end confdefs.h. */
23054#include <sys/types.h>
23055#include <$ac_cv_struct_tm>
23056
23057
23058int
23059main ()
23060{
23061static struct tm ac_aggr;
23062if (ac_aggr.tm_zone)
23063return 0;
23064 ;
23065 return 0;
23066}
23067_ACEOF
23068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023069if { (ac_try="$ac_compile"
23070case "(($ac_try" in
23071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23072 *) ac_try_echo=$ac_try;;
23073esac
23074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23075 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023076 ac_status=$?
23077 grep -v '^ *+' conftest.er1 >conftest.err
23078 rm -f conftest.er1
23079 cat conftest.err >&5
23080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023081 (exit $ac_status); } && {
23082 test -z "$ac_c_werror_flag" ||
23083 test ! -s conftest.err
23084 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023085 ac_cv_member_struct_tm_tm_zone=yes
23086else
23087 echo "$as_me: failed program was:" >&5
23088sed 's/^/| /' conftest.$ac_ext >&5
23089
Martin v. Löwiseba40652007-08-30 20:10:57 +000023090 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023091/* confdefs.h. */
23092_ACEOF
23093cat confdefs.h >>conftest.$ac_ext
23094cat >>conftest.$ac_ext <<_ACEOF
23095/* end confdefs.h. */
23096#include <sys/types.h>
23097#include <$ac_cv_struct_tm>
23098
23099
23100int
23101main ()
23102{
23103static struct tm ac_aggr;
23104if (sizeof ac_aggr.tm_zone)
23105return 0;
23106 ;
23107 return 0;
23108}
23109_ACEOF
23110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023111if { (ac_try="$ac_compile"
23112case "(($ac_try" in
23113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23114 *) ac_try_echo=$ac_try;;
23115esac
23116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23117 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023118 ac_status=$?
23119 grep -v '^ *+' conftest.er1 >conftest.err
23120 rm -f conftest.er1
23121 cat conftest.err >&5
23122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123 (exit $ac_status); } && {
23124 test -z "$ac_c_werror_flag" ||
23125 test ! -s conftest.err
23126 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023127 ac_cv_member_struct_tm_tm_zone=yes
23128else
23129 echo "$as_me: failed program was:" >&5
23130sed 's/^/| /' conftest.$ac_ext >&5
23131
Martin v. Löwiseba40652007-08-30 20:10:57 +000023132 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023134
23135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023136fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023137
23138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023140{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23141echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023142if test $ac_cv_member_struct_tm_tm_zone = yes; then
23143
23144cat >>confdefs.h <<_ACEOF
23145#define HAVE_STRUCT_TM_TM_ZONE 1
23146_ACEOF
23147
23148
23149fi
23150
23151if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23152
23153cat >>confdefs.h <<\_ACEOF
23154#define HAVE_TM_ZONE 1
23155_ACEOF
23156
23157else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023158 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23159echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23160if test "${ac_cv_have_decl_tzname+set}" = set; then
23161 echo $ECHO_N "(cached) $ECHO_C" >&6
23162else
23163 cat >conftest.$ac_ext <<_ACEOF
23164/* confdefs.h. */
23165_ACEOF
23166cat confdefs.h >>conftest.$ac_ext
23167cat >>conftest.$ac_ext <<_ACEOF
23168/* end confdefs.h. */
23169#include <time.h>
23170
23171int
23172main ()
23173{
23174#ifndef tzname
23175 (void) tzname;
23176#endif
23177
23178 ;
23179 return 0;
23180}
23181_ACEOF
23182rm -f conftest.$ac_objext
23183if { (ac_try="$ac_compile"
23184case "(($ac_try" in
23185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23186 *) ac_try_echo=$ac_try;;
23187esac
23188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23189 (eval "$ac_compile") 2>conftest.er1
23190 ac_status=$?
23191 grep -v '^ *+' conftest.er1 >conftest.err
23192 rm -f conftest.er1
23193 cat conftest.err >&5
23194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23195 (exit $ac_status); } && {
23196 test -z "$ac_c_werror_flag" ||
23197 test ! -s conftest.err
23198 } && test -s conftest.$ac_objext; then
23199 ac_cv_have_decl_tzname=yes
23200else
23201 echo "$as_me: failed program was:" >&5
23202sed 's/^/| /' conftest.$ac_ext >&5
23203
23204 ac_cv_have_decl_tzname=no
23205fi
23206
23207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23208fi
23209{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23210echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23211if test $ac_cv_have_decl_tzname = yes; then
23212
23213cat >>confdefs.h <<_ACEOF
23214#define HAVE_DECL_TZNAME 1
23215_ACEOF
23216
23217
23218else
23219 cat >>confdefs.h <<_ACEOF
23220#define HAVE_DECL_TZNAME 0
23221_ACEOF
23222
23223
23224fi
23225
23226
23227 { echo "$as_me:$LINENO: checking for tzname" >&5
23228echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023229if test "${ac_cv_var_tzname+set}" = set; then
23230 echo $ECHO_N "(cached) $ECHO_C" >&6
23231else
23232 cat >conftest.$ac_ext <<_ACEOF
23233/* confdefs.h. */
23234_ACEOF
23235cat confdefs.h >>conftest.$ac_ext
23236cat >>conftest.$ac_ext <<_ACEOF
23237/* end confdefs.h. */
23238#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023239#if !HAVE_DECL_TZNAME
23240extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023241#endif
23242
23243int
23244main ()
23245{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023246return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023247 ;
23248 return 0;
23249}
23250_ACEOF
23251rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023252if { (ac_try="$ac_link"
23253case "(($ac_try" in
23254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23255 *) ac_try_echo=$ac_try;;
23256esac
23257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23258 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023259 ac_status=$?
23260 grep -v '^ *+' conftest.er1 >conftest.err
23261 rm -f conftest.er1
23262 cat conftest.err >&5
23263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023264 (exit $ac_status); } && {
23265 test -z "$ac_c_werror_flag" ||
23266 test ! -s conftest.err
23267 } && test -s conftest$ac_exeext &&
23268 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023269 ac_cv_var_tzname=yes
23270else
23271 echo "$as_me: failed program was:" >&5
23272sed 's/^/| /' conftest.$ac_ext >&5
23273
Martin v. Löwiseba40652007-08-30 20:10:57 +000023274 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023276
23277rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023278 conftest$ac_exeext conftest.$ac_ext
23279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023280{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23281echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023282 if test $ac_cv_var_tzname = yes; then
23283
23284cat >>confdefs.h <<\_ACEOF
23285#define HAVE_TZNAME 1
23286_ACEOF
23287
23288 fi
23289fi
23290
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023291
Martin v. Löwis1d459062005-03-14 21:23:33 +000023292# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023293{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23294echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023295if test "${ac_cv_working_tzset+set}" = set; then
23296 echo $ECHO_N "(cached) $ECHO_C" >&6
23297else
23298
23299if test "$cross_compiling" = yes; then
23300 ac_cv_working_tzset=no
23301else
23302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023303/* confdefs.h. */
23304_ACEOF
23305cat confdefs.h >>conftest.$ac_ext
23306cat >>conftest.$ac_ext <<_ACEOF
23307/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023308
23309#include <stdlib.h>
23310#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023311#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023312
23313#if HAVE_TZNAME
23314extern char *tzname[];
23315#endif
23316
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023317int main()
23318{
Brett Cannon18367812003-09-19 00:59:16 +000023319 /* Note that we need to ensure that not only does tzset(3)
23320 do 'something' with localtime, but it works as documented
23321 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023322 This includes making sure that tzname is set properly if
23323 tm->tm_zone does not exist since it is the alternative way
23324 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023325
23326 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023327 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023328 */
23329
Martin v. Löwis1d459062005-03-14 21:23:33 +000023330 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023331 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23332
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023333 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023334 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023335 if (localtime(&groundhogday)->tm_hour != 0)
23336 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023337#if HAVE_TZNAME
23338 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23339 if (strcmp(tzname[0], "UTC") ||
23340 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23341 exit(1);
23342#endif
Brett Cannon18367812003-09-19 00:59:16 +000023343
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023344 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023345 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023346 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023347 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023348#if HAVE_TZNAME
23349 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23350 exit(1);
23351#endif
Brett Cannon18367812003-09-19 00:59:16 +000023352
23353 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23354 tzset();
23355 if (localtime(&groundhogday)->tm_hour != 11)
23356 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023357#if HAVE_TZNAME
23358 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23359 exit(1);
23360#endif
23361
23362#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023363 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23364 exit(1);
23365 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23366 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023367#endif
Brett Cannon18367812003-09-19 00:59:16 +000023368
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023369 exit(0);
23370}
23371
23372_ACEOF
23373rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023374if { (ac_try="$ac_link"
23375case "(($ac_try" in
23376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23377 *) ac_try_echo=$ac_try;;
23378esac
23379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23380 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023381 ac_status=$?
23382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23383 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023384 { (case "(($ac_try" in
23385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23386 *) ac_try_echo=$ac_try;;
23387esac
23388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23389 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023390 ac_status=$?
23391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23392 (exit $ac_status); }; }; then
23393 ac_cv_working_tzset=yes
23394else
23395 echo "$as_me: program exited with status $ac_status" >&5
23396echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023397sed 's/^/| /' conftest.$ac_ext >&5
23398
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023399( exit $ac_status )
23400ac_cv_working_tzset=no
23401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023402rm -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 +000023403fi
23404
Martin v. Löwiseba40652007-08-30 20:10:57 +000023405
23406fi
23407
23408{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23409echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023410if test "$ac_cv_working_tzset" = yes
23411then
23412
23413cat >>confdefs.h <<\_ACEOF
23414#define HAVE_WORKING_TZSET 1
23415_ACEOF
23416
23417fi
23418
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023419# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023420{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23421echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023422if test "${ac_cv_stat_tv_nsec+set}" = set; then
23423 echo $ECHO_N "(cached) $ECHO_C" >&6
23424else
23425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023426/* confdefs.h. */
23427_ACEOF
23428cat confdefs.h >>conftest.$ac_ext
23429cat >>conftest.$ac_ext <<_ACEOF
23430/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023431#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023432int
23433main ()
23434{
23435
23436struct stat st;
23437st.st_mtim.tv_nsec = 1;
23438
23439 ;
23440 return 0;
23441}
23442_ACEOF
23443rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023444if { (ac_try="$ac_compile"
23445case "(($ac_try" in
23446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23447 *) ac_try_echo=$ac_try;;
23448esac
23449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023452 grep -v '^ *+' conftest.er1 >conftest.err
23453 rm -f conftest.er1
23454 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023456 (exit $ac_status); } && {
23457 test -z "$ac_c_werror_flag" ||
23458 test ! -s conftest.err
23459 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023460 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023461else
23462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023463sed 's/^/| /' conftest.$ac_ext >&5
23464
Martin v. Löwiseba40652007-08-30 20:10:57 +000023465 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023466fi
23467
Martin v. Löwiseba40652007-08-30 20:10:57 +000023468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23469fi
23470
23471{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23472echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023473if test "$ac_cv_stat_tv_nsec" = yes
23474then
23475
23476cat >>confdefs.h <<\_ACEOF
23477#define HAVE_STAT_TV_NSEC 1
23478_ACEOF
23479
23480fi
23481
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023482# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023483{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23484echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023485if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23486 echo $ECHO_N "(cached) $ECHO_C" >&6
23487else
23488 cat >conftest.$ac_ext <<_ACEOF
23489/* confdefs.h. */
23490_ACEOF
23491cat confdefs.h >>conftest.$ac_ext
23492cat >>conftest.$ac_ext <<_ACEOF
23493/* end confdefs.h. */
23494#include <sys/stat.h>
23495int
23496main ()
23497{
23498
23499struct stat st;
23500st.st_mtimespec.tv_nsec = 1;
23501
23502 ;
23503 return 0;
23504}
23505_ACEOF
23506rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023507if { (ac_try="$ac_compile"
23508case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;;
23511esac
23512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023514 ac_status=$?
23515 grep -v '^ *+' conftest.er1 >conftest.err
23516 rm -f conftest.er1
23517 cat conftest.err >&5
23518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023519 (exit $ac_status); } && {
23520 test -z "$ac_c_werror_flag" ||
23521 test ! -s conftest.err
23522 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023523 ac_cv_stat_tv_nsec2=yes
23524else
23525 echo "$as_me: failed program was:" >&5
23526sed 's/^/| /' conftest.$ac_ext >&5
23527
Martin v. Löwiseba40652007-08-30 20:10:57 +000023528 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023529fi
23530
Martin v. Löwiseba40652007-08-30 20:10:57 +000023531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23532fi
23533
23534{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23535echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023536if test "$ac_cv_stat_tv_nsec2" = yes
23537then
23538
23539cat >>confdefs.h <<\_ACEOF
23540#define HAVE_STAT_TV_NSEC2 1
23541_ACEOF
23542
23543fi
23544
Jack Jansen666b1e72001-10-31 12:11:48 +000023545# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023546{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23547echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023548if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23549 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023550else
Martin v. Löwis11437992002-04-12 09:54:03 +000023551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023552/* confdefs.h. */
23553_ACEOF
23554cat confdefs.h >>conftest.$ac_ext
23555cat >>conftest.$ac_ext <<_ACEOF
23556/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023557#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023558int
23559main ()
23560{
Jack Jansen666b1e72001-10-31 12:11:48 +000023561
23562 int rtn;
23563 rtn = mvwdelch(0,0,0);
23564
Martin v. Löwis11437992002-04-12 09:54:03 +000023565 ;
23566 return 0;
23567}
23568_ACEOF
23569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023570if { (ac_try="$ac_compile"
23571case "(($ac_try" in
23572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23573 *) ac_try_echo=$ac_try;;
23574esac
23575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023578 grep -v '^ *+' conftest.er1 >conftest.err
23579 rm -f conftest.er1
23580 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023582 (exit $ac_status); } && {
23583 test -z "$ac_c_werror_flag" ||
23584 test ! -s conftest.err
23585 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023586 ac_cv_mvwdelch_is_expression=yes
23587else
Martin v. Löwis11437992002-04-12 09:54:03 +000023588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023589sed 's/^/| /' conftest.$ac_ext >&5
23590
Martin v. Löwiseba40652007-08-30 20:10:57 +000023591 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023592fi
23593
Martin v. Löwiseba40652007-08-30 20:10:57 +000023594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23595fi
23596
23597{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23598echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023599
23600if test "$ac_cv_mvwdelch_is_expression" = yes
23601then
Martin v. Löwis11437992002-04-12 09:54:03 +000023602
23603cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023604#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023605_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023606
23607fi
23608
Martin v. Löwiseba40652007-08-30 20:10:57 +000023609{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23610echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023611if test "${ac_cv_window_has_flags+set}" = set; then
23612 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023613else
Martin v. Löwis11437992002-04-12 09:54:03 +000023614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023615/* confdefs.h. */
23616_ACEOF
23617cat confdefs.h >>conftest.$ac_ext
23618cat >>conftest.$ac_ext <<_ACEOF
23619/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023620#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023621int
23622main ()
23623{
Jack Jansen666b1e72001-10-31 12:11:48 +000023624
23625 WINDOW *w;
23626 w->_flags = 0;
23627
Martin v. Löwis11437992002-04-12 09:54:03 +000023628 ;
23629 return 0;
23630}
23631_ACEOF
23632rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023633if { (ac_try="$ac_compile"
23634case "(($ac_try" in
23635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23636 *) ac_try_echo=$ac_try;;
23637esac
23638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23639 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023641 grep -v '^ *+' conftest.er1 >conftest.err
23642 rm -f conftest.er1
23643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023645 (exit $ac_status); } && {
23646 test -z "$ac_c_werror_flag" ||
23647 test ! -s conftest.err
23648 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023649 ac_cv_window_has_flags=yes
23650else
Martin v. Löwis11437992002-04-12 09:54:03 +000023651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023652sed 's/^/| /' conftest.$ac_ext >&5
23653
Martin v. Löwiseba40652007-08-30 20:10:57 +000023654 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023655fi
23656
Martin v. Löwiseba40652007-08-30 20:10:57 +000023657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23658fi
23659
23660{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23661echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023662
Jack Jansen666b1e72001-10-31 12:11:48 +000023663
23664if test "$ac_cv_window_has_flags" = yes
23665then
Martin v. Löwis11437992002-04-12 09:54:03 +000023666
23667cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023668#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023669_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023670
23671fi
23672
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23674echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023675cat >conftest.$ac_ext <<_ACEOF
23676/* confdefs.h. */
23677_ACEOF
23678cat confdefs.h >>conftest.$ac_ext
23679cat >>conftest.$ac_ext <<_ACEOF
23680/* end confdefs.h. */
23681#include <curses.h>
23682int
23683main ()
23684{
23685void *x=is_term_resized
23686 ;
23687 return 0;
23688}
23689_ACEOF
23690rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023691if { (ac_try="$ac_compile"
23692case "(($ac_try" in
23693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23694 *) ac_try_echo=$ac_try;;
23695esac
23696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23697 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023698 ac_status=$?
23699 grep -v '^ *+' conftest.er1 >conftest.err
23700 rm -f conftest.er1
23701 cat conftest.err >&5
23702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023703 (exit $ac_status); } && {
23704 test -z "$ac_c_werror_flag" ||
23705 test ! -s conftest.err
23706 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023707
23708cat >>confdefs.h <<\_ACEOF
23709#define HAVE_CURSES_IS_TERM_RESIZED 1
23710_ACEOF
23711
Martin v. Löwiseba40652007-08-30 20:10:57 +000023712 { echo "$as_me:$LINENO: result: yes" >&5
23713echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023714else
23715 echo "$as_me: failed program was:" >&5
23716sed 's/^/| /' conftest.$ac_ext >&5
23717
Martin v. Löwiseba40652007-08-30 20:10:57 +000023718 { echo "$as_me:$LINENO: result: no" >&5
23719echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023720
23721fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023722
Martin v. Löwiseba40652007-08-30 20:10:57 +000023723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23724
23725{ echo "$as_me:$LINENO: checking for resize_term" >&5
23726echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023727cat >conftest.$ac_ext <<_ACEOF
23728/* confdefs.h. */
23729_ACEOF
23730cat confdefs.h >>conftest.$ac_ext
23731cat >>conftest.$ac_ext <<_ACEOF
23732/* end confdefs.h. */
23733#include <curses.h>
23734int
23735main ()
23736{
23737void *x=resize_term
23738 ;
23739 return 0;
23740}
23741_ACEOF
23742rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023743if { (ac_try="$ac_compile"
23744case "(($ac_try" in
23745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23746 *) ac_try_echo=$ac_try;;
23747esac
23748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23749 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023750 ac_status=$?
23751 grep -v '^ *+' conftest.er1 >conftest.err
23752 rm -f conftest.er1
23753 cat conftest.err >&5
23754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023755 (exit $ac_status); } && {
23756 test -z "$ac_c_werror_flag" ||
23757 test ! -s conftest.err
23758 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023759
23760cat >>confdefs.h <<\_ACEOF
23761#define HAVE_CURSES_RESIZE_TERM 1
23762_ACEOF
23763
Martin v. Löwiseba40652007-08-30 20:10:57 +000023764 { echo "$as_me:$LINENO: result: yes" >&5
23765echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023766else
23767 echo "$as_me: failed program was:" >&5
23768sed 's/^/| /' conftest.$ac_ext >&5
23769
Martin v. Löwiseba40652007-08-30 20:10:57 +000023770 { echo "$as_me:$LINENO: result: no" >&5
23771echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023772
23773fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023774
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23776
23777{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23778echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023779cat >conftest.$ac_ext <<_ACEOF
23780/* confdefs.h. */
23781_ACEOF
23782cat confdefs.h >>conftest.$ac_ext
23783cat >>conftest.$ac_ext <<_ACEOF
23784/* end confdefs.h. */
23785#include <curses.h>
23786int
23787main ()
23788{
23789void *x=resizeterm
23790 ;
23791 return 0;
23792}
23793_ACEOF
23794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023795if { (ac_try="$ac_compile"
23796case "(($ac_try" in
23797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23798 *) ac_try_echo=$ac_try;;
23799esac
23800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23801 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023802 ac_status=$?
23803 grep -v '^ *+' conftest.er1 >conftest.err
23804 rm -f conftest.er1
23805 cat conftest.err >&5
23806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023807 (exit $ac_status); } && {
23808 test -z "$ac_c_werror_flag" ||
23809 test ! -s conftest.err
23810 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023811
23812cat >>confdefs.h <<\_ACEOF
23813#define HAVE_CURSES_RESIZETERM 1
23814_ACEOF
23815
Martin v. Löwiseba40652007-08-30 20:10:57 +000023816 { echo "$as_me:$LINENO: result: yes" >&5
23817echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023818else
23819 echo "$as_me: failed program was:" >&5
23820sed 's/^/| /' conftest.$ac_ext >&5
23821
Martin v. Löwiseba40652007-08-30 20:10:57 +000023822 { echo "$as_me:$LINENO: result: no" >&5
23823echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023824
23825fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023826
Martin v. Löwiseba40652007-08-30 20:10:57 +000023827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23828
23829{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23830echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023831
23832if test -r /dev/ptmx
23833then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023834 { echo "$as_me:$LINENO: result: yes" >&5
23835echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023836
23837cat >>confdefs.h <<\_ACEOF
23838#define HAVE_DEV_PTMX 1
23839_ACEOF
23840
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023841else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023842 { echo "$as_me:$LINENO: result: no" >&5
23843echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023844fi
23845
Martin v. Löwiseba40652007-08-30 20:10:57 +000023846{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23847echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023848
23849if test -r /dev/ptc
23850then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023851 { echo "$as_me:$LINENO: result: yes" >&5
23852echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023853
23854cat >>confdefs.h <<\_ACEOF
23855#define HAVE_DEV_PTC 1
23856_ACEOF
23857
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023858else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023859 { echo "$as_me:$LINENO: result: no" >&5
23860echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023861fi
23862
Martin v. Löwiseba40652007-08-30 20:10:57 +000023863{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23864echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023865if test "$cross_compiling" = yes; then
23866 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23867See \`config.log' for more details." >&5
23868echo "$as_me: error: cannot run test program while cross compiling
23869See \`config.log' for more details." >&2;}
23870 { (exit 1); exit 1; }; }
23871else
23872 cat >conftest.$ac_ext <<_ACEOF
23873/* confdefs.h. */
23874_ACEOF
23875cat confdefs.h >>conftest.$ac_ext
23876cat >>conftest.$ac_ext <<_ACEOF
23877/* end confdefs.h. */
23878#include <stdio.h>
23879#include <stddef.h>
23880#include <string.h>
23881
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023882#ifdef HAVE_SYS_TYPES_H
23883#include <sys/types.h>
23884#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023885
23886#ifdef HAVE_SSIZE_T
23887typedef ssize_t Py_ssize_t;
23888#elif SIZEOF_VOID_P == SIZEOF_LONG
23889typedef long Py_ssize_t;
23890#else
23891typedef int Py_ssize_t;
23892#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023893
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023894int main()
23895{
23896 char buffer[256];
23897
Brett Cannon09d12362006-05-11 05:11:33 +000023898 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23899 return 1;
23900
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023901 if (strcmp(buffer, "123"))
23902 return 1;
23903
23904 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23905 return 1;
23906
23907 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023908 return 1;
23909
23910 return 0;
23911}
23912_ACEOF
23913rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023914if { (ac_try="$ac_link"
23915case "(($ac_try" in
23916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23917 *) ac_try_echo=$ac_try;;
23918esac
23919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23920 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023921 ac_status=$?
23922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23923 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023924 { (case "(($ac_try" in
23925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23926 *) ac_try_echo=$ac_try;;
23927esac
23928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23929 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023930 ac_status=$?
23931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23932 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023933 { echo "$as_me:$LINENO: result: yes" >&5
23934echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023935
23936cat >>confdefs.h <<\_ACEOF
23937#define PY_FORMAT_SIZE_T "z"
23938_ACEOF
23939
23940else
23941 echo "$as_me: program exited with status $ac_status" >&5
23942echo "$as_me: failed program was:" >&5
23943sed 's/^/| /' conftest.$ac_ext >&5
23944
23945( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023946{ echo "$as_me:$LINENO: result: no" >&5
23947echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023949rm -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 +000023950fi
23951
Martin v. Löwiseba40652007-08-30 20:10:57 +000023952
23953
23954{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23955echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023956if test "${ac_cv_type_socklen_t+set}" = set; then
23957 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023958else
Martin v. Löwis11437992002-04-12 09:54:03 +000023959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023960/* confdefs.h. */
23961_ACEOF
23962cat confdefs.h >>conftest.$ac_ext
23963cat >>conftest.$ac_ext <<_ACEOF
23964/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023965
23966#ifdef HAVE_SYS_TYPES_H
23967#include <sys/types.h>
23968#endif
23969#ifdef HAVE_SYS_SOCKET_H
23970#include <sys/socket.h>
23971#endif
23972
23973
Martin v. Löwiseba40652007-08-30 20:10:57 +000023974typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023975int
23976main ()
23977{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023978if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023979 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023980if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023981 return 0;
23982 ;
23983 return 0;
23984}
23985_ACEOF
23986rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023987if { (ac_try="$ac_compile"
23988case "(($ac_try" in
23989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23990 *) ac_try_echo=$ac_try;;
23991esac
23992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23993 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023994 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023995 grep -v '^ *+' conftest.er1 >conftest.err
23996 rm -f conftest.er1
23997 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023999 (exit $ac_status); } && {
24000 test -z "$ac_c_werror_flag" ||
24001 test ! -s conftest.err
24002 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024003 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024004else
Martin v. Löwis11437992002-04-12 09:54:03 +000024005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024006sed 's/^/| /' conftest.$ac_ext >&5
24007
Martin v. Löwiseba40652007-08-30 20:10:57 +000024008 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024010
24011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024013{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24014echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024015if test $ac_cv_type_socklen_t = yes; then
24016 :
24017else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024018
Martin v. Löwis01c04012002-11-11 14:58:44 +000024019cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024020#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024021_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024022
24023fi
24024
Michael W. Hudson54241132001-12-07 15:38:26 +000024025
Michael W. Hudson54241132001-12-07 15:38:26 +000024026
24027
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024028for h in `(cd $srcdir;echo Python/thread_*.h)`
24029do
24030 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24031done
24032
Michael W. Hudson54241132001-12-07 15:38:26 +000024033
Neal Norwitzd24499d2005-12-18 21:36:39 +000024034SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024035{ echo "$as_me:$LINENO: checking for build directories" >&5
24036echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024037for dir in $SRCDIRS; do
24038 if test ! -d $dir; then
24039 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024040 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024041done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024042{ echo "$as_me:$LINENO: result: done" >&5
24043echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024044
Guido van Rossum627b2d71993-12-24 10:39:16 +000024045# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024046ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024047
Martin v. Löwis11437992002-04-12 09:54:03 +000024048cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024049# This file is a shell script that caches the results of configure
24050# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024051# scripts and configure runs, see configure's option --config-cache.
24052# It is not useful on other systems. If it contains results you don't
24053# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024054#
Martin v. Löwis11437992002-04-12 09:54:03 +000024055# config.status only pays attention to the cache file if you give it
24056# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024057#
Skip Montanaro6dead952003-09-25 14:50:04 +000024058# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024059# loading this file, other *unset* `ac_cv_foo' will be assigned the
24060# following values.
24061
24062_ACEOF
24063
Guido van Rossumf78abae1997-01-21 22:02:36 +000024064# The following way of writing the cache mishandles newlines in values,
24065# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024066# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024067# Ultrix sh set writes to stderr and can't be redirected directly,
24068# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024069(
24070 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24071 eval ac_val=\$$ac_var
24072 case $ac_val in #(
24073 *${as_nl}*)
24074 case $ac_var in #(
24075 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24076echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24077 esac
24078 case $ac_var in #(
24079 _ | IFS | as_nl) ;; #(
24080 *) $as_unset $ac_var ;;
24081 esac ;;
24082 esac
24083 done
24084
Martin v. Löwis11437992002-04-12 09:54:03 +000024085 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024086 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24087 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024088 # `set' does not quote correctly, so add quotes (double-quote
24089 # substitution turns \\\\ into \\, and sed turns \\ into \).
24090 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024091 "s/'/'\\\\''/g;
24092 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024093 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024094 *)
24095 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024096 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024097 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024098 esac |
24099 sort
24100) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024101 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024102 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024103 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024104 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024105 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24106 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024107 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24108 :end' >>confcache
24109if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24110 if test -w "$cache_file"; then
24111 test "x$cache_file" != "x/dev/null" &&
24112 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24113echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024114 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024115 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024116 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24117echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024118 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024119fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024120rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024121
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024122test "x$prefix" = xNONE && prefix=$ac_default_prefix
24123# Let make expand exec_prefix.
24124test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024126DEFS=-DHAVE_CONFIG_H
24127
Skip Montanaro6dead952003-09-25 14:50:04 +000024128ac_libobjs=
24129ac_ltlibobjs=
24130for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24131 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024132 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24133 ac_i=`echo "$ac_i" | sed "$ac_script"`
24134 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24135 # will be set to the directory where LIBOBJS objects are built.
24136 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24137 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024138done
24139LIBOBJS=$ac_libobjs
24140
24141LTLIBOBJS=$ac_ltlibobjs
24142
24143
Martin v. Löwis11437992002-04-12 09:54:03 +000024144
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024145: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024146ac_clean_files_save=$ac_clean_files
24147ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24148{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24149echo "$as_me: creating $CONFIG_STATUS" >&6;}
24150cat >$CONFIG_STATUS <<_ACEOF
24151#! $SHELL
24152# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024153# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024154# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024155# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024156
Martin v. Löwis11437992002-04-12 09:54:03 +000024157debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024158ac_cs_recheck=false
24159ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024160SHELL=\${CONFIG_SHELL-$SHELL}
24161_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024162
Martin v. Löwis11437992002-04-12 09:54:03 +000024163cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024164## --------------------- ##
24165## M4sh Initialization. ##
24166## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024167
Martin v. Löwiseba40652007-08-30 20:10:57 +000024168# Be more Bourne compatible
24169DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024170if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24171 emulate sh
24172 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024173 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24174 # is contrary to our usage. Disable this feature.
24175 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024176 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024177else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024178 case `(set -o) 2>/dev/null` in
24179 *posix*) set -o posix ;;
24180esac
24181
Martin v. Löwis11437992002-04-12 09:54:03 +000024182fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024183
Skip Montanaro6dead952003-09-25 14:50:04 +000024184
Martin v. Löwis11437992002-04-12 09:54:03 +000024185
24186
Martin v. Löwiseba40652007-08-30 20:10:57 +000024187# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024188# Avoid depending upon Character Ranges.
24189as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24190as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24191as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24192as_cr_digits='0123456789'
24193as_cr_alnum=$as_cr_Letters$as_cr_digits
24194
24195# The user is always right.
24196if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024197 echo "#! /bin/sh" >conf$$.sh
24198 echo "exit 0" >>conf$$.sh
24199 chmod +x conf$$.sh
24200 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024201 PATH_SEPARATOR=';'
24202 else
24203 PATH_SEPARATOR=:
24204 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024205 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024206fi
24207
Martin v. Löwiseba40652007-08-30 20:10:57 +000024208# Support unset when possible.
24209if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24210 as_unset=unset
24211else
24212 as_unset=false
24213fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024214
Martin v. Löwiseba40652007-08-30 20:10:57 +000024215
24216# IFS
24217# We need space, tab and new line, in precisely that order. Quoting is
24218# there to prevent editors from complaining about space-tab.
24219# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24220# splitting by setting IFS to empty value.)
24221as_nl='
24222'
24223IFS=" "" $as_nl"
24224
24225# Find who we are. Look in the path if we contain no directory separator.
24226case $0 in
24227 *[\\/]* ) as_myself=$0 ;;
24228 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024229for as_dir in $PATH
24230do
24231 IFS=$as_save_IFS
24232 test -z "$as_dir" && as_dir=.
24233 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24234done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024235IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024236
Martin v. Löwiseba40652007-08-30 20:10:57 +000024237 ;;
24238esac
24239# We did not find ourselves, most probably we were run as `sh COMMAND'
24240# in which case we are not to be found in the path.
24241if test "x$as_myself" = x; then
24242 as_myself=$0
24243fi
24244if test ! -f "$as_myself"; then
24245 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24246 { (exit 1); exit 1; }
24247fi
24248
24249# Work around bugs in pre-3.0 UWIN ksh.
24250for as_var in ENV MAIL MAILPATH
24251do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24252done
24253PS1='$ '
24254PS2='> '
24255PS4='+ '
24256
24257# NLS nuisances.
24258for as_var in \
24259 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24260 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24261 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024262do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024263 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24264 eval $as_var=C; export $as_var
24265 else
24266 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24267 fi
24268done
24269
24270# Required to use basename.
24271if expr a : '\(a\)' >/dev/null 2>&1 &&
24272 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24273 as_expr=expr
24274else
24275 as_expr=false
24276fi
24277
24278if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24279 as_basename=basename
24280else
24281 as_basename=false
24282fi
24283
24284
24285# Name of the executable.
24286as_me=`$as_basename -- "$0" ||
24287$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24288 X"$0" : 'X\(//\)$' \| \
24289 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24290echo X/"$0" |
24291 sed '/^.*\/\([^/][^/]*\)\/*$/{
24292 s//\1/
24293 q
24294 }
24295 /^X\/\(\/\/\)$/{
24296 s//\1/
24297 q
24298 }
24299 /^X\/\(\/\).*/{
24300 s//\1/
24301 q
24302 }
24303 s/.*/./; q'`
24304
24305# CDPATH.
24306$as_unset CDPATH
24307
24308
24309
Martin v. Löwis11437992002-04-12 09:54:03 +000024310 as_lineno_1=$LINENO
24311 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024312 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024313 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024314
Martin v. Löwis11437992002-04-12 09:54:03 +000024315 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24316 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024317 # line-number line after each line using $LINENO; the second 'sed'
24318 # does the real work. The second script uses 'N' to pair each
24319 # line-number line with the line containing $LINENO, and appends
24320 # trailing '-' during substitution so that $LINENO is not a special
24321 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024322 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024323 # scripts with optimization help from Paolo Bonzini. Blame Lee
24324 # E. McMahon (1931-1989) for sed's syntax. :-)
24325 sed -n '
24326 p
24327 /[$]LINENO/=
24328 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024329 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024330 s/[$]LINENO.*/&-/
24331 t lineno
24332 b
24333 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024334 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024335 :loop
24336 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024337 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024338 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024339 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024340 chmod +x "$as_me.lineno" ||
24341 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024342 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024343
Martin v. Löwis11437992002-04-12 09:54:03 +000024344 # Don't try to exec as it changes $[0], causing all sort of problems
24345 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024346 # original and so on. Autoconf is especially sensitive to this).
24347 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024348 # Exit status is that of the last command.
24349 exit
24350}
24351
24352
Martin v. Löwiseba40652007-08-30 20:10:57 +000024353if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24354 as_dirname=dirname
24355else
24356 as_dirname=false
24357fi
24358
24359ECHO_C= ECHO_N= ECHO_T=
24360case `echo -n x` in
24361-n*)
24362 case `echo 'x\c'` in
24363 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24364 *) ECHO_C='\c';;
24365 esac;;
24366*)
24367 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024368esac
24369
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370if expr a : '\(a\)' >/dev/null 2>&1 &&
24371 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024372 as_expr=expr
24373else
24374 as_expr=false
24375fi
24376
24377rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024378if test -d conf$$.dir; then
24379 rm -f conf$$.dir/conf$$.file
24380else
24381 rm -f conf$$.dir
24382 mkdir conf$$.dir
24383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024384echo >conf$$.file
24385if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024386 as_ln_s='ln -s'
24387 # ... but there are two gotchas:
24388 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24389 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24390 # In both cases, we have to default to `cp -p'.
24391 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024392 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024393elif ln conf$$.file conf$$ 2>/dev/null; then
24394 as_ln_s=ln
24395else
24396 as_ln_s='cp -p'
24397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024398rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24399rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024400
Skip Montanaro6dead952003-09-25 14:50:04 +000024401if mkdir -p . 2>/dev/null; then
24402 as_mkdir_p=:
24403else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024404 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024405 as_mkdir_p=false
24406fi
24407
Martin v. Löwiseba40652007-08-30 20:10:57 +000024408if test -x / >/dev/null 2>&1; then
24409 as_test_x='test -x'
24410else
24411 if ls -dL / >/dev/null 2>&1; then
24412 as_ls_L_option=L
24413 else
24414 as_ls_L_option=
24415 fi
24416 as_test_x='
24417 eval sh -c '\''
24418 if test -d "$1"; then
24419 test -d "$1/.";
24420 else
24421 case $1 in
24422 -*)set "./$1";;
24423 esac;
24424 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24425 ???[sx]*):;;*)false;;esac;fi
24426 '\'' sh
24427 '
24428fi
24429as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024430
24431# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024432as_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 +000024433
24434# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024435as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024436
24437
Martin v. Löwis11437992002-04-12 09:54:03 +000024438exec 6>&1
24439
Martin v. Löwiseba40652007-08-30 20:10:57 +000024440# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024441# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024442# values after options handling.
24443ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024444This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024446
24447 CONFIG_FILES = $CONFIG_FILES
24448 CONFIG_HEADERS = $CONFIG_HEADERS
24449 CONFIG_LINKS = $CONFIG_LINKS
24450 CONFIG_COMMANDS = $CONFIG_COMMANDS
24451 $ $0 $@
24452
Martin v. Löwiseba40652007-08-30 20:10:57 +000024453on `(hostname || uname -n) 2>/dev/null | sed 1q`
24454"
24455
Martin v. Löwis11437992002-04-12 09:54:03 +000024456_ACEOF
24457
Martin v. Löwiseba40652007-08-30 20:10:57 +000024458cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024459# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024460config_files="$ac_config_files"
24461config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024462
Martin v. Löwiseba40652007-08-30 20:10:57 +000024463_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024464
24465cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024466ac_cs_usage="\
24467\`$as_me' instantiates files from templates according to the
24468current configuration.
24469
24470Usage: $0 [OPTIONS] [FILE]...
24471
24472 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024473 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024474 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024475 -d, --debug don't remove temporary files
24476 --recheck update $as_me by reconfiguring in the same conditions
24477 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024478 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024479 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024480 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024481
24482Configuration files:
24483$config_files
24484
24485Configuration headers:
24486$config_headers
24487
24488Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024489
Martin v. Löwiseba40652007-08-30 20:10:57 +000024490_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024491cat >>$CONFIG_STATUS <<_ACEOF
24492ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024493python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024494configured by $0, generated by GNU Autoconf 2.61,
24495 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024496
Martin v. Löwiseba40652007-08-30 20:10:57 +000024497Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024498This config.status script is free software; the Free Software Foundation
24499gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024500
24501ac_pwd='$ac_pwd'
24502srcdir='$srcdir'
24503INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024504_ACEOF
24505
24506cat >>$CONFIG_STATUS <<\_ACEOF
24507# If no file are specified by the user, then we need to provide default
24508# value. By we need to know if files were specified by the user.
24509ac_need_defaults=:
24510while test $# != 0
24511do
24512 case $1 in
24513 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024514 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24515 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024516 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024517 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024518 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024519 ac_option=$1
24520 ac_optarg=$2
24521 ac_shift=shift
24522 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024523 esac
24524
Skip Montanaro6dead952003-09-25 14:50:04 +000024525 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024526 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024527 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24528 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024529 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24530 echo "$ac_cs_version"; exit ;;
24531 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024532 debug=: ;;
24533 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024534 $ac_shift
24535 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024536 ac_need_defaults=false;;
24537 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024538 $ac_shift
24539 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024540 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024541 --he | --h)
24542 # Conflict between --help and --header
24543 { echo "$as_me: error: ambiguous option: $1
24544Try \`$0 --help' for more information." >&2
24545 { (exit 1); exit 1; }; };;
24546 --help | --hel | -h )
24547 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024548 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24549 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24550 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024551
24552 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024553 -*) { echo "$as_me: error: unrecognized option: $1
24554Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024555 { (exit 1); exit 1; }; } ;;
24556
Martin v. Löwiseba40652007-08-30 20:10:57 +000024557 *) ac_config_targets="$ac_config_targets $1"
24558 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024559
24560 esac
24561 shift
24562done
24563
Skip Montanaro6dead952003-09-25 14:50:04 +000024564ac_configure_extra_args=
24565
24566if $ac_cs_silent; then
24567 exec 6>/dev/null
24568 ac_configure_extra_args="$ac_configure_extra_args --silent"
24569fi
24570
24571_ACEOF
24572cat >>$CONFIG_STATUS <<_ACEOF
24573if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024574 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24575 CONFIG_SHELL=$SHELL
24576 export CONFIG_SHELL
24577 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024578fi
24579
Martin v. Löwis11437992002-04-12 09:54:03 +000024580_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024581cat >>$CONFIG_STATUS <<\_ACEOF
24582exec 5>>config.log
24583{
24584 echo
24585 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24586## Running $as_me. ##
24587_ASBOX
24588 echo "$ac_log"
24589} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024590
Martin v. Löwiseba40652007-08-30 20:10:57 +000024591_ACEOF
24592cat >>$CONFIG_STATUS <<_ACEOF
24593_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024594
24595cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024596
24597# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024598for ac_config_target in $ac_config_targets
24599do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024600 case $ac_config_target in
24601 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24602 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24603 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24604 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024605 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
24606 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024607 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24608 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24609
Martin v. Löwis11437992002-04-12 09:54:03 +000024610 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24611echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24612 { (exit 1); exit 1; }; };;
24613 esac
24614done
24615
Martin v. Löwiseba40652007-08-30 20:10:57 +000024616
Martin v. Löwis11437992002-04-12 09:54:03 +000024617# If the user did not use the arguments to specify the items to instantiate,
24618# then the envvar interface is used. Set only those that are not.
24619# We use the long form for the default assignment because of an extremely
24620# bizarre bug on SunOS 4.1.3.
24621if $ac_need_defaults; then
24622 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24623 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24624fi
24625
Skip Montanaro6dead952003-09-25 14:50:04 +000024626# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024627# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024628# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024629# Hook for its removal unless debugging.
24630# Note that there is a small window in which the directory will not be cleaned:
24631# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024632$debug ||
24633{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024634 tmp=
24635 trap 'exit_status=$?
24636 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24637' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024638 trap '{ (exit 1); exit 1; }' 1 2 13 15
24639}
Martin v. Löwis11437992002-04-12 09:54:03 +000024640# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024641
Martin v. Löwis11437992002-04-12 09:54:03 +000024642{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024643 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024644 test -n "$tmp" && test -d "$tmp"
24645} ||
24646{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024647 tmp=./conf$$-$RANDOM
24648 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024649} ||
24650{
Skip Montanaro6dead952003-09-25 14:50:04 +000024651 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024652 { (exit 1); exit 1; }
24653}
24654
Martin v. Löwis11437992002-04-12 09:54:03 +000024655#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024656# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024657#
24658
24659# No need to generate the scripts if there are no CONFIG_FILES.
24660# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024661if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024662
24663_ACEOF
24664
Martin v. Löwiseba40652007-08-30 20:10:57 +000024665
24666
24667ac_delim='%!_!# '
24668for ac_last_try in false false false false false :; do
24669 cat >conf$$subs.sed <<_ACEOF
24670SHELL!$SHELL$ac_delim
24671PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24672PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24673PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24674PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24675PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24676PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24677exec_prefix!$exec_prefix$ac_delim
24678prefix!$prefix$ac_delim
24679program_transform_name!$program_transform_name$ac_delim
24680bindir!$bindir$ac_delim
24681sbindir!$sbindir$ac_delim
24682libexecdir!$libexecdir$ac_delim
24683datarootdir!$datarootdir$ac_delim
24684datadir!$datadir$ac_delim
24685sysconfdir!$sysconfdir$ac_delim
24686sharedstatedir!$sharedstatedir$ac_delim
24687localstatedir!$localstatedir$ac_delim
24688includedir!$includedir$ac_delim
24689oldincludedir!$oldincludedir$ac_delim
24690docdir!$docdir$ac_delim
24691infodir!$infodir$ac_delim
24692htmldir!$htmldir$ac_delim
24693dvidir!$dvidir$ac_delim
24694pdfdir!$pdfdir$ac_delim
24695psdir!$psdir$ac_delim
24696libdir!$libdir$ac_delim
24697localedir!$localedir$ac_delim
24698mandir!$mandir$ac_delim
24699DEFS!$DEFS$ac_delim
24700ECHO_C!$ECHO_C$ac_delim
24701ECHO_N!$ECHO_N$ac_delim
24702ECHO_T!$ECHO_T$ac_delim
24703LIBS!$LIBS$ac_delim
24704build_alias!$build_alias$ac_delim
24705host_alias!$host_alias$ac_delim
24706target_alias!$target_alias$ac_delim
24707VERSION!$VERSION$ac_delim
24708SOVERSION!$SOVERSION$ac_delim
24709CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24710UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24711PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024712PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024713PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24714PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24715PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24716FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24717FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24718FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24719FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24720FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24721MACHDEP!$MACHDEP$ac_delim
24722SGI_ABI!$SGI_ABI$ac_delim
24723EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24724EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24725CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24726EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24727CC!$CC$ac_delim
24728CFLAGS!$CFLAGS$ac_delim
24729LDFLAGS!$LDFLAGS$ac_delim
24730CPPFLAGS!$CPPFLAGS$ac_delim
24731ac_ct_CC!$ac_ct_CC$ac_delim
24732EXEEXT!$EXEEXT$ac_delim
24733OBJEXT!$OBJEXT$ac_delim
24734CXX!$CXX$ac_delim
24735MAINCC!$MAINCC$ac_delim
24736CPP!$CPP$ac_delim
24737GREP!$GREP$ac_delim
24738EGREP!$EGREP$ac_delim
24739BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24740LIBRARY!$LIBRARY$ac_delim
24741LDLIBRARY!$LDLIBRARY$ac_delim
24742DLLLIBRARY!$DLLLIBRARY$ac_delim
24743BLDLIBRARY!$BLDLIBRARY$ac_delim
24744LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24745INSTSONAME!$INSTSONAME$ac_delim
24746RUNSHARED!$RUNSHARED$ac_delim
24747LINKCC!$LINKCC$ac_delim
24748RANLIB!$RANLIB$ac_delim
24749AR!$AR$ac_delim
24750SVNVERSION!$SVNVERSION$ac_delim
24751INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24752INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24753INSTALL_DATA!$INSTALL_DATA$ac_delim
24754LN!$LN$ac_delim
24755OPT!$OPT$ac_delim
24756BASECFLAGS!$BASECFLAGS$ac_delim
24757OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24758LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24759SO!$SO$ac_delim
24760LDSHARED!$LDSHARED$ac_delim
24761BLDSHARED!$BLDSHARED$ac_delim
24762CCSHARED!$CCSHARED$ac_delim
24763LINKFORSHARED!$LINKFORSHARED$ac_delim
24764CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24765SHLIBS!$SHLIBS$ac_delim
24766USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024767_ACEOF
24768
24769 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24770 break
24771 elif $ac_last_try; then
24772 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24773echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24774 { (exit 1); exit 1; }; }
24775 else
24776 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024777 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024778done
24779
24780ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24781if test -n "$ac_eof"; then
24782 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24783 ac_eof=`expr $ac_eof + 1`
24784fi
24785
24786cat >>$CONFIG_STATUS <<_ACEOF
24787cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24788/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24789_ACEOF
24790sed '
24791s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24792s/^/s,@/; s/!/@,|#_!!_#|/
24793:n
24794t n
24795s/'"$ac_delim"'$/,g/; t
24796s/$/\\/; p
24797N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24798' >>$CONFIG_STATUS <conf$$subs.sed
24799rm -f conf$$subs.sed
24800cat >>$CONFIG_STATUS <<_ACEOF
24801CEOF$ac_eof
24802_ACEOF
24803
24804
24805ac_delim='%!_!# '
24806for ac_last_try in false false false false false :; do
24807 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024808SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000024809USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24810LDLAST!$LDLAST$ac_delim
24811THREADOBJ!$THREADOBJ$ac_delim
24812DLINCLDIR!$DLINCLDIR$ac_delim
24813DYNLOADFILE!$DYNLOADFILE$ac_delim
24814MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24815TRUE!$TRUE$ac_delim
24816LIBOBJS!$LIBOBJS$ac_delim
24817HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24818HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24819HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24820HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24821HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24822LIBM!$LIBM$ac_delim
24823LIBC!$LIBC$ac_delim
24824UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24825THREADHEADERS!$THREADHEADERS$ac_delim
24826SRCDIRS!$SRCDIRS$ac_delim
24827LTLIBOBJS!$LTLIBOBJS$ac_delim
24828_ACEOF
24829
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000024830 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024831 break
24832 elif $ac_last_try; then
24833 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24834echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24835 { (exit 1); exit 1; }; }
24836 else
24837 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24838 fi
24839done
24840
24841ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24842if test -n "$ac_eof"; then
24843 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24844 ac_eof=`expr $ac_eof + 1`
24845fi
24846
24847cat >>$CONFIG_STATUS <<_ACEOF
24848cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24849/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24850_ACEOF
24851sed '
24852s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24853s/^/s,@/; s/!/@,|#_!!_#|/
24854:n
24855t n
24856s/'"$ac_delim"'$/,g/; t
24857s/$/\\/; p
24858N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24859' >>$CONFIG_STATUS <conf$$subs.sed
24860rm -f conf$$subs.sed
24861cat >>$CONFIG_STATUS <<_ACEOF
24862:end
24863s/|#_!!_#|//g
24864CEOF$ac_eof
24865_ACEOF
24866
24867
24868# VPATH may cause trouble with some makes, so we remove $(srcdir),
24869# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24870# trailing colons and then remove the whole line if VPATH becomes empty
24871# (actually we leave an empty line to preserve line numbers).
24872if test "x$srcdir" = x.; then
24873 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24874s/:*\$(srcdir):*/:/
24875s/:*\${srcdir}:*/:/
24876s/:*@srcdir@:*/:/
24877s/^\([^=]*=[ ]*\):*/\1/
24878s/:*$//
24879s/^[^=]*=[ ]*$//
24880}'
24881fi
24882
24883cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024884fi # test -n "$CONFIG_FILES"
24885
Martin v. Löwiseba40652007-08-30 20:10:57 +000024886
24887for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24888do
24889 case $ac_tag in
24890 :[FHLC]) ac_mode=$ac_tag; continue;;
24891 esac
24892 case $ac_mode$ac_tag in
24893 :[FHL]*:*);;
24894 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24895echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24896 { (exit 1); exit 1; }; };;
24897 :[FH]-) ac_tag=-:-;;
24898 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24899 esac
24900 ac_save_IFS=$IFS
24901 IFS=:
24902 set x $ac_tag
24903 IFS=$ac_save_IFS
24904 shift
24905 ac_file=$1
24906 shift
24907
24908 case $ac_mode in
24909 :L) ac_source=$1;;
24910 :[FH])
24911 ac_file_inputs=
24912 for ac_f
24913 do
24914 case $ac_f in
24915 -) ac_f="$tmp/stdin";;
24916 *) # Look for the file first in the build tree, then in the source tree
24917 # (if the path is not absolute). The absolute path cannot be DOS-style,
24918 # because $ac_f cannot contain `:'.
24919 test -f "$ac_f" ||
24920 case $ac_f in
24921 [\\/$]*) false;;
24922 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24923 esac ||
24924 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24925echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24926 { (exit 1); exit 1; }; };;
24927 esac
24928 ac_file_inputs="$ac_file_inputs $ac_f"
24929 done
24930
24931 # Let's still pretend it is `configure' which instantiates (i.e., don't
24932 # use $as_me), people would be surprised to read:
24933 # /* config.h. Generated by config.status. */
24934 configure_input="Generated from "`IFS=:
24935 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24936 if test x"$ac_file" != x-; then
24937 configure_input="$ac_file. $configure_input"
24938 { echo "$as_me:$LINENO: creating $ac_file" >&5
24939echo "$as_me: creating $ac_file" >&6;}
24940 fi
24941
24942 case $ac_tag in
24943 *:-:* | *:-) cat >"$tmp/stdin";;
24944 esac
24945 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024946 esac
24947
Martin v. Löwiseba40652007-08-30 20:10:57 +000024948 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024949$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024950 X"$ac_file" : 'X\(//\)[^/]' \| \
24951 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024952 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024953echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024954 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24955 s//\1/
24956 q
24957 }
24958 /^X\(\/\/\)[^/].*/{
24959 s//\1/
24960 q
24961 }
24962 /^X\(\/\/\)$/{
24963 s//\1/
24964 q
24965 }
24966 /^X\(\/\).*/{
24967 s//\1/
24968 q
24969 }
24970 s/.*/./; q'`
24971 { as_dir="$ac_dir"
24972 case $as_dir in #(
24973 -*) as_dir=./$as_dir;;
24974 esac
24975 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024976 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 while :; do
24978 case $as_dir in #(
24979 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24980 *) as_qdir=$as_dir;;
24981 esac
24982 as_dirs="'$as_qdir' $as_dirs"
24983 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024984$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024985 X"$as_dir" : 'X\(//\)[^/]' \| \
24986 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024987 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024988echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024989 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24990 s//\1/
24991 q
24992 }
24993 /^X\(\/\/\)[^/].*/{
24994 s//\1/
24995 q
24996 }
24997 /^X\(\/\/\)$/{
24998 s//\1/
24999 q
25000 }
25001 /^X\(\/\).*/{
25002 s//\1/
25003 q
25004 }
25005 s/.*/./; q'`
25006 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025007 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008 test -z "$as_dirs" || eval "mkdir $as_dirs"
25009 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25010echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025011 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025012 ac_builddir=.
25013
Martin v. Löwiseba40652007-08-30 20:10:57 +000025014case "$ac_dir" in
25015.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25016*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025017 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025018 # A ".." for each directory in $ac_dir_suffix.
25019 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25020 case $ac_top_builddir_sub in
25021 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25022 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25023 esac ;;
25024esac
25025ac_abs_top_builddir=$ac_pwd
25026ac_abs_builddir=$ac_pwd$ac_dir_suffix
25027# for backward compatibility:
25028ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025029
25030case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025031 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025032 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025033 ac_top_srcdir=$ac_top_builddir_sub
25034 ac_abs_top_srcdir=$ac_pwd ;;
25035 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025036 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025037 ac_top_srcdir=$srcdir
25038 ac_abs_top_srcdir=$srcdir ;;
25039 *) # Relative name.
25040 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25041 ac_top_srcdir=$ac_top_build_prefix$srcdir
25042 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025043esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025044ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025045
Martin v. Löwis11437992002-04-12 09:54:03 +000025046
Martin v. Löwiseba40652007-08-30 20:10:57 +000025047 case $ac_mode in
25048 :F)
25049 #
25050 # CONFIG_FILE
25051 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025052
25053 case $INSTALL in
25054 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025055 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025056 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025057_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025058
25059cat >>$CONFIG_STATUS <<\_ACEOF
25060# If the template does not know about datarootdir, expand it.
25061# FIXME: This hack should be removed a few years after 2.60.
25062ac_datarootdir_hack=; ac_datarootdir_seen=
25063
25064case `sed -n '/datarootdir/ {
25065 p
25066 q
25067}
25068/@datadir@/p
25069/@docdir@/p
25070/@infodir@/p
25071/@localedir@/p
25072/@mandir@/p
25073' $ac_file_inputs` in
25074*datarootdir*) ac_datarootdir_seen=yes;;
25075*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25076 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25077echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25078_ACEOF
25079cat >>$CONFIG_STATUS <<_ACEOF
25080 ac_datarootdir_hack='
25081 s&@datadir@&$datadir&g
25082 s&@docdir@&$docdir&g
25083 s&@infodir@&$infodir&g
25084 s&@localedir@&$localedir&g
25085 s&@mandir@&$mandir&g
25086 s&\\\${datarootdir}&$datarootdir&g' ;;
25087esac
25088_ACEOF
25089
25090# Neutralize VPATH when `$srcdir' = `.'.
25091# Shell code in configure.ac might set extrasub.
25092# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025093cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025094 sed "$ac_vpsub
25095$extrasub
25096_ACEOF
25097cat >>$CONFIG_STATUS <<\_ACEOF
25098:t
25099/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100s&@configure_input@&$configure_input&;t t
25101s&@top_builddir@&$ac_top_builddir_sub&;t t
25102s&@srcdir@&$ac_srcdir&;t t
25103s&@abs_srcdir@&$ac_abs_srcdir&;t t
25104s&@top_srcdir@&$ac_top_srcdir&;t t
25105s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25106s&@builddir@&$ac_builddir&;t t
25107s&@abs_builddir@&$ac_abs_builddir&;t t
25108s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25109s&@INSTALL@&$ac_INSTALL&;t t
25110$ac_datarootdir_hack
25111" $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 +000025112
Martin v. Löwiseba40652007-08-30 20:10:57 +000025113test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25114 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25115 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25116 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25117which seems to be undefined. Please make sure it is defined." >&5
25118echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25119which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025120
Martin v. Löwiseba40652007-08-30 20:10:57 +000025121 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025122 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025123 -) cat "$tmp/out"; rm -f "$tmp/out";;
25124 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025125 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025126 ;;
25127 :H)
25128 #
25129 # CONFIG_HEADER
25130 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025131_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025132
Martin v. Löwiseba40652007-08-30 20:10:57 +000025133# Transform confdefs.h into a sed script `conftest.defines', that
25134# substitutes the proper values into config.h.in to produce config.h.
25135rm -f conftest.defines conftest.tail
25136# First, append a space to every undef/define line, to ease matching.
25137echo 's/$/ /' >conftest.defines
25138# Then, protect against being on the right side of a sed subst, or in
25139# an unquoted here document, in config.status. If some macros were
25140# called several times there might be several #defines for the same
25141# symbol, which is useless. But do not sort them, since the last
25142# AC_DEFINE must be honored.
25143ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25144# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25145# NAME is the cpp macro being defined, VALUE is the value it is being given.
25146# PARAMS is the parameter list in the macro definition--in most cases, it's
25147# just an empty string.
25148ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25149ac_dB='\\)[ (].*,\\1define\\2'
25150ac_dC=' '
25151ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025152
Martin v. Löwiseba40652007-08-30 20:10:57 +000025153uniq confdefs.h |
25154 sed -n '
25155 t rset
25156 :rset
25157 s/^[ ]*#[ ]*define[ ][ ]*//
25158 t ok
25159 d
25160 :ok
25161 s/[\\&,]/\\&/g
25162 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25163 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25164 ' >>conftest.defines
25165
25166# Remove the space that was appended to ease matching.
25167# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025168# example, in the case of _POSIX_SOURCE, which is predefined and required
25169# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025170# (The regexp can be short, since the line contains either #define or #undef.)
25171echo 's/ $//
25172s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025173
Martin v. Löwiseba40652007-08-30 20:10:57 +000025174# Break up conftest.defines:
25175ac_max_sed_lines=50
25176
25177# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25178# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25179# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25180# et cetera.
25181ac_in='$ac_file_inputs'
25182ac_out='"$tmp/out1"'
25183ac_nxt='"$tmp/out2"'
25184
25185while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025186do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025187 # Write a here document:
25188 cat >>$CONFIG_STATUS <<_ACEOF
25189 # First, check the format of the line:
25190 cat >"\$tmp/defines.sed" <<\\CEOF
25191/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25192/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25193b
25194:def
25195_ACEOF
25196 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025197 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25199 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25200 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25201 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025202 rm -f conftest.defines
25203 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025204done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025205rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025206
Martin v. Löwiseba40652007-08-30 20:10:57 +000025207echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025208cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025209 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025210 echo "/* $configure_input */" >"$tmp/config.h"
25211 cat "$ac_result" >>"$tmp/config.h"
25212 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025213 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25214echo "$as_me: $ac_file is unchanged" >&6;}
25215 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025216 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025217 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025218 fi
25219 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025220 echo "/* $configure_input */"
25221 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025222 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025223 rm -f "$tmp/out12"
25224 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025225
Martin v. Löwiseba40652007-08-30 20:10:57 +000025226
25227 esac
25228
25229done # for ac_tag
25230
Guido van Rossum627b2d71993-12-24 10:39:16 +000025231
Martin v. Löwis11437992002-04-12 09:54:03 +000025232{ (exit 0); exit 0; }
25233_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025234chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025235ac_clean_files=$ac_clean_files_save
25236
25237
25238# configure is writing to config.log, and then calls config.status.
25239# config.status does its own redirection, appending to config.log.
25240# Unfortunately, on DOS this fails, as config.log is still kept open
25241# by configure, so config.status won't be able to write to it; its
25242# output is simply discarded. So we exec the FD to /dev/null,
25243# effectively closing config.log, so it can be properly (re)opened and
25244# appended to by config.status. When coming back to configure, we
25245# need to make the FD available again.
25246if test "$no_create" != yes; then
25247 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025248 ac_config_status_args=
25249 test "$silent" = yes &&
25250 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025251 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025252 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025253 exec 5>>config.log
25254 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25255 # would make configure fail if this is the last instruction.
25256 $ac_cs_success || { (exit 1); exit 1; }
25257fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025258
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025259
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025260echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025261if test ! -f Modules/Setup
25262then
25263 cp $srcdir/Modules/Setup.dist Modules/Setup
25264fi
25265
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025266echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025267if test ! -f Modules/Setup.local
25268then
25269 echo "# Edit this file for local setup changes" >Modules/Setup.local
25270fi
25271
25272echo "creating Makefile"
25273$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25274 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025275 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025276
25277case $ac_sys_system in
25278BeOS)
25279 { echo "$as_me:$LINENO: WARNING:
25280
25281 Support for BeOS is deprecated as of Python 2.6.
25282 See PEP 11 for the gory details.
25283 " >&5
25284echo "$as_me: WARNING:
25285
25286 Support for BeOS is deprecated as of Python 2.6.
25287 See PEP 11 for the gory details.
25288 " >&2;}
25289 ;;
25290*) ;;
25291esac
25292
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025293mv config.c Modules