blob: 052d780f6ec4801e04e136bb63a5c0aad3c0138b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisaef18b12008-03-24 13:31:16 +00002# From configure.in Revision: 61722 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004# Generated by GNU Autoconf 2.61 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
43# The user is always right.
44if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000045 echo "#! /bin/sh" >conf$$.sh
46 echo "exit 0" >>conf$$.sh
47 chmod +x conf$$.sh
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000049 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000053 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000054fi
55
Martin v. Löwiseba40652007-08-30 20:10:57 +000056# Support unset when possible.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
58 as_unset=unset
59else
60 as_unset=false
61fi
Martin v. Löwis11437992002-04-12 09:54:03 +000062
Martin v. Löwiseba40652007-08-30 20:10:57 +000063
64# IFS
65# We need space, tab and new line, in precisely that order. Quoting is
66# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl"
72
73# Find who we are. Look in the path if we contain no directory separator.
74case $0 in
75 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000077for as_dir in $PATH
78do
79 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done
Martin v. Löwiseba40652007-08-30 20:10:57 +000083IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000084
Martin v. Löwiseba40652007-08-30 20:10:57 +000085 ;;
86esac
87# We did not find ourselves, most probably we were run as `sh COMMAND'
88# in which case we are not to be found in the path.
89if test "x$as_myself" = x; then
90 as_myself=$0
91fi
92if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; }
95fi
96
97# Work around bugs in pre-3.0 UWIN ksh.
98for as_var in ENV MAIL MAILPATH
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
100done
101PS1='$ '
102PS2='> '
103PS4='+ '
104
105# NLS nuisances.
106for as_var in \
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
109 LC_TELEPHONE LC_TIME
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
Martin v. Löwis11437992002-04-12 09:54:03 +0000115 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152
153# CDPATH.
154$as_unset CDPATH
155
156
157if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then
159 as_have_required=yes
160else
161 as_have_required=no
162fi
163
164 if test $as_have_required = yes && (eval ":
165(as_func_return () {
166 (exit \$1)
167}
168as_func_success () {
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180
181exitcode=0
182if as_func_success; then
183 :
184else
185 exitcode=1
186 echo as_func_success failed.
187fi
188
189if as_func_failure; then
190 exitcode=1
191 echo as_func_failure succeeded.
192fi
193
194if as_func_ret_success; then
195 :
196else
197 exitcode=1
198 echo as_func_ret_success failed.
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else
209 exitcode=1
210 echo positional parameters were not saved.
211fi
212
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else
223 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do
227 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000229 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000230 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000231 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
233 done;;
234 esac
235done
236IFS=$as_save_IFS
237
238
239 for as_shell in $as_candidate_shells $SHELL; do
240 # Try only shells that exist, to save several forks.
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
242 { ("$as_shell") 2> /dev/null <<\_ASEOF
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
244 emulate sh
245 NULLCMD=:
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
247 # is contrary to our usage. Disable this feature.
248 alias -g '${1+"$@"}'='"$@"'
249 setopt NO_GLOB_SUBST
250else
251 case `(set -o) 2>/dev/null` in
252 *posix*) set -o posix ;;
253esac
254
255fi
256
257
258:
259_ASEOF
260}; then
261 CONFIG_SHELL=$as_shell
262 as_have_required=yes
263 if { "$as_shell" 2> /dev/null <<\_ASEOF
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
265 emulate sh
266 NULLCMD=:
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
268 # is contrary to our usage. Disable this feature.
269 alias -g '${1+"$@"}'='"$@"'
270 setopt NO_GLOB_SUBST
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi
277
278
279:
280(as_func_return () {
281 (exit $1)
282}
283as_func_success () {
284 as_func_return 0
285}
286as_func_failure () {
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294}
295
296exitcode=0
297if as_func_success; then
298 :
299else
300 exitcode=1
301 echo as_func_success failed.
302fi
303
304if as_func_failure; then
305 exitcode=1
306 echo as_func_failure succeeded.
307fi
308
309if as_func_ret_success; then
310 :
311else
312 exitcode=1
313 echo as_func_ret_success failed.
314fi
315
316if as_func_ret_failure; then
317 exitcode=1
318 echo as_func_ret_failure succeeded.
319fi
320
321if ( set x; as_func_ret_success y && test x = "$1" ); then
322 :
323else
324 exitcode=1
325 echo positional parameters were not saved.
326fi
327
328test $exitcode = 0) || { (exit 1); exit 1; }
329
330(
Skip Montanaro89e975f2007-08-22 19:05:21 +0000331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000333 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367
368
369(eval "as_func_return () {
370 (exit \$1)
371}
372as_func_success () {
373 as_func_return 0
374}
375as_func_failure () {
376 as_func_return 1
377}
378as_func_ret_success () {
379 return 0
380}
381as_func_ret_failure () {
382 return 1
383}
384
385exitcode=0
386if as_func_success; then
387 :
388else
389 exitcode=1
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi
397
398if as_func_ret_success; then
399 :
400else
401 exitcode=1
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi
409
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
411 :
412else
413 exitcode=1
414 echo positional parameters were not saved.
415fi
416
417test \$exitcode = 0") || {
418 echo No shell found that supports shell functions.
419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
422}
423
424
425
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000430
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +0000433 # line-number line after each line using $LINENO; the second 'sed'
434 # does the real work. The second script uses 'N' to pair each
435 # line-number line with the line containing $LINENO, and appends
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n '
442 p
443 /[$]LINENO/=
444 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000445 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000446 s/[$]LINENO.*/&-/
447 t lineno
448 b
449 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000450 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000451 :loop
452 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000454 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000455 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000456 chmod +x "$as_me.lineno" ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
458 { (exit 1); exit 1; }; }
459
460 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000462 # original and so on. Autoconf is especially sensitive to this).
463 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 # Exit status is that of the last command.
465 exit
466}
467
468
Martin v. Löwiseba40652007-08-30 20:10:57 +0000469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in
477-n*)
478 case `echo 'x\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';;
481 esac;;
482*)
483 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000484esac
485
Martin v. Löwiseba40652007-08-30 20:10:57 +0000486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000494if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file
496else
497 rm -f conf$$.dir
498 mkdir conf$$.dir
499fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000502 as_ln_s='ln -s'
503 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000508 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
511else
512 as_ln_s='cp -p'
513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000514rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000516
Skip Montanaro6dead952003-09-25 14:50:04 +0000517if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=:
519else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000520 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000521 as_mkdir_p=false
522fi
523
Martin v. Löwiseba40652007-08-30 20:10:57 +0000524if test -x / >/dev/null 2>&1; then
525 as_test_x='test -x'
526else
527 if ls -dL / >/dev/null 2>&1; then
528 as_ls_L_option=L
529 else
530 as_ls_L_option=
531 fi
532 as_test_x='
533 eval sh -c '\''
534 if test -d "$1"; then
535 test -d "$1/.";
536 else
537 case $1 in
538 -*)set "./$1";;
539 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
541 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh
543 '
544fi
545as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000546
547# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000548as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000549
550# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553
Martin v. Löwis11437992002-04-12 09:54:03 +0000554
Martin v. Löwiseba40652007-08-30 20:10:57 +0000555exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
559# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561
Martin v. Löwis11437992002-04-12 09:54:03 +0000562#
563# Initializations.
564#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000565ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000566ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000567ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000568LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000569cross_compiling=no
570subdirs=
571MFLAGS=
572MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574
Martin v. Löwis11437992002-04-12 09:54:03 +0000575# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000576PACKAGE_NAME='python'
577PACKAGE_TARNAME='python'
Neal Norwitz9be57322006-08-18 05:39:20 +0000578PACKAGE_VERSION='2.6'
579PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000580PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000581
582ac_unique_file="Include/object.h"
583# Factoring default headers for most tests.
584ac_includes_default="\
585#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000586#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000587# include <sys/types.h>
588#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000589#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000590# include <sys/stat.h>
591#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000592#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <stdlib.h>
594# include <stddef.h>
595#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <stdlib.h>
598# endif
599#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000600#ifdef HAVE_STRING_H
601# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000602# include <memory.h>
603# endif
604# include <string.h>
605#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000606#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000607# include <strings.h>
608#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000609#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000610# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000611#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000612#ifdef HAVE_STDINT_H
613# include <stdint.h>
614#endif
615#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <unistd.h>
617#endif"
618
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656VERSION
657SOVERSION
658CONFIG_ARGS
659UNIVERSALSDK
660PYTHONFRAMEWORK
661PYTHONFRAMEWORKDIR
662PYTHONFRAMEWORKPREFIX
663PYTHONFRAMEWORKINSTALLDIR
664FRAMEWORKINSTALLFIRST
665FRAMEWORKINSTALLLAST
666FRAMEWORKALTINSTALLFIRST
667FRAMEWORKALTINSTALLLAST
668FRAMEWORKUNIXTOOLSPREFIX
669MACHDEP
670SGI_ABI
671EXTRAPLATDIR
672EXTRAMACHDEPPATH
673CONFIGURE_MACOSX_DEPLOYMENT_TARGET
674EXPORT_MACOSX_DEPLOYMENT_TARGET
675CC
676CFLAGS
677LDFLAGS
678CPPFLAGS
679ac_ct_CC
680EXEEXT
681OBJEXT
682CXX
683MAINCC
684CPP
685GREP
686EGREP
687BUILDEXEEXT
688LIBRARY
689LDLIBRARY
690DLLLIBRARY
691BLDLIBRARY
692LDLIBRARYDIR
693INSTSONAME
694RUNSHARED
695LINKCC
696RANLIB
697AR
698SVNVERSION
699INSTALL_PROGRAM
700INSTALL_SCRIPT
701INSTALL_DATA
702LN
703OPT
704BASECFLAGS
705OTHER_LIBTOOL_OPT
706LIBTOOL_CRUFT
707SO
708LDSHARED
709BLDSHARED
710CCSHARED
711LINKFORSHARED
712CFLAGSFORSHARED
713SHLIBS
714USE_SIGNAL_MODULE
715SIGNAL_OBJS
716USE_THREAD_MODULE
717LDLAST
718THREADOBJ
719DLINCLDIR
720DYNLOADFILE
721MACHDEP_OBJS
722TRUE
723LIBOBJS
724HAVE_GETHOSTBYNAME_R_6_ARG
725HAVE_GETHOSTBYNAME_R_5_ARG
726HAVE_GETHOSTBYNAME_R_3_ARG
727HAVE_GETHOSTBYNAME_R
728HAVE_GETHOSTBYNAME
729LIBM
730LIBC
731UNICODE_OBJS
732THREADHEADERS
733SRCDIRS
734LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000735ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000736 ac_precious_vars='build_alias
737host_alias
738target_alias
739CC
740CFLAGS
741LDFLAGS
742LIBS
743CPPFLAGS
744CPP'
745
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000748ac_init_help=
749ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# The variables have the same names as the options, with
751# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000752cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000753exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000754no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000755no_recursion=
756prefix=NONE
757program_prefix=NONE
758program_suffix=NONE
759program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000761site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000762srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764x_includes=NONE
765x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000766
767# Installation directory options.
768# These are left unexpanded so users can "make install exec_prefix=/foo"
769# and all the variables that are supposed to be based on exec_prefix
770# by default will actually change.
771# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000772# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000773bindir='${exec_prefix}/bin'
774sbindir='${exec_prefix}/sbin'
775libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000776datarootdir='${prefix}/share'
777datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778sysconfdir='${prefix}/etc'
779sharedstatedir='${prefix}/com'
780localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781includedir='${prefix}/include'
782oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000783docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
784infodir='${datarootdir}/info'
785htmldir='${docdir}'
786dvidir='${docdir}'
787pdfdir='${docdir}'
788psdir='${docdir}'
789libdir='${exec_prefix}/lib'
790localedir='${datarootdir}/locale'
791mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000792
Guido van Rossum7f43da71994-08-01 12:15:30 +0000793ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000794ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000795for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000796do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797 # If the previous option needs an argument, assign it.
798 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 ac_prev=
801 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 case $ac_option in
805 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
806 *) ac_optarg=yes ;;
807 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809 # Accept the important Cygnus configure options, so we can diagnose typos.
810
Martin v. Löwiseba40652007-08-30 20:10:57 +0000811 case $ac_dashdash$ac_option in
812 --)
813 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000815 -bindir | --bindir | --bindi | --bind | --bin | --bi)
816 ac_prev=bindir ;;
817 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000818 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819
820 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000825 -cache-file | --cache-file | --cache-fil | --cache-fi \
826 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
827 ac_prev=cache_file ;;
828 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
829 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000830 cache_file=$ac_optarg ;;
831
832 --config-cache | -C)
833 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000834
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000838 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
841 | --dataroo | --dataro | --datar)
842 ac_prev=datarootdir ;;
843 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
844 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
845 datarootdir=$ac_optarg ;;
846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000848 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000850 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
852 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
854 eval enable_$ac_feature=no ;;
855
856 -docdir | --docdir | --docdi | --doc | --do)
857 ac_prev=docdir ;;
858 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
859 docdir=$ac_optarg ;;
860
861 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
862 ac_prev=dvidir ;;
863 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
864 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865
866 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000867 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000869 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
871 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
873 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
876 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
877 | --exec | --exe | --ex)
878 ac_prev=exec_prefix ;;
879 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
880 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
881 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
884 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 # Obsolete; use --with-gas.
886 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 -help | --help | --hel | --he | -h)
889 ac_init_help=long ;;
890 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
891 ac_init_help=recursive ;;
892 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
893 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894
895 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
901 ac_prev=htmldir ;;
902 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
903 | --ht=*)
904 htmldir=$ac_optarg ;;
905
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000906 -includedir | --includedir | --includedi | --included | --include \
907 | --includ | --inclu | --incl | --inc)
908 ac_prev=includedir ;;
909 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
910 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000912
913 -infodir | --infodir | --infodi | --infod | --info | --inf)
914 ac_prev=infodir ;;
915 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -libdir | --libdir | --libdi | --libd)
919 ac_prev=libdir ;;
920 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
924 | --libexe | --libex | --libe)
925 ac_prev=libexecdir ;;
926 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
927 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -localedir | --localedir | --localedi | --localed | --locale)
931 ac_prev=localedir ;;
932 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
933 localedir=$ac_optarg ;;
934
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000936 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000937 ac_prev=localstatedir ;;
938 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
942 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
943 ac_prev=mandir ;;
944 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000948 # Obsolete; use --without-fp.
949 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
951 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953 no_create=yes ;;
954
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
956 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
957 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000959 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
960 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
961 | --oldin | --oldi | --old | --ol | --o)
962 ac_prev=oldincludedir ;;
963 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
964 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
965 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
969 ac_prev=prefix ;;
970 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -program-prefix | --program-prefix | --program-prefi | --program-pref \
974 | --program-pre | --program-pr | --program-p)
975 ac_prev=program_prefix ;;
976 -program-prefix=* | --program-prefix=* | --program-prefi=* \
977 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000978 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979
980 -program-suffix | --program-suffix | --program-suffi | --program-suff \
981 | --program-suf | --program-su | --program-s)
982 ac_prev=program_suffix ;;
983 -program-suffix=* | --program-suffix=* | --program-suffi=* \
984 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
987 -program-transform-name | --program-transform-name \
988 | --program-transform-nam | --program-transform-na \
989 | --program-transform-n | --program-transform- \
990 | --program-transform | --program-transfor \
991 | --program-transfo | --program-transf \
992 | --program-trans | --program-tran \
993 | --progr-tra | --program-tr | --program-t)
994 ac_prev=program_transform_name ;;
995 -program-transform-name=* | --program-transform-name=* \
996 | --program-transform-nam=* | --program-transform-na=* \
997 | --program-transform-n=* | --program-transform-=* \
998 | --program-transform=* | --program-transfor=* \
999 | --program-transfo=* | --program-transf=* \
1000 | --program-trans=* | --program-tran=* \
1001 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Martin v. Löwiseba40652007-08-30 20:10:57 +00001004 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1005 ac_prev=pdfdir ;;
1006 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1007 pdfdir=$ac_optarg ;;
1008
1009 -psdir | --psdir | --psdi | --psd | --ps)
1010 ac_prev=psdir ;;
1011 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1012 psdir=$ac_optarg ;;
1013
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1015 | -silent | --silent | --silen | --sile | --sil)
1016 silent=yes ;;
1017
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001018 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1019 ac_prev=sbindir ;;
1020 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1021 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023
1024 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1025 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1026 | --sharedst | --shareds | --shared | --share | --shar \
1027 | --sha | --sh)
1028 ac_prev=sharedstatedir ;;
1029 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1030 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1031 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1032 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035 -site | --site | --sit)
1036 ac_prev=site ;;
1037 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1041 ac_prev=srcdir ;;
1042 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1046 | --syscon | --sysco | --sysc | --sys | --sy)
1047 ac_prev=sysconfdir ;;
1048 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1049 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1058 verbose=yes ;;
1059
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 -version | --version | --versio | --versi | --vers | -V)
1061 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001065 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1070 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1079 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 --x)
1082 # Obsolete; use --with-x.
1083 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084
1085 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1086 | --x-incl | --x-inc | --x-in | --x-i)
1087 ac_prev=x_includes ;;
1088 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1089 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
1092 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1093 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1094 ac_prev=x_libraries ;;
1095 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1096 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 -*) { echo "$as_me: error: unrecognized option: $ac_option
1100Try \`$0 --help' for more information." >&2
1101 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102 ;;
1103
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 *=*)
1105 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1106 # Reject names that are not valid shell variable names.
1107 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1108 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1109 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001110 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 export $ac_envvar ;;
1112
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001113 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 # FIXME: should be removed in autoconf 3.0.
1115 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1116 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1117 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1118 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119 ;;
1120
1121 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001122done
1123
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1126 { echo "$as_me: error: missing argument to $ac_option" >&2
1127 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128fi
1129
Martin v. Löwiseba40652007-08-30 20:10:57 +00001130# Be sure to have absolute directory names.
1131for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1132 datadir sysconfdir sharedstatedir localstatedir includedir \
1133 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1134 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001138 [\\/$]* | ?:[\\/]* ) continue;;
1139 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001140 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1142 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001143done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001144
Martin v. Löwis11437992002-04-12 09:54:03 +00001145# There might be people who depend on the old broken behavior: `$host'
1146# used to hold the argument of --host etc.
1147# FIXME: To remove some day.
1148build=$build_alias
1149host=$host_alias
1150target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001151
Martin v. Löwis11437992002-04-12 09:54:03 +00001152# FIXME: To remove some day.
1153if test "x$host_alias" != x; then
1154 if test "x$build_alias" = x; then
1155 cross_compiling=maybe
1156 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1157 If a cross compiler is detected then cross compile mode will be used." >&2
1158 elif test "x$build_alias" != "x$host_alias"; then
1159 cross_compiling=yes
1160 fi
1161fi
1162
1163ac_tool_prefix=
1164test -n "$host_alias" && ac_tool_prefix=$host_alias-
1165
1166test "$silent" = yes && exec 6>/dev/null
1167
Guido van Rossum627b2d71993-12-24 10:39:16 +00001168
Martin v. Löwiseba40652007-08-30 20:10:57 +00001169ac_pwd=`pwd` && test -n "$ac_pwd" &&
1170ac_ls_di=`ls -di .` &&
1171ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1172 { echo "$as_me: error: Working directory cannot be determined" >&2
1173 { (exit 1); exit 1; }; }
1174test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1175 { echo "$as_me: error: pwd does not report name of working directory" >&2
1176 { (exit 1); exit 1; }; }
1177
1178
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179# Find the source files, if location was not specified.
1180if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001182 # Try the directory containing this script, then the parent directory.
1183 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001184$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001185 X"$0" : 'X\(//\)[^/]' \| \
1186 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001188echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001189 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)[^/].*/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)$/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\).*/{
1202 s//\1/
1203 q
1204 }
1205 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001207 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208 srcdir=..
1209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001210else
1211 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001213if test ! -r "$srcdir/$ac_unique_file"; then
1214 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1215 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1219ac_abs_confdir=`(
1220 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001221 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001222 pwd)`
1223# When building in place, set srcdir=.
1224if test "$ac_abs_confdir" = "$ac_pwd"; then
1225 srcdir=.
1226fi
1227# Remove unnecessary trailing slashes from srcdir.
1228# Double slashes in file names in object file debugging info
1229# mess up M-x gdb in Emacs.
1230case $srcdir in
1231*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1232esac
1233for ac_var in $ac_precious_vars; do
1234 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1235 eval ac_env_${ac_var}_value=\$${ac_var}
1236 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1237 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1238done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240#
1241# Report the --help message.
1242#
1243if test "$ac_init_help" = "long"; then
1244 # Omit some internal or obsolete options to make the list less imposing.
1245 # This message is too long to be a string in the A/UX 3.1 sh.
1246 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001247\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001248
1249Usage: $0 [OPTION]... [VAR=VALUE]...
1250
1251To assign environment variables (e.g., CC, CFLAGS...), specify them as
1252VAR=VALUE. See below for descriptions of some of the useful variables.
1253
1254Defaults for the options are specified in brackets.
1255
1256Configuration:
1257 -h, --help display this help and exit
1258 --help=short display options specific to this package
1259 --help=recursive display the short help of all the included packages
1260 -V, --version display version information and exit
1261 -q, --quiet, --silent do not print \`checking...' messages
1262 --cache-file=FILE cache test results in FILE [disabled]
1263 -C, --config-cache alias for \`--cache-file=config.cache'
1264 -n, --no-create do not create output files
1265 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1266
Martin v. Löwis11437992002-04-12 09:54:03 +00001267Installation directories:
1268 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001269 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001271 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001272
1273By default, \`make install' will install all the files in
1274\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1275an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1276for instance \`--prefix=\$HOME'.
1277
1278For better control, use the options below.
1279
1280Fine tuning of the installation directories:
1281 --bindir=DIR user executables [EPREFIX/bin]
1282 --sbindir=DIR system admin executables [EPREFIX/sbin]
1283 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001284 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1285 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1286 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1287 --libdir=DIR object code libraries [EPREFIX/lib]
1288 --includedir=DIR C header files [PREFIX/include]
1289 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001290 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1291 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1292 --infodir=DIR info documentation [DATAROOTDIR/info]
1293 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1294 --mandir=DIR man documentation [DATAROOTDIR/man]
1295 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1296 --htmldir=DIR html documentation [DOCDIR]
1297 --dvidir=DIR dvi documentation [DOCDIR]
1298 --pdfdir=DIR pdf documentation [DOCDIR]
1299 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001300_ACEOF
1301
1302 cat <<\_ACEOF
1303_ACEOF
1304fi
1305
1306if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001307 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001308 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001309 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001310 cat <<\_ACEOF
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001315 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001316 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001317 --enable-framework[=INSTALLDIR]
1318 Build (MacOSX|Darwin) framework
1319 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001320 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001321 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1322 --enable-ipv6 Enable ipv6 (with ipv4) support
1323 --disable-ipv6 Disable ipv6 support
1324 --enable-unicode[=ucs[24]]
1325 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001330 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001331 --with-cxx-main=<compiler>
1332 compile main() and link python executable with C++
1333 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001334 --with-suffix=.exe set executable suffix
1335 --with-pydebug build with Py_DEBUG defined
1336 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001337 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001338 --with-signal-module disable/enable signal module
1339 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1340 --with(out)-threads[=DIRECTORY]
1341 disable/enable thread support
1342 --with(out)-thread[=DIRECTORY]
1343 deprecated; use --with(out)-threads
1344 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001345 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001346 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with(out)-pymalloc disable/enable specialized mallocs
1348 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001349 --with-fpectl enable SIGFPE catching
1350 --with-libm=STRING math library
1351 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001352
1353Some influential environment variables:
1354 CC C compiler command
1355 CFLAGS C compiler flags
1356 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1357 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001358 LIBS libraries to pass to the linker, e.g. -l<library>
1359 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1360 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 CPP C preprocessor
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
Martin v. Löwis1d459062005-03-14 21:23:33 +00001366Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001367_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001369fi
1370
1371if test "$ac_init_help" = "recursive"; then
1372 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001373 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001374 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001375 ac_builddir=.
1376
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377case "$ac_dir" in
1378.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1379*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001381 # A ".." for each directory in $ac_dir_suffix.
1382 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1383 case $ac_top_builddir_sub in
1384 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1386 esac ;;
1387esac
1388ac_abs_top_builddir=$ac_pwd
1389ac_abs_builddir=$ac_pwd$ac_dir_suffix
1390# for backward compatibility:
1391ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001395 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001396 ac_top_srcdir=$ac_top_builddir_sub
1397 ac_abs_top_srcdir=$ac_pwd ;;
1398 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001399 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 ac_top_srcdir=$srcdir
1401 ac_abs_top_srcdir=$srcdir ;;
1402 *) # Relative name.
1403 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1404 ac_top_srcdir=$ac_top_build_prefix$srcdir
1405 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001406esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001407ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001408
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 cd "$ac_dir" || { ac_status=$?; continue; }
1410 # Check for guested configure.
1411 if test -f "$ac_srcdir/configure.gnu"; then
1412 echo &&
1413 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1414 elif test -f "$ac_srcdir/configure"; then
1415 echo &&
1416 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 else
1418 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001419 fi || ac_status=$?
1420 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 done
1422fi
1423
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001425if $ac_init_version; then
1426 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001427python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
Martin v. Löwiseba40652007-08-30 20:10:57 +00001430Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14312002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001432This configure script is free software; the Free Software Foundation
1433gives unlimited permission to copy, distribute and modify it.
1434_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001435 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001438This file contains any messages produced by compilers while
1439running configure, to aid debugging if configure makes a mistake.
1440
Neal Norwitz9be57322006-08-18 05:39:20 +00001441It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001442generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001443
1444 $ $0 $@
1445
1446_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001448{
1449cat <<_ASUNAME
1450## --------- ##
1451## Platform. ##
1452## --------- ##
1453
1454hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1455uname -m = `(uname -m) 2>/dev/null || echo unknown`
1456uname -r = `(uname -r) 2>/dev/null || echo unknown`
1457uname -s = `(uname -s) 2>/dev/null || echo unknown`
1458uname -v = `(uname -v) 2>/dev/null || echo unknown`
1459
1460/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1461/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1462
1463/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1464/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1465/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001466/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001467/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1468/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1469/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1470
1471_ASUNAME
1472
1473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1474for as_dir in $PATH
1475do
1476 IFS=$as_save_IFS
1477 test -z "$as_dir" && as_dir=.
1478 echo "PATH: $as_dir"
1479done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001480IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001481
1482} >&5
1483
1484cat >&5 <<_ACEOF
1485
1486
1487## ----------- ##
1488## Core tests. ##
1489## ----------- ##
1490
1491_ACEOF
1492
1493
1494# Keep a trace of the command line.
1495# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001496# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001497# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001498# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001499ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001500ac_configure_args0=
1501ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001502ac_must_keep_next=false
1503for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001504do
Skip Montanaro6dead952003-09-25 14:50:04 +00001505 for ac_arg
1506 do
1507 case $ac_arg in
1508 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1509 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510 | -silent | --silent | --silen | --sile | --sil)
1511 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001513 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1514 esac
1515 case $ac_pass in
1516 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1517 2)
1518 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1519 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001520 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001521 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001522 case $ac_arg in
1523 *=* | --config-cache | -C | -disable-* | --disable-* \
1524 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1525 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1526 | -with-* | --with-* | -without-* | --without-* | --x)
1527 case "$ac_configure_args0 " in
1528 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1529 esac
1530 ;;
1531 -* ) ac_must_keep_next=true ;;
1532 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001533 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001535 ;;
1536 esac
1537 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001538done
Skip Montanaro6dead952003-09-25 14:50:04 +00001539$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1540$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542# When interrupted or exit'd, cleanup temporary files, and complete
1543# config.log. We remove comments because anyway the quotes in there
1544# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545# WARNING: Use '\'' to represent an apostrophe within the trap.
1546# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547trap 'exit_status=$?
1548 # Save into config.log some information that might help in debugging.
1549 {
1550 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001551
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 cat <<\_ASBOX
1553## ---------------- ##
1554## Cache variables. ##
1555## ---------------- ##
1556_ASBOX
1557 echo
1558 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001559(
1560 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1561 eval ac_val=\$$ac_var
1562 case $ac_val in #(
1563 *${as_nl}*)
1564 case $ac_var in #(
1565 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1566echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1567 esac
1568 case $ac_var in #(
1569 _ | IFS | as_nl) ;; #(
1570 *) $as_unset $ac_var ;;
1571 esac ;;
1572 esac
1573 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001574 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1576 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001578 "s/'\''/'\''\\\\'\'''\''/g;
1579 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1580 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001581 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001583 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac |
1585 sort
1586)
Martin v. Löwis11437992002-04-12 09:54:03 +00001587 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001588
1589 cat <<\_ASBOX
1590## ----------------- ##
1591## Output variables. ##
1592## ----------------- ##
1593_ASBOX
1594 echo
1595 for ac_var in $ac_subst_vars
1596 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001597 eval ac_val=\$$ac_var
1598 case $ac_val in
1599 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1600 esac
1601 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001602 done | sort
1603 echo
1604
1605 if test -n "$ac_subst_files"; then
1606 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001607## ------------------- ##
1608## File substitutions. ##
1609## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_files
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
1616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1617 esac
1618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621 fi
1622
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 if test -s confdefs.h; then
1624 cat <<\_ASBOX
1625## ----------- ##
1626## confdefs.h. ##
1627## ----------- ##
1628_ASBOX
1629 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001630 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001631 echo
1632 fi
1633 test "$ac_signal" != 0 &&
1634 echo "$as_me: caught signal $ac_signal"
1635 echo "$as_me: exit $exit_status"
1636 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001637 rm -f core *.core core.conftest.* &&
1638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001639 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001640' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001641for ac_signal in 1 2 13 15; do
1642 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1643done
1644ac_signal=0
1645
1646# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648
1649# Predefined preprocessor variables.
1650
1651cat >>confdefs.h <<_ACEOF
1652#define PACKAGE_NAME "$PACKAGE_NAME"
1653_ACEOF
1654
1655
1656cat >>confdefs.h <<_ACEOF
1657#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1658_ACEOF
1659
1660
1661cat >>confdefs.h <<_ACEOF
1662#define PACKAGE_VERSION "$PACKAGE_VERSION"
1663_ACEOF
1664
1665
1666cat >>confdefs.h <<_ACEOF
1667#define PACKAGE_STRING "$PACKAGE_STRING"
1668_ACEOF
1669
1670
1671cat >>confdefs.h <<_ACEOF
1672#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1673_ACEOF
1674
1675
1676# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001677# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001678if test -n "$CONFIG_SITE"; then
1679 set x "$CONFIG_SITE"
1680elif test "x$prefix" != xNONE; then
1681 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1682else
1683 set x "$ac_default_prefix/share/config.site" \
1684 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001686shift
1687for ac_site_file
1688do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001690 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1691echo "$as_me: loading site script $ac_site_file" >&6;}
1692 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001693 . "$ac_site_file"
1694 fi
1695done
1696
1697if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 # Some versions of bash will fail to source /dev/null (special
1699 # files actually), so we avoid doing that.
1700 if test -f "$cache_file"; then
1701 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1702echo "$as_me: loading cache $cache_file" >&6;}
1703 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001706 esac
1707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001708else
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1710echo "$as_me: creating cache $cache_file" >&6;}
1711 >$cache_file
1712fi
1713
1714# Check that the precious variables saved in the cache have kept the same
1715# value.
1716ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1719 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001722 case $ac_old_set,$ac_new_set in
1723 set,)
1724 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1725echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1726 ac_cache_corrupted=: ;;
1727 ,set)
1728 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1729echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1730 ac_cache_corrupted=: ;;
1731 ,);;
1732 *)
1733 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001734 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001735echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001736 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001737echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001738 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001739echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001740 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001741 fi;;
1742 esac
1743 # Pass precious variables to config.status.
1744 if test "$ac_new_set" = set; then
1745 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001746 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 *) ac_arg=$ac_var=$ac_new_val ;;
1748 esac
1749 case " $ac_configure_args " in
1750 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1751 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1752 esac
1753 fi
1754done
1755if $ac_cache_corrupted; then
1756 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1757echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1758 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1759echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1760 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761fi
1762
Martin v. Löwiseba40652007-08-30 20:10:57 +00001763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
Guido van Rossum7f43da71994-08-01 12:15:30 +00001787ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001788ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1791ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001792
Guido van Rossum627b2d71993-12-24 10:39:16 +00001793
Michael W. Hudson54241132001-12-07 15:38:26 +00001794
Martin v. Löwiseba40652007-08-30 20:10:57 +00001795ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001796
1797
Martin v. Löwis11437992002-04-12 09:54:03 +00001798
1799
1800
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001801
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001802
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001803# We don't use PACKAGE_ variables, and they cause conflicts
1804# with other autoconf-based packages that include Python.h
1805grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1806rm confdefs.h
1807mv confdefs.h.new confdefs.h
1808
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001809
Neal Norwitz9be57322006-08-18 05:39:20 +00001810VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001811
Martin v. Löwis1142de32002-03-29 16:28:31 +00001812
1813SOVERSION=1.0
1814
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001815# The later defininition of _XOPEN_SOURCE disables certain features
1816# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1817
1818cat >>confdefs.h <<\_ACEOF
1819#define _GNU_SOURCE 1
1820_ACEOF
1821
1822
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001823# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1824# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1825# them.
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _NETBSD_SOURCE 1
1829_ACEOF
1830
1831
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define __BSD_VISIBLE 1
1838_ACEOF
1839
1840
Martin v. Löwisd6320502004-08-12 13:45:08 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1843
1844cat >>confdefs.h <<\_ACEOF
1845#define _BSD_TYPES 1
1846_ACEOF
1847
1848
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001849define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001850
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001851# Arguments passed to configure.
1852
1853CONFIG_ARGS="$ac_configure_args"
1854
Martin v. Löwiseba40652007-08-30 20:10:57 +00001855# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001856if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001857 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001858 case $enableval in
1859 yes)
1860 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1861 ;;
1862 esac
1863 case $enableval in
1864 no)
1865 UNIVERSALSDK=
1866 enable_universalsdk=
1867 ;;
1868 *)
1869 UNIVERSALSDK=$enableval
1870 ;;
1871 esac
1872
1873else
1874
1875 UNIVERSALSDK=
1876 enable_universalsdk=
1877
Martin v. Löwiseba40652007-08-30 20:10:57 +00001878fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001879
1880
Martin v. Löwiseba40652007-08-30 20:10:57 +00001881
1882# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001883if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001884 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001885 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001886 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001887 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001888 esac
1889 case $enableval in
1890 no)
1891 PYTHONFRAMEWORK=
1892 PYTHONFRAMEWORKDIR=no-framework
1893 PYTHONFRAMEWORKPREFIX=
1894 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001895 FRAMEWORKINSTALLFIRST=
1896 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001897 FRAMEWORKALTINSTALLFIRST=
1898 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001899 if test "x${prefix}" = "xNONE"; then
1900 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1901 else
1902 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1903 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001904 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001905 ;;
1906 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001907 PYTHONFRAMEWORK=Python
1908 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001909 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001910 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001911 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1912 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001913 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1914 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001915 if test "x${prefix}" = "xNONE" ; then
1916 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1917 else
1918 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1919 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001920 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001921
1922 # Add makefiles for Mac specific code to the list of output
1923 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001924 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001925
Martin v. Löwiseba40652007-08-30 20:10:57 +00001926 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001927
Martin v. Löwiseba40652007-08-30 20:10:57 +00001928 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001929
Jack Jansene578a632001-08-15 01:27:14 +00001930 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001931
Guido van Rossum563e7081996-09-10 18:20:48 +00001932else
Martin v. Löwis11437992002-04-12 09:54:03 +00001933
Jack Jansene578a632001-08-15 01:27:14 +00001934 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001935 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001936 PYTHONFRAMEWORKPREFIX=
1937 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001938 FRAMEWORKINSTALLFIRST=
1939 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001940 FRAMEWORKALTINSTALLFIRST=
1941 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001942 if test "x${prefix}" = "xNONE" ; then
1943 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1944 else
1945 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1946 fi
Jack Jansene578a632001-08-15 01:27:14 +00001947 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001948
Martin v. Löwiseba40652007-08-30 20:10:57 +00001949fi
1950
Michael W. Hudson54241132001-12-07 15:38:26 +00001951
1952
1953
1954
Jack Jansene578a632001-08-15 01:27:14 +00001955
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001956
1957
Ronald Oussoren5b787322006-06-06 19:50:24 +00001958
1959
1960
Jack Jansene578a632001-08-15 01:27:14 +00001961##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001962## AC_HELP_STRING(--with-dyld,
1963## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001964##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001965# Set name for machine-dependent library files
1966
Martin v. Löwiseba40652007-08-30 20:10:57 +00001967{ echo "$as_me:$LINENO: checking MACHDEP" >&5
1968echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001969if test -z "$MACHDEP"
1970then
Guido van Rossum563e7081996-09-10 18:20:48 +00001971 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001972 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1973 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001974 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001975 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001976 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001977 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001978 ac_md_system=`echo $ac_sys_system |
1979 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1980 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001981 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001982 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001983
Guido van Rossum07397971997-04-29 21:49:50 +00001984 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001985 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001986 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001987 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001988 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001989 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001990 esac
1991fi
Guido van Rossum91922671997-10-09 20:24:13 +00001992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001993# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1994# disable features if it is defined, without any means to access these
1995# features as extensions. For these systems, we skip the definition of
1996# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1997# some feature, make sure there is no alternative way to access this
1998# feature. Also, when using wildcards, make sure you have verified the
1999# need for not defining _XOPEN_SOURCE on all systems matching the
2000# wildcard, and that the wildcard does not include future systems
2001# (which may remove their limitations).
2002case $ac_sys_system/$ac_sys_release in
2003 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2004 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002005 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00002006 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002007 define_xopen_source=no
2008 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2009 # also defined. This can be overridden by defining _BSD_SOURCE
2010 # As this has a different meaning on Linux, only define it on OpenBSD
2011
2012cat >>confdefs.h <<\_ACEOF
2013#define _BSD_SOURCE 1
2014_ACEOF
2015
2016 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002017 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2018 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2019 # Marc Recht
2020 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
2021 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002022 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2023 # of union __?sigval. Reported by Stuart Bishop.
2024 SunOS/5.6)
2025 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002026 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2027 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002028 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002029 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002030 define_xopen_source=no;;
2031 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002032 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002033 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002034 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002035 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
2036 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
2037 # this is fixed in 10.3, which identifies itself as Darwin/7.*
2038 # This should hopefully be fixed in FreeBSD 4.9
2039 FreeBSD/4.8* | Darwin/6* )
2040 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002041 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2042 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2043 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002044 AIX/4)
2045 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002046 AIX/5)
2047 if test `uname -r` -eq 1; then
2048 define_xopen_source=no
2049 fi
2050 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00002051 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2052 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00002053 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00002054 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00002055 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00002056 define_xopen_source=no
2057 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002058
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002059esac
2060
2061if test $define_xopen_source = yes
2062then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002063 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2064 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002065 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2066 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002067 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002068 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002069
2070cat >>confdefs.h <<\_ACEOF
2071#define _XOPEN_SOURCE 500
2072_ACEOF
2073
2074 ;;
2075 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002076
2077cat >>confdefs.h <<\_ACEOF
2078#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002079_ACEOF
2080
Skip Montanarof0d5f792004-08-15 14:08:23 +00002081 ;;
2082 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002083
2084 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2085 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2086 # several APIs are not declared. Since this is also needed in some
2087 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002088 # except for Solaris 10, where it must not be defined,
2089 # as it implies XPG4.2
2090 case $ac_sys_system/$ac_sys_release in
2091 SunOS/5.10)
2092 ;;
2093 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002094
2095cat >>confdefs.h <<\_ACEOF
2096#define _XOPEN_SOURCE_EXTENDED 1
2097_ACEOF
2098
Martin v. Löwis7dece662005-11-26 11:38:24 +00002099 ;;
2100 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002101
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002102
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002103cat >>confdefs.h <<\_ACEOF
2104#define _POSIX_C_SOURCE 200112L
2105_ACEOF
2106
2107
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002108fi
2109
Guido van Rossum91922671997-10-09 20:24:13 +00002110#
2111# SGI compilers allow the specification of the both the ABI and the
2112# ISA on the command line. Depending on the values of these switches,
2113# different and often incompatable code will be generated.
2114#
2115# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2116# thus supply support for various ABI/ISA combinations. The MACHDEP
2117# variable is also adjusted.
2118#
2119
2120if test ! -z "$SGI_ABI"
2121then
2122 CC="cc $SGI_ABI"
2123 LDFLAGS="$SGI_ABI $LDFLAGS"
2124 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002126{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2127echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002128
Jack Jansen83f898c2002-12-30 22:23:40 +00002129# And add extra plat-mac for darwin
2130
Jack Jansen7b59b422003-03-17 15:44:10 +00002131
Martin v. Löwiseba40652007-08-30 20:10:57 +00002132{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2133echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002134if test -z "$EXTRAPLATDIR"
2135then
2136 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002137 darwin)
2138 EXTRAPLATDIR="\$(PLATMACDIRS)"
2139 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2140 ;;
2141 *)
2142 EXTRAPLATDIR=""
2143 EXTRAMACHDEPPATH=""
2144 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002145 esac
2146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002147{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2148echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002149
Jack Jansen6b08a402004-06-03 12:41:45 +00002150# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2151# it may influence the way we can build extensions, so distutils
2152# needs to check it
2153
Ronald Oussoren988117f2006-04-29 11:31:35 +00002154
Jack Jansen6b08a402004-06-03 12:41:45 +00002155CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002156EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002157
Guido van Rossum627b2d71993-12-24 10:39:16 +00002158# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002159
2160# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2161# for debug/optimization stuff. BASECFLAGS is for flags that are required
2162# just to get things to compile and link. Users are free to override OPT
2163# when running configure or make. The build should not break if they do.
2164# BASECFLAGS should generally not be messed with, however.
2165
2166# XXX shouldn't some/most/all of this code be merged with the stuff later
2167# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002168{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2169echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002170
Martin v. Löwiseba40652007-08-30 20:10:57 +00002171# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002172if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002173 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 no) CC=cc
2176 without_gcc=yes;;
2177 yes) CC=gcc
2178 without_gcc=no;;
2179 *) CC=$withval
2180 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002182else
Martin v. Löwis11437992002-04-12 09:54:03 +00002183
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002184 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002185 AIX*) CC=cc_r
2186 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002187 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002188 case $BE_HOST_CPU in
2189 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002190 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002191 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002192 BASECFLAGS="$BASECFLAGS -export pragma"
2193 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002194 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002195 ;;
2196 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002197 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002198 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002199 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002200 ;;
2201 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002202 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2203echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2204 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002205 ;;
2206 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002207 AR="\$(srcdir)/Modules/ar_beos"
2208 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002209 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002210 Monterey*)
2211 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002212 without_gcc=;;
2213 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002214 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002215fi
2216
2217{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2218echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum8b131c51995-03-09 14:10:13 +00002220# If the user switches compilers, we can't believe the cache
2221if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2222then
Martin v. Löwis11437992002-04-12 09:54:03 +00002223 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2224(it is also a good idea to do 'make clean' before compiling)" >&5
2225echo "$as_me: error: cached CC is different -- throw away $cache_file
2226(it is also a good idea to do 'make clean' before compiling)" >&2;}
2227 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002228fi
2229
Martin v. Löwis11437992002-04-12 09:54:03 +00002230ac_ext=c
2231ac_cpp='$CPP $CPPFLAGS'
2232ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2233ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2234ac_compiler_gnu=$ac_cv_c_compiler_gnu
2235if test -n "$ac_tool_prefix"; then
2236 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2237set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002238{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2239echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002240if test "${ac_cv_prog_CC+set}" = set; then
2241 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002242else
2243 if test -n "$CC"; then
2244 ac_cv_prog_CC="$CC" # Let the user override the test.
2245else
Martin v. Löwis11437992002-04-12 09:54:03 +00002246as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2247for as_dir in $PATH
2248do
2249 IFS=$as_save_IFS
2250 test -z "$as_dir" && as_dir=.
2251 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002253 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2255 break 2
2256 fi
2257done
2258done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002259IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002260
Jack Jansendd19cf82001-12-06 22:36:17 +00002261fi
2262fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002263CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002264if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002265 { echo "$as_me:$LINENO: result: $CC" >&5
2266echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002267else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002268 { echo "$as_me:$LINENO: result: no" >&5
2269echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002270fi
2271
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272
Martin v. Löwis11437992002-04-12 09:54:03 +00002273fi
2274if test -z "$ac_cv_prog_CC"; then
2275 ac_ct_CC=$CC
2276 # Extract the first word of "gcc", so it can be a program name with args.
2277set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002278{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2279echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002280if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2281 echo $ECHO_N "(cached) $ECHO_C" >&6
2282else
2283 if test -n "$ac_ct_CC"; then
2284 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2285else
2286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2287for as_dir in $PATH
2288do
2289 IFS=$as_save_IFS
2290 test -z "$as_dir" && as_dir=.
2291 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002292 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002293 ac_cv_prog_ac_ct_CC="gcc"
2294 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2295 break 2
2296 fi
2297done
2298done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002299IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002300
2301fi
2302fi
2303ac_ct_CC=$ac_cv_prog_ac_ct_CC
2304if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002305 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2306echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002307else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002308 { echo "$as_me:$LINENO: result: no" >&5
2309echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002310fi
2311
Martin v. Löwiseba40652007-08-30 20:10:57 +00002312 if test "x$ac_ct_CC" = x; then
2313 CC=""
2314 else
2315 case $cross_compiling:$ac_tool_warned in
2316yes:)
2317{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2318whose name does not start with the host triplet. If you think this
2319configuration is useful to you, please write to autoconf@gnu.org." >&5
2320echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2321whose name does not start with the host triplet. If you think this
2322configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2323ac_tool_warned=yes ;;
2324esac
2325 CC=$ac_ct_CC
2326 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002327else
2328 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002329fi
2330
Jack Jansendd19cf82001-12-06 22:36:17 +00002331if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002332 if test -n "$ac_tool_prefix"; then
2333 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002334set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002335{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2336echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002337if test "${ac_cv_prog_CC+set}" = set; then
2338 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002339else
2340 if test -n "$CC"; then
2341 ac_cv_prog_CC="$CC" # Let the user override the test.
2342else
Martin v. Löwis11437992002-04-12 09:54:03 +00002343as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2344for as_dir in $PATH
2345do
2346 IFS=$as_save_IFS
2347 test -z "$as_dir" && as_dir=.
2348 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002349 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002350 ac_cv_prog_CC="${ac_tool_prefix}cc"
2351 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2352 break 2
2353 fi
2354done
2355done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002357
2358fi
2359fi
2360CC=$ac_cv_prog_CC
2361if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002362 { echo "$as_me:$LINENO: result: $CC" >&5
2363echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002365 { echo "$as_me:$LINENO: result: no" >&5
2366echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002367fi
2368
Martin v. Löwiseba40652007-08-30 20:10:57 +00002369
Martin v. Löwis11437992002-04-12 09:54:03 +00002370 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002371fi
2372if test -z "$CC"; then
2373 # Extract the first word of "cc", so it can be a program name with args.
2374set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002375{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002377if test "${ac_cv_prog_CC+set}" = set; then
2378 echo $ECHO_N "(cached) $ECHO_C" >&6
2379else
2380 if test -n "$CC"; then
2381 ac_cv_prog_CC="$CC" # Let the user override the test.
2382else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002383 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2385for as_dir in $PATH
2386do
2387 IFS=$as_save_IFS
2388 test -z "$as_dir" && as_dir=.
2389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002391 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2392 ac_prog_rejected=yes
2393 continue
2394 fi
2395 ac_cv_prog_CC="cc"
2396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2397 break 2
2398 fi
2399done
2400done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002401IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002402
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002403if test $ac_prog_rejected = yes; then
2404 # We found a bogon in the path, so make sure we never use it.
2405 set dummy $ac_cv_prog_CC
2406 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002407 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002408 # We chose a different compiler from the bogus one.
2409 # However, it has the same basename, so the bogon will be chosen
2410 # first if we set CC to just the basename; use the full file name.
2411 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002412 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002413 fi
2414fi
2415fi
2416fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002417CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002418if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002419 { echo "$as_me:$LINENO: result: $CC" >&5
2420echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002421else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422 { echo "$as_me:$LINENO: result: no" >&5
2423echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002424fi
2425
Martin v. Löwiseba40652007-08-30 20:10:57 +00002426
Martin v. Löwis11437992002-04-12 09:54:03 +00002427fi
2428if test -z "$CC"; then
2429 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 do
2432 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2433set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
2437 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2451 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002452 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 test -n "$CC" && break
2470 done
2471fi
2472if test -z "$CC"; then
2473 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002474 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
2476 # Extract the first word of "$ac_prog", so it can be a program name with args.
2477set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002480if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2481 echo $ECHO_N "(cached) $ECHO_C" >&6
2482else
2483 if test -n "$ac_ct_CC"; then
2484 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2485else
2486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2487for as_dir in $PATH
2488do
2489 IFS=$as_save_IFS
2490 test -z "$as_dir" && as_dir=.
2491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002492 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002493 ac_cv_prog_ac_ct_CC="$ac_prog"
2494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2495 break 2
2496 fi
2497done
2498done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002499IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002500
Martin v. Löwis11437992002-04-12 09:54:03 +00002501fi
2502fi
2503ac_ct_CC=$ac_cv_prog_ac_ct_CC
2504if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2506echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002507else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002508 { echo "$as_me:$LINENO: result: no" >&5
2509echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002510fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002511
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512
Martin v. Löwis11437992002-04-12 09:54:03 +00002513 test -n "$ac_ct_CC" && break
2514done
Michael W. Hudson54241132001-12-07 15:38:26 +00002515
Martin v. Löwiseba40652007-08-30 20:10:57 +00002516 if test "x$ac_ct_CC" = x; then
2517 CC=""
2518 else
2519 case $cross_compiling:$ac_tool_warned in
2520yes:)
2521{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2522whose name does not start with the host triplet. If you think this
2523configuration is useful to you, please write to autoconf@gnu.org." >&5
2524echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2525whose name does not start with the host triplet. If you think this
2526configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2527ac_tool_warned=yes ;;
2528esac
2529 CC=$ac_ct_CC
2530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002531fi
2532
2533fi
2534
2535
Skip Montanaro6dead952003-09-25 14:50:04 +00002536test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2537See \`config.log' for more details." >&5
2538echo "$as_me: error: no acceptable C compiler found in \$PATH
2539See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002540 { (exit 1); exit 1; }; }
2541
2542# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002543echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002544ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002545{ (ac_try="$ac_compiler --version >&5"
2546case "(($ac_try" in
2547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2548 *) ac_try_echo=$ac_try;;
2549esac
2550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2551 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002552 ac_status=$?
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555{ (ac_try="$ac_compiler -v >&5"
2556case "(($ac_try" in
2557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2558 *) ac_try_echo=$ac_try;;
2559esac
2560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2561 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002562 ac_status=$?
2563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2564 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002565{ (ac_try="$ac_compiler -V >&5"
2566case "(($ac_try" in
2567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2568 *) ac_try_echo=$ac_try;;
2569esac
2570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2571 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002572 ac_status=$?
2573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574 (exit $ac_status); }
2575
2576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002577/* confdefs.h. */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002582
Martin v. Löwis11437992002-04-12 09:54:03 +00002583int
2584main ()
2585{
2586
2587 ;
2588 return 0;
2589}
2590_ACEOF
2591ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002592ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593# Try to create an executable without -o first, disregard a.out.
2594# It will help us diagnose broken compilers, and finding out an intuition
2595# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002596{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2597echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002598ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002599#
2600# List of possible output files, starting from the most likely.
2601# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2602# only as a last resort. b.out is created by i960 compilers.
2603ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2604#
2605# The IRIX 6 linker writes into existing files which may not be
2606# executable, retaining their permissions. Remove them first so a
2607# subsequent execution test works.
2608ac_rmfiles=
2609for ac_file in $ac_files
2610do
2611 case $ac_file in
2612 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2613 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2614 esac
2615done
2616rm -f $ac_rmfiles
2617
2618if { (ac_try="$ac_link_default"
2619case "(($ac_try" in
2620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2621 *) ac_try_echo=$ac_try;;
2622esac
2623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2624 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 ac_status=$?
2626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2627 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2629# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2630# in a Makefile. We should not override ac_cv_exeext if it was cached,
2631# so that the user can short-circuit this test for compilers unknown to
2632# Autoconf.
2633for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002634do
2635 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002638 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002639 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002640 # We found the default executable, but exeext='' is most
2641 # certainly right.
2642 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002643 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2645 then :; else
2646 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2647 fi
2648 # We set ac_cv_exeext here because the later test for it is not
2649 # safe: cross compilers may not add the suffix if given an `-o'
2650 # argument, so we may need to know it at that point already.
2651 # Even if this section looks crufty: it has the advantage of
2652 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002653 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002654 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002655 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 esac
2657done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002658test "$ac_cv_exeext" = no && ac_cv_exeext=
2659
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002660else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002661 ac_file=''
2662fi
2663
2664{ echo "$as_me:$LINENO: result: $ac_file" >&5
2665echo "${ECHO_T}$ac_file" >&6; }
2666if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002668sed 's/^/| /' conftest.$ac_ext >&5
2669
2670{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2671See \`config.log' for more details." >&5
2672echo "$as_me: error: C compiler cannot create executables
2673See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002675fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002678
Martin v. Löwiseba40652007-08-30 20:10:57 +00002679# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002680# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2682echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2684# If not cross compiling, check that we can run a simple program.
2685if test "$cross_compiling" != yes; then
2686 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002687 { (case "(($ac_try" in
2688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2689 *) ac_try_echo=$ac_try;;
2690esac
2691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2692 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002693 ac_status=$?
2694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2695 (exit $ac_status); }; }; then
2696 cross_compiling=no
2697 else
2698 if test "$cross_compiling" = maybe; then
2699 cross_compiling=yes
2700 else
2701 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002702If you meant to cross compile, use \`--host'.
2703See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002705If you meant to cross compile, use \`--host'.
2706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 { (exit 1); exit 1; }; }
2708 fi
2709 fi
2710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711{ echo "$as_me:$LINENO: result: yes" >&5
2712echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002713
Skip Montanaro6dead952003-09-25 14:50:04 +00002714rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002715ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002716# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002717# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002718{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2719echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2720{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2721echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002722
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2724echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2725if { (ac_try="$ac_link"
2726case "(($ac_try" in
2727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2728 *) ac_try_echo=$ac_try;;
2729esac
2730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2731 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 ac_status=$?
2733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2734 (exit $ac_status); }; then
2735 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2736# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2737# work properly (i.e., refer to `conftest.exe'), while it won't with
2738# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002739for ac_file in conftest.exe conftest conftest.*; do
2740 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002742 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002744 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 * ) break;;
2746 esac
2747done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748else
Skip Montanaro6dead952003-09-25 14:50:04 +00002749 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2750See \`config.log' for more details." >&5
2751echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2752See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002753 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002754fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002755
Martin v. Löwis11437992002-04-12 09:54:03 +00002756rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2758echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002759
2760rm -f conftest.$ac_ext
2761EXEEXT=$ac_cv_exeext
2762ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002763{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2764echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002765if test "${ac_cv_objext+set}" = set; then
2766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002767else
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002769/* confdefs.h. */
2770_ACEOF
2771cat confdefs.h >>conftest.$ac_ext
2772cat >>conftest.$ac_ext <<_ACEOF
2773/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002774
Martin v. Löwis11437992002-04-12 09:54:03 +00002775int
2776main ()
2777{
2778
2779 ;
2780 return 0;
2781}
2782_ACEOF
2783rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002784if { (ac_try="$ac_compile"
2785case "(($ac_try" in
2786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2787 *) ac_try_echo=$ac_try;;
2788esac
2789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2790 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
2792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2793 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002794 for ac_file in conftest.o conftest.obj conftest.*; do
2795 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002796 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002797 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2799 break;;
2800 esac
2801done
2802else
2803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002804sed 's/^/| /' conftest.$ac_ext >&5
2805
2806{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2807See \`config.log' for more details." >&5
2808echo "$as_me: error: cannot compute suffix of object files: cannot compile
2809See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 { (exit 1); exit 1; }; }
2811fi
2812
2813rm -f conftest.$ac_cv_objext conftest.$ac_ext
2814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2816echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002817OBJEXT=$ac_cv_objext
2818ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002819{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2820echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821if test "${ac_cv_c_compiler_gnu+set}" = set; then
2822 echo $ECHO_N "(cached) $ECHO_C" >&6
2823else
2824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002825/* confdefs.h. */
2826_ACEOF
2827cat confdefs.h >>conftest.$ac_ext
2828cat >>conftest.$ac_ext <<_ACEOF
2829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002830
Martin v. Löwis11437992002-04-12 09:54:03 +00002831int
2832main ()
2833{
2834#ifndef __GNUC__
2835 choke me
2836#endif
2837
2838 ;
2839 return 0;
2840}
2841_ACEOF
2842rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002843if { (ac_try="$ac_compile"
2844case "(($ac_try" in
2845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2846 *) ac_try_echo=$ac_try;;
2847esac
2848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002851 grep -v '^ *+' conftest.er1 >conftest.err
2852 rm -f conftest.er1
2853 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002855 (exit $ac_status); } && {
2856 test -z "$ac_c_werror_flag" ||
2857 test ! -s conftest.err
2858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 ac_compiler_gnu=yes
2860else
2861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002862sed 's/^/| /' conftest.$ac_ext >&5
2863
Martin v. Löwiseba40652007-08-30 20:10:57 +00002864 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002868ac_cv_c_compiler_gnu=$ac_compiler_gnu
2869
2870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002871{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2872echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002873GCC=`test $ac_compiler_gnu = yes && echo yes`
2874ac_test_CFLAGS=${CFLAGS+set}
2875ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002876{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2877echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002878if test "${ac_cv_prog_cc_g+set}" = set; then
2879 echo $ECHO_N "(cached) $ECHO_C" >&6
2880else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002881 ac_save_c_werror_flag=$ac_c_werror_flag
2882 ac_c_werror_flag=yes
2883 ac_cv_prog_cc_g=no
2884 CFLAGS="-g"
2885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002886/* confdefs.h. */
2887_ACEOF
2888cat confdefs.h >>conftest.$ac_ext
2889cat >>conftest.$ac_ext <<_ACEOF
2890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002891
Martin v. Löwis11437992002-04-12 09:54:03 +00002892int
2893main ()
2894{
2895
2896 ;
2897 return 0;
2898}
2899_ACEOF
2900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002901if { (ac_try="$ac_compile"
2902case "(($ac_try" in
2903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2904 *) ac_try_echo=$ac_try;;
2905esac
2906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2907 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002909 grep -v '^ *+' conftest.er1 >conftest.err
2910 rm -f conftest.er1
2911 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002913 (exit $ac_status); } && {
2914 test -z "$ac_c_werror_flag" ||
2915 test ! -s conftest.err
2916 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002917 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002918else
Martin v. Löwis11437992002-04-12 09:54:03 +00002919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002920sed 's/^/| /' conftest.$ac_ext >&5
2921
Martin v. Löwiseba40652007-08-30 20:10:57 +00002922 CFLAGS=""
2923 cat >conftest.$ac_ext <<_ACEOF
2924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
2929
2930int
2931main ()
2932{
2933
2934 ;
2935 return 0;
2936}
2937_ACEOF
2938rm -f conftest.$ac_objext
2939if { (ac_try="$ac_compile"
2940case "(($ac_try" in
2941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942 *) ac_try_echo=$ac_try;;
2943esac
2944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2945 (eval "$ac_compile") 2>conftest.er1
2946 ac_status=$?
2947 grep -v '^ *+' conftest.er1 >conftest.err
2948 rm -f conftest.er1
2949 cat conftest.err >&5
2950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2951 (exit $ac_status); } && {
2952 test -z "$ac_c_werror_flag" ||
2953 test ! -s conftest.err
2954 } && test -s conftest.$ac_objext; then
2955 :
2956else
2957 echo "$as_me: failed program was:" >&5
2958sed 's/^/| /' conftest.$ac_ext >&5
2959
2960 ac_c_werror_flag=$ac_save_c_werror_flag
2961 CFLAGS="-g"
2962 cat >conftest.$ac_ext <<_ACEOF
2963/* confdefs.h. */
2964_ACEOF
2965cat confdefs.h >>conftest.$ac_ext
2966cat >>conftest.$ac_ext <<_ACEOF
2967/* end confdefs.h. */
2968
2969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.$ac_objext
2978if { (ac_try="$ac_compile"
2979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
2983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2984 (eval "$ac_compile") 2>conftest.er1
2985 ac_status=$?
2986 grep -v '^ *+' conftest.er1 >conftest.err
2987 rm -f conftest.er1
2988 cat conftest.err >&5
2989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2990 (exit $ac_status); } && {
2991 test -z "$ac_c_werror_flag" ||
2992 test ! -s conftest.err
2993 } && test -s conftest.$ac_objext; then
2994 ac_cv_prog_cc_g=yes
2995else
2996 echo "$as_me: failed program was:" >&5
2997sed 's/^/| /' conftest.$ac_ext >&5
2998
2999
Guido van Rossum627b2d71993-12-24 10:39:16 +00003000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001
3002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003003fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004
3005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3006fi
3007
3008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3009 ac_c_werror_flag=$ac_save_c_werror_flag
3010fi
3011{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3012echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003013if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003014 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003015elif test $ac_cv_prog_cc_g = yes; then
3016 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003017 CFLAGS="-g -O2"
3018 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003019 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003020 fi
3021else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003022 if test "$GCC" = yes; then
3023 CFLAGS="-O2"
3024 else
3025 CFLAGS=
3026 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003028{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3029echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3030if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003031 echo $ECHO_N "(cached) $ECHO_C" >&6
3032else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003033 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003034ac_save_CC=$CC
3035cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003036/* confdefs.h. */
3037_ACEOF
3038cat confdefs.h >>conftest.$ac_ext
3039cat >>conftest.$ac_ext <<_ACEOF
3040/* end confdefs.h. */
3041#include <stdarg.h>
3042#include <stdio.h>
3043#include <sys/types.h>
3044#include <sys/stat.h>
3045/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3046struct buf { int x; };
3047FILE * (*rcsopen) (struct buf *, struct stat *, int);
3048static char *e (p, i)
3049 char **p;
3050 int i;
3051{
3052 return p[i];
3053}
3054static char *f (char * (*g) (char **, int), char **p, ...)
3055{
3056 char *s;
3057 va_list v;
3058 va_start (v,p);
3059 s = g (p, va_arg (v,int));
3060 va_end (v);
3061 return s;
3062}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003063
3064/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3065 function prototypes and stuff, but not '\xHH' hex character constants.
3066 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003067 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003068 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3069 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003070 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003071int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3072
Martin v. Löwiseba40652007-08-30 20:10:57 +00003073/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3074 inside strings and character constants. */
3075#define FOO(x) 'x'
3076int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3077
Skip Montanaro6dead952003-09-25 14:50:04 +00003078int test (int i, double x);
3079struct s1 {int (*f) (int a);};
3080struct s2 {int (*f) (double a);};
3081int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3082int argc;
3083char **argv;
3084int
3085main ()
3086{
3087return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3088 ;
3089 return 0;
3090}
3091_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003092for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3093 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003094do
3095 CC="$ac_save_CC $ac_arg"
3096 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097if { (ac_try="$ac_compile"
3098case "(($ac_try" in
3099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3100 *) ac_try_echo=$ac_try;;
3101esac
3102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3103 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003104 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003105 grep -v '^ *+' conftest.er1 >conftest.err
3106 rm -f conftest.er1
3107 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003109 (exit $ac_status); } && {
3110 test -z "$ac_c_werror_flag" ||
3111 test ! -s conftest.err
3112 } && test -s conftest.$ac_objext; then
3113 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003114else
3115 echo "$as_me: failed program was:" >&5
3116sed 's/^/| /' conftest.$ac_ext >&5
3117
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118
Skip Montanaro6dead952003-09-25 14:50:04 +00003119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003120
3121rm -f core conftest.err conftest.$ac_objext
3122 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003123done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003124rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003125CC=$ac_save_CC
3126
3127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128# AC_CACHE_VAL
3129case "x$ac_cv_prog_cc_c89" in
3130 x)
3131 { echo "$as_me:$LINENO: result: none needed" >&5
3132echo "${ECHO_T}none needed" >&6; } ;;
3133 xno)
3134 { echo "$as_me:$LINENO: result: unsupported" >&5
3135echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003136 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003137 CC="$CC $ac_cv_prog_cc_c89"
3138 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3139echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003140esac
3141
Skip Montanaro6dead952003-09-25 14:50:04 +00003142
Martin v. Löwis11437992002-04-12 09:54:03 +00003143ac_ext=c
3144ac_cpp='$CPP $CPPFLAGS'
3145ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3146ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3147ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003148
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003149
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003150
3151
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3153echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003154
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003156if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003157 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003158
3159 case $withval in
3160 no) with_cxx_main=no
3161 MAINCC='$(CC)';;
3162 yes) with_cxx_main=yes
3163 MAINCC='$(CXX)';;
3164 *) with_cxx_main=yes
3165 MAINCC=$withval
3166 if test -z "$CXX"
3167 then
3168 CXX=$withval
3169 fi;;
3170 esac
3171else
3172
3173 with_cxx_main=no
3174 MAINCC='$(CC)'
3175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176fi
3177
3178{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3179echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003180
3181preset_cxx="$CXX"
3182if test -z "$CXX"
3183then
3184 case "$CC" in
3185 gcc) # Extract the first word of "g++", so it can be a program name with args.
3186set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3188echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003189if test "${ac_cv_path_CXX+set}" = set; then
3190 echo $ECHO_N "(cached) $ECHO_C" >&6
3191else
3192 case $CXX in
3193 [\\/]* | ?:[\\/]*)
3194 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195 ;;
3196 *)
3197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3198for as_dir in notfound
3199do
3200 IFS=$as_save_IFS
3201 test -z "$as_dir" && as_dir=.
3202 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003204 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3206 break 2
3207 fi
3208done
3209done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003210IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003211
3212 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3213 ;;
3214esac
3215fi
3216CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003217if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003218 { echo "$as_me:$LINENO: result: $CXX" >&5
3219echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003220else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003221 { echo "$as_me:$LINENO: result: no" >&5
3222echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003223fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003224
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003225 ;;
3226 cc) # Extract the first word of "c++", so it can be a program name with args.
3227set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003228{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003230if test "${ac_cv_path_CXX+set}" = set; then
3231 echo $ECHO_N "(cached) $ECHO_C" >&6
3232else
3233 case $CXX in
3234 [\\/]* | ?:[\\/]*)
3235 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3236 ;;
3237 *)
3238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239for as_dir in notfound
3240do
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003244 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003245 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3246 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3248 fi
3249done
3250done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003251IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003252
3253 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3254 ;;
3255esac
3256fi
3257CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003258if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003259 { echo "$as_me:$LINENO: result: $CXX" >&5
3260echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003261else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003262 { echo "$as_me:$LINENO: result: no" >&5
3263echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003265
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003266 ;;
3267 esac
3268 if test "$CXX" = "notfound"
3269 then
3270 CXX=""
3271 fi
3272fi
3273if test -z "$CXX"
3274then
3275 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3276do
3277 # Extract the first word of "$ac_prog", so it can be a program name with args.
3278set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003281if test "${ac_cv_prog_CXX+set}" = set; then
3282 echo $ECHO_N "(cached) $ECHO_C" >&6
3283else
3284 if test -n "$CXX"; then
3285 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3286else
3287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3288for as_dir in $PATH
3289do
3290 IFS=$as_save_IFS
3291 test -z "$as_dir" && as_dir=.
3292 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003294 ac_cv_prog_CXX="$ac_prog"
3295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3296 break 2
3297 fi
3298done
3299done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003300IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003301
3302fi
3303fi
3304CXX=$ac_cv_prog_CXX
3305if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: $CXX" >&5
3307echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003308else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309 { echo "$as_me:$LINENO: result: no" >&5
3310echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003311fi
3312
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003314 test -n "$CXX" && break
3315done
3316test -n "$CXX" || CXX="notfound"
3317
3318 if test "$CXX" = "notfound"
3319 then
3320 CXX=""
3321 fi
3322fi
3323if test "$preset_cxx" != "$CXX"
3324then
3325 { echo "$as_me:$LINENO: WARNING:
3326
3327 By default, distutils will build C++ extension modules with \"$CXX\".
3328 If this is not intended, then set CXX on the configure command line.
3329 " >&5
3330echo "$as_me: WARNING:
3331
3332 By default, distutils will build C++ extension modules with \"$CXX\".
3333 If this is not intended, then set CXX on the configure command line.
3334 " >&2;}
3335fi
3336
3337
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003338# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003339
3340ac_ext=c
3341ac_cpp='$CPP $CPPFLAGS'
3342ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3343ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3344ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003345{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3346echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003347# On Suns, sometimes $CPP names a directory.
3348if test -n "$CPP" && test -d "$CPP"; then
3349 CPP=
3350fi
3351if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003352 if test "${ac_cv_prog_CPP+set}" = set; then
3353 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003354else
Martin v. Löwis11437992002-04-12 09:54:03 +00003355 # Double quotes because CPP needs to be expanded
3356 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3357 do
3358 ac_preproc_ok=false
3359for ac_c_preproc_warn_flag in '' yes
3360do
3361 # Use a header file that comes with gcc, so configuring glibc
3362 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003363 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3364 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003365 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003366 # not just through cpp. "Syntax error" is here to catch this case.
3367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003368/* confdefs.h. */
3369_ACEOF
3370cat confdefs.h >>conftest.$ac_ext
3371cat >>conftest.$ac_ext <<_ACEOF
3372/* end confdefs.h. */
3373#ifdef __STDC__
3374# include <limits.h>
3375#else
3376# include <assert.h>
3377#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003378 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003379_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003380if { (ac_try="$ac_cpp conftest.$ac_ext"
3381case "(($ac_try" in
3382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3383 *) ac_try_echo=$ac_try;;
3384esac
3385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3386 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003387 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003388 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003389 rm -f conftest.er1
3390 cat conftest.err >&5
3391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 (exit $ac_status); } >/dev/null && {
3393 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3394 test ! -s conftest.err
3395 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003396 :
3397else
Martin v. Löwis11437992002-04-12 09:54:03 +00003398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003399sed 's/^/| /' conftest.$ac_ext >&5
3400
Martin v. Löwis11437992002-04-12 09:54:03 +00003401 # Broken: fails on valid input.
3402continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003404
Martin v. Löwis11437992002-04-12 09:54:03 +00003405rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003406
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003408 # can be detected and how.
3409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003410/* confdefs.h. */
3411_ACEOF
3412cat confdefs.h >>conftest.$ac_ext
3413cat >>conftest.$ac_ext <<_ACEOF
3414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003415#include <ac_nonexistent.h>
3416_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003417if { (ac_try="$ac_cpp conftest.$ac_ext"
3418case "(($ac_try" in
3419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3420 *) ac_try_echo=$ac_try;;
3421esac
3422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3423 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003424 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003425 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003426 rm -f conftest.er1
3427 cat conftest.err >&5
3428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429 (exit $ac_status); } >/dev/null && {
3430 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3431 test ! -s conftest.err
3432 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 # Broken: success on invalid input.
3434continue
3435else
3436 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003437sed 's/^/| /' conftest.$ac_ext >&5
3438
Martin v. Löwis11437992002-04-12 09:54:03 +00003439 # Passes both tests.
3440ac_preproc_ok=:
3441break
3442fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003443
Martin v. Löwis11437992002-04-12 09:54:03 +00003444rm -f conftest.err conftest.$ac_ext
3445
3446done
3447# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3448rm -f conftest.err conftest.$ac_ext
3449if $ac_preproc_ok; then
3450 break
3451fi
3452
3453 done
3454 ac_cv_prog_CPP=$CPP
3455
3456fi
3457 CPP=$ac_cv_prog_CPP
3458else
3459 ac_cv_prog_CPP=$CPP
3460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003461{ echo "$as_me:$LINENO: result: $CPP" >&5
3462echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_preproc_ok=false
3464for ac_c_preproc_warn_flag in '' yes
3465do
3466 # Use a header file that comes with gcc, so configuring glibc
3467 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003468 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3469 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003470 # On the NeXT, cc -E runs the code through the compiler's parser,
3471 # not just through cpp. "Syntax error" is here to catch this case.
3472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003473/* confdefs.h. */
3474_ACEOF
3475cat confdefs.h >>conftest.$ac_ext
3476cat >>conftest.$ac_ext <<_ACEOF
3477/* end confdefs.h. */
3478#ifdef __STDC__
3479# include <limits.h>
3480#else
3481# include <assert.h>
3482#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003483 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003484_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485if { (ac_try="$ac_cpp conftest.$ac_ext"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003492 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003493 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003494 rm -f conftest.er1
3495 cat conftest.err >&5
3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003497 (exit $ac_status); } >/dev/null && {
3498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003501 :
3502else
3503 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003504sed 's/^/| /' conftest.$ac_ext >&5
3505
Martin v. Löwis11437992002-04-12 09:54:03 +00003506 # Broken: fails on valid input.
3507continue
3508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003509
Martin v. Löwis11437992002-04-12 09:54:03 +00003510rm -f conftest.err conftest.$ac_ext
3511
Martin v. Löwiseba40652007-08-30 20:10:57 +00003512 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003513 # can be detected and how.
3514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003515/* confdefs.h. */
3516_ACEOF
3517cat confdefs.h >>conftest.$ac_ext
3518cat >>conftest.$ac_ext <<_ACEOF
3519/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003520#include <ac_nonexistent.h>
3521_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522if { (ac_try="$ac_cpp conftest.$ac_ext"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003529 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003530 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003531 rm -f conftest.er1
3532 cat conftest.err >&5
3533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003534 (exit $ac_status); } >/dev/null && {
3535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3536 test ! -s conftest.err
3537 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Broken: success on invalid input.
3539continue
3540else
3541 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003542sed 's/^/| /' conftest.$ac_ext >&5
3543
Martin v. Löwis11437992002-04-12 09:54:03 +00003544 # Passes both tests.
3545ac_preproc_ok=:
3546break
3547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003548
Martin v. Löwis11437992002-04-12 09:54:03 +00003549rm -f conftest.err conftest.$ac_ext
3550
3551done
3552# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3553rm -f conftest.err conftest.$ac_ext
3554if $ac_preproc_ok; then
3555 :
3556else
Skip Montanaro6dead952003-09-25 14:50:04 +00003557 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3558See \`config.log' for more details." >&5
3559echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 { (exit 1); exit 1; }; }
3562fi
3563
3564ac_ext=c
3565ac_cpp='$CPP $CPPFLAGS'
3566ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3567ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3568ac_compiler_gnu=$ac_cv_c_compiler_gnu
3569
3570
Martin v. Löwiseba40652007-08-30 20:10:57 +00003571{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3572echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3573if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003574 echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003576 # Extract the first word of "grep ggrep" to use in msg output
3577if test -z "$GREP"; then
3578set dummy grep ggrep; ac_prog_name=$2
3579if test "${ac_cv_path_GREP+set}" = set; then
3580 echo $ECHO_N "(cached) $ECHO_C" >&6
3581else
3582 ac_path_GREP_found=false
3583# Loop through the user's path and test for each of PROGNAME-LIST
3584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3585for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3586do
3587 IFS=$as_save_IFS
3588 test -z "$as_dir" && as_dir=.
3589 for ac_prog in grep ggrep; do
3590 for ac_exec_ext in '' $ac_executable_extensions; do
3591 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3592 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3593 # Check for GNU ac_path_GREP and select it if it is found.
3594 # Check for GNU $ac_path_GREP
3595case `"$ac_path_GREP" --version 2>&1` in
3596*GNU*)
3597 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3598*)
3599 ac_count=0
3600 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3601 while :
3602 do
3603 cat "conftest.in" "conftest.in" >"conftest.tmp"
3604 mv "conftest.tmp" "conftest.in"
3605 cp "conftest.in" "conftest.nl"
3606 echo 'GREP' >> "conftest.nl"
3607 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3608 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3609 ac_count=`expr $ac_count + 1`
3610 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3611 # Best one so far, save it but keep looking for a better one
3612 ac_cv_path_GREP="$ac_path_GREP"
3613 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003614 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615 # 10*(2^10) chars as input seems more than enough
3616 test $ac_count -gt 10 && break
3617 done
3618 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3619esac
3620
3621
3622 $ac_path_GREP_found && break 3
3623 done
3624done
3625
3626done
3627IFS=$as_save_IFS
3628
3629
Skip Montanaro6dead952003-09-25 14:50:04 +00003630fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003631
3632GREP="$ac_cv_path_GREP"
3633if test -z "$GREP"; then
3634 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3635echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3636 { (exit 1); exit 1; }; }
3637fi
3638
3639else
3640 ac_cv_path_GREP=$GREP
3641fi
3642
3643
3644fi
3645{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3646echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3647 GREP="$ac_cv_path_GREP"
3648
3649
3650{ echo "$as_me:$LINENO: checking for egrep" >&5
3651echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3652if test "${ac_cv_path_EGREP+set}" = set; then
3653 echo $ECHO_N "(cached) $ECHO_C" >&6
3654else
3655 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3656 then ac_cv_path_EGREP="$GREP -E"
3657 else
3658 # Extract the first word of "egrep" to use in msg output
3659if test -z "$EGREP"; then
3660set dummy egrep; ac_prog_name=$2
3661if test "${ac_cv_path_EGREP+set}" = set; then
3662 echo $ECHO_N "(cached) $ECHO_C" >&6
3663else
3664 ac_path_EGREP_found=false
3665# Loop through the user's path and test for each of PROGNAME-LIST
3666as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3667for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3668do
3669 IFS=$as_save_IFS
3670 test -z "$as_dir" && as_dir=.
3671 for ac_prog in egrep; do
3672 for ac_exec_ext in '' $ac_executable_extensions; do
3673 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3674 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3675 # Check for GNU ac_path_EGREP and select it if it is found.
3676 # Check for GNU $ac_path_EGREP
3677case `"$ac_path_EGREP" --version 2>&1` in
3678*GNU*)
3679 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3680*)
3681 ac_count=0
3682 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3683 while :
3684 do
3685 cat "conftest.in" "conftest.in" >"conftest.tmp"
3686 mv "conftest.tmp" "conftest.in"
3687 cp "conftest.in" "conftest.nl"
3688 echo 'EGREP' >> "conftest.nl"
3689 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3690 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3691 ac_count=`expr $ac_count + 1`
3692 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3693 # Best one so far, save it but keep looking for a better one
3694 ac_cv_path_EGREP="$ac_path_EGREP"
3695 ac_path_EGREP_max=$ac_count
3696 fi
3697 # 10*(2^10) chars as input seems more than enough
3698 test $ac_count -gt 10 && break
3699 done
3700 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3701esac
3702
3703
3704 $ac_path_EGREP_found && break 3
3705 done
3706done
3707
3708done
3709IFS=$as_save_IFS
3710
3711
3712fi
3713
3714EGREP="$ac_cv_path_EGREP"
3715if test -z "$EGREP"; then
3716 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3717echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3718 { (exit 1); exit 1; }; }
3719fi
3720
3721else
3722 ac_cv_path_EGREP=$EGREP
3723fi
3724
3725
3726 fi
3727fi
3728{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3729echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3730 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003731
3732
Martin v. Löwis11437992002-04-12 09:54:03 +00003733
Martin v. Löwiseba40652007-08-30 20:10:57 +00003734{ echo "$as_me:$LINENO: checking for AIX" >&5
3735echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003737/* confdefs.h. */
3738_ACEOF
3739cat confdefs.h >>conftest.$ac_ext
3740cat >>conftest.$ac_ext <<_ACEOF
3741/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003742#ifdef _AIX
3743 yes
3744#endif
3745
Martin v. Löwis11437992002-04-12 09:54:03 +00003746_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003747if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003749 { echo "$as_me:$LINENO: result: yes" >&5
3750echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003751cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003752#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003753_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003754
3755else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003756 { echo "$as_me:$LINENO: result: no" >&5
3757echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003758fi
3759rm -f conftest*
3760
Michael W. Hudson54241132001-12-07 15:38:26 +00003761
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003762
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003763# Check for unsupported systems
3764case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003765atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003766 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3767 echo See README for details.
3768 exit 1;;
3769esac
3770
Michael W. Hudson54241132001-12-07 15:38:26 +00003771
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3773echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003774
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003776if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003777 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003778 case $withval in
3779 no) EXEEXT=;;
3780 yes) EXEEXT=.exe;;
3781 *) EXEEXT=$withval;;
3782 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003783fi
3784
3785{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3786echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003787
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003788# Test whether we're running on a non-case-sensitive system, in which
3789# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003790
Martin v. Löwiseba40652007-08-30 20:10:57 +00003791{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3792echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003793if test ! -d CaseSensitiveTestDir; then
3794mkdir CaseSensitiveTestDir
3795fi
3796
3797if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003798then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799 { echo "$as_me:$LINENO: result: yes" >&5
3800echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003801 BUILDEXEEXT=.exe
3802else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003803 { echo "$as_me:$LINENO: result: no" >&5
3804echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003806fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003807rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003808
Guido van Rossumdd997f71998-10-07 19:58:26 +00003809case $MACHDEP in
3810bsdos*)
3811 case $CC in
3812 gcc) CC="$CC -D_HAVE_BSDI";;
3813 esac;;
3814esac
3815
Guido van Rossum24b1e751997-08-21 02:29:16 +00003816case $ac_sys_system in
3817hp*|HP*)
3818 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003819 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003820 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003821Monterey*)
3822 case $CC in
3823 cc) CC="$CC -Wl,-Bexport";;
3824 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003825SunOS*)
3826 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003827
3828cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003829#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003830_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003831
3832 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003833esac
3834
Michael W. Hudson54241132001-12-07 15:38:26 +00003835
3836
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3838echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003839if test -z "$LIBRARY"
3840then
3841 LIBRARY='libpython$(VERSION).a'
3842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003843{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3844echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003845
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003846# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003847# name of the library into which to insert object files). BLDLIBRARY is also
3848# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3849# is blank as the main program is not linked directly against LDLIBRARY.
3850# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3851# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3852# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3853# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003854#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003855# RUNSHARED is used to run shared python without installed libraries
3856#
3857# INSTSONAME is the name of the shared library that will be use to install
3858# on the system - some systems like version suffix, others don't
3859
3860
Michael W. Hudson54241132001-12-07 15:38:26 +00003861
3862
3863
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003864
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003865LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003866BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003867INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003868DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003869LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003870RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003871
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003872# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003873# If CXX is set, and if it is needed to link a main function that was
3874# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3875# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003876# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003877# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003878
Martin v. Löwiseba40652007-08-30 20:10:57 +00003879{ echo "$as_me:$LINENO: checking LINKCC" >&5
3880echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003881if test -z "$LINKCC"
3882then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003883 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003884 case $ac_sys_system in
3885 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003886 exp_extra="\"\""
3887 if test $ac_sys_release -ge 5 -o \
3888 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3889 exp_extra="."
3890 fi
3891 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003892 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003893 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003894 esac
3895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3897echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003898
Martin v. Löwiseba40652007-08-30 20:10:57 +00003899{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3900echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3901# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003902if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903 enableval=$enable_shared;
3904fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003905
Martin v. Löwis1142de32002-03-29 16:28:31 +00003906
3907if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003908then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003909 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003910 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003911 enable_shared="yes";;
3912 *)
3913 enable_shared="no";;
3914 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003915fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003916{ echo "$as_me:$LINENO: result: $enable_shared" >&5
3917echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00003918
Martin v. Löwiseba40652007-08-30 20:10:57 +00003919{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3920echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
3921# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003922if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003924 CC="$CC -pg"
3925 if test "$cross_compiling" = yes; then
3926 ac_enable_profiling="no"
3927else
3928 cat >conftest.$ac_ext <<_ACEOF
3929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
3934int main() { return 0; }
3935_ACEOF
3936rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937if { (ac_try="$ac_link"
3938case "(($ac_try" in
3939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3940 *) ac_try_echo=$ac_try;;
3941esac
3942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3943 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00003947 { (case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
3951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3952 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); }; }; then
3956 ac_enable_profiling="yes"
3957else
3958 echo "$as_me: program exited with status $ac_status" >&5
3959echo "$as_me: failed program was:" >&5
3960sed 's/^/| /' conftest.$ac_ext >&5
3961
3962( exit $ac_status )
3963ac_enable_profiling="no"
3964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003967
3968
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003969 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003970fi
3971
3972{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3973echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003974
3975case "$ac_enable_profiling" in
3976 "yes")
3977 BASECFLAGS="-pg $BASECFLAGS"
3978 LDFLAGS="-pg $LDFLAGS"
3979 ;;
3980esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003981
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3983echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00003984
Guido van Rossumb8552162001-09-05 14:58:11 +00003985# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3986# library that we build, but we do not want to link against it (we
3987# will find it with a -framework option). For this reason there is an
3988# extra variable BLDLIBRARY against which Python and the extension
3989# modules are linked, BLDLIBRARY. This is normally the same as
3990# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003991if test "$enable_framework"
3992then
3993 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003994 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003995 BLDLIBRARY=''
3996else
3997 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003998fi
Jack Jansene578a632001-08-15 01:27:14 +00003999
Martin v. Löwis1142de32002-03-29 16:28:31 +00004000# Other platforms follow
4001if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004002
4003cat >>confdefs.h <<\_ACEOF
4004#define Py_ENABLE_SHARED 1
4005_ACEOF
4006
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007 case $ac_sys_system in
4008 BeOS*)
4009 LDLIBRARY='libpython$(VERSION).so'
4010 ;;
4011 CYGWIN*)
4012 LDLIBRARY='libpython$(VERSION).dll.a'
4013 DLLLIBRARY='libpython$(VERSION).dll'
4014 ;;
4015 SunOS*)
4016 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004017 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004018 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004019 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004020 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004021 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004022 LDLIBRARY='libpython$(VERSION).so'
4023 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004024 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004025 case $ac_sys_system in
4026 FreeBSD*)
4027 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4028 ;;
4029 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004030 INSTSONAME="$LDLIBRARY".$SOVERSION
4031 ;;
4032 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004033 case `uname -m` in
4034 ia64)
4035 LDLIBRARY='libpython$(VERSION).so'
4036 ;;
4037 *)
4038 LDLIBRARY='libpython$(VERSION).sl'
4039 ;;
4040 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004042 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004043 ;;
4044 OSF*)
4045 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004046 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004047 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004048 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004049 atheos*)
4050 LDLIBRARY='libpython$(VERSION).so'
4051 BLDLIBRARY='-L. -lpython$(VERSION)'
4052 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4053 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00004054 esac
Jason Tishler30765592003-09-04 11:04:06 +00004055else # shared is disabled
4056 case $ac_sys_system in
4057 CYGWIN*)
4058 BLDLIBRARY='$(LIBRARY)'
4059 LDLIBRARY='libpython$(VERSION).dll.a'
4060 ;;
4061 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004062fi
4063
Martin v. Löwiseba40652007-08-30 20:10:57 +00004064{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4065echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004066
Martin v. Löwis11437992002-04-12 09:54:03 +00004067if test -n "$ac_tool_prefix"; then
4068 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4069set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004070{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4071echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004072if test "${ac_cv_prog_RANLIB+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004074else
4075 if test -n "$RANLIB"; then
4076 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4077else
Martin v. Löwis11437992002-04-12 09:54:03 +00004078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4079for as_dir in $PATH
4080do
4081 IFS=$as_save_IFS
4082 test -z "$as_dir" && as_dir=.
4083 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004084 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004085 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4086 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4087 break 2
4088 fi
4089done
4090done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004091IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004092
Guido van Rossum627b2d71993-12-24 10:39:16 +00004093fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004094fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004095RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004096if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4098echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004099else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004100 { echo "$as_me:$LINENO: result: no" >&5
4101echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004102fi
4103
Martin v. Löwiseba40652007-08-30 20:10:57 +00004104
Martin v. Löwis11437992002-04-12 09:54:03 +00004105fi
4106if test -z "$ac_cv_prog_RANLIB"; then
4107 ac_ct_RANLIB=$RANLIB
4108 # Extract the first word of "ranlib", so it can be a program name with args.
4109set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004110{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4111echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004112if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4113 echo $ECHO_N "(cached) $ECHO_C" >&6
4114else
4115 if test -n "$ac_ct_RANLIB"; then
4116 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4117else
4118as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4119for as_dir in $PATH
4120do
4121 IFS=$as_save_IFS
4122 test -z "$as_dir" && as_dir=.
4123 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_cv_prog_ac_ct_RANLIB="ranlib"
4126 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4127 break 2
4128 fi
4129done
4130done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004131IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004132
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
4134fi
4135ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4136if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004137 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4138echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004139else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004140 { echo "$as_me:$LINENO: result: no" >&5
4141echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004142fi
4143
Martin v. Löwiseba40652007-08-30 20:10:57 +00004144 if test "x$ac_ct_RANLIB" = x; then
4145 RANLIB=":"
4146 else
4147 case $cross_compiling:$ac_tool_warned in
4148yes:)
4149{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4150whose name does not start with the host triplet. If you think this
4151configuration is useful to you, please write to autoconf@gnu.org." >&5
4152echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4153whose name does not start with the host triplet. If you think this
4154configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4155ac_tool_warned=yes ;;
4156esac
4157 RANLIB=$ac_ct_RANLIB
4158 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
4160 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004161fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004162
4163
Guido van Rossum7f43da71994-08-01 12:15:30 +00004164for ac_prog in ar aal
4165do
Martin v. Löwis11437992002-04-12 09:54:03 +00004166 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004167set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004168{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4169echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004170if test "${ac_cv_prog_AR+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172else
4173 if test -n "$AR"; then
4174 ac_cv_prog_AR="$AR" # Let the user override the test.
4175else
Martin v. Löwis11437992002-04-12 09:54:03 +00004176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4177for as_dir in $PATH
4178do
4179 IFS=$as_save_IFS
4180 test -z "$as_dir" && as_dir=.
4181 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004182 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004183 ac_cv_prog_AR="$ac_prog"
4184 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4185 break 2
4186 fi
4187done
4188done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004189IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004190
Guido van Rossum7f43da71994-08-01 12:15:30 +00004191fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004192fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004193AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: $AR" >&5
4196echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004197else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004198 { echo "$as_me:$LINENO: result: no" >&5
4199echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004200fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004201
Martin v. Löwiseba40652007-08-30 20:10:57 +00004202
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004204done
4205test -n "$AR" || AR="ar"
4206
Michael W. Hudson54241132001-12-07 15:38:26 +00004207
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004208
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004209# Extract the first word of "svnversion", so it can be a program name with args.
4210set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004211{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4212echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004213if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4214 echo $ECHO_N "(cached) $ECHO_C" >&6
4215else
4216 if test -n "$SVNVERSION"; then
4217 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4218else
4219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220for as_dir in $PATH
4221do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004226 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004227 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4228 break 2
4229 fi
4230done
4231done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004233
Martin v. Löwisff600232006-04-03 19:12:32 +00004234 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004235fi
4236fi
4237SVNVERSION=$ac_cv_prog_SVNVERSION
4238if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4240echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004241else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242 { echo "$as_me:$LINENO: result: no" >&5
4243echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004244fi
4245
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004247if test $SVNVERSION = found
4248then
4249 SVNVERSION="svnversion \$(srcdir)"
4250else
4251 SVNVERSION="echo exported"
4252fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004253
Neil Schemenauera42c8272001-03-31 00:01:55 +00004254case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004255bsdos*|hp*|HP*)
4256 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004257 if test -z "$INSTALL"
4258 then
4259 INSTALL="${srcdir}/install-sh -c"
4260 fi
4261esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004262ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4264 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004265 ac_aux_dir=$ac_dir
4266 ac_install_sh="$ac_aux_dir/install-sh -c"
4267 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004268 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004269 ac_aux_dir=$ac_dir
4270 ac_install_sh="$ac_aux_dir/install.sh -c"
4271 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004272 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004273 ac_aux_dir=$ac_dir
4274 ac_install_sh="$ac_aux_dir/shtool install -c"
4275 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004276 fi
4277done
4278if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4280echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004281 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004283
4284# These three variables are undocumented and unsupported,
4285# and are intended to be withdrawn in a future Autoconf release.
4286# They can cause serious problems if a builder's source tree is in a directory
4287# whose full name contains unusual characters.
4288ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4289ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4290ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4291
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004292
4293# Find a good install program. We prefer a C program (faster),
4294# so one script is as good as another. But avoid the broken or
4295# incompatible versions:
4296# SysV /etc/install, /usr/sbin/install
4297# SunOS /usr/etc/install
4298# IRIX /sbin/install
4299# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004300# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004301# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4302# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4303# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004305# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4307echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004308if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004309if test "${ac_cv_path_install+set}" = set; then
4310 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004311else
Martin v. Löwis11437992002-04-12 09:54:03 +00004312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4313for as_dir in $PATH
4314do
4315 IFS=$as_save_IFS
4316 test -z "$as_dir" && as_dir=.
4317 # Account for people who put trailing slashes in PATH elements.
4318case $as_dir/ in
4319 ./ | .// | /cC/* | \
4320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004321 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004322 /usr/ucb/* ) ;;
4323 *)
4324 # OSF1 and SCO ODT 3.0 have their own names for install.
4325 # Don't use installbsd from OSF since it installs stuff as root
4326 # by default.
4327 for ac_prog in ginstall scoinst install; do
4328 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00004330 if test $ac_prog = install &&
4331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4332 # AIX install. It has an incompatible calling convention.
4333 :
4334 elif test $ac_prog = install &&
4335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4336 # program-specific install script used by HP pwplus--don't use.
4337 :
4338 else
4339 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4340 break 3
4341 fi
4342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004343 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 done
4345 ;;
4346esac
4347done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004349
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004350
4351fi
4352 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004353 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004354 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004355 # As a last resort, use the slow shell script. Don't cache a
4356 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004359 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 fi
4361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004362{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4363echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364
4365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4366# It thinks the first close brace ends the variable substitution.
4367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4368
Martin v. Löwis11437992002-04-12 09:54:03 +00004369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004370
4371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4372
Michael W. Hudson54241132001-12-07 15:38:26 +00004373
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004374# Not every filesystem supports hard links
4375
4376if test -z "$LN" ; then
4377 case $ac_sys_system in
4378 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004379 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004380 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004381 *) LN=ln;;
4382 esac
4383fi
4384
Fred Drake109d9862001-07-11 06:27:56 +00004385# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004386{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4387echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004388
Martin v. Löwiseba40652007-08-30 20:10:57 +00004389# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004390if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004391 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004392if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004393then
4394
4395cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004396#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004397_ACEOF
4398
Martin v. Löwiseba40652007-08-30 20:10:57 +00004399 { echo "$as_me:$LINENO: result: yes" >&5
4400echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004401 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004402else { echo "$as_me:$LINENO: result: no" >&5
4403echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004404fi
4405else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004406 { echo "$as_me:$LINENO: result: no" >&5
4407echo "${ECHO_T}no" >&6; }
4408fi
4409
Fred Drake109d9862001-07-11 06:27:56 +00004410
Skip Montanarodecc6a42003-01-01 20:07:49 +00004411# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4412# merged with this chunk of code?
4413
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004414# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004415# ------------------------
4416# (The following bit of code is complicated enough - please keep things
4417# indented properly. Just pretend you're editing Python code. ;-)
4418
4419# There are two parallel sets of case statements below, one that checks to
4420# see if OPT was set and one that does BASECFLAGS setting based upon
4421# compiler and platform. BASECFLAGS tweaks need to be made even if the
4422# user set OPT.
4423
4424# tweak OPT based on compiler and platform, only if the user didn't set
4425# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004426
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004427if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004428then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004429 case $GCC in
4430 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004431 if test "$CC" != 'g++' ; then
4432 STRICT_PROTO="-Wstrict-prototypes"
4433 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004434 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4435 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4436 WRAP="-fwrapv"
4437 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004438 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004439 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004440 if test "$Py_DEBUG" = 'true' ; then
4441 # Optimization messes up debuggers, so turn it off for
4442 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004443 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004444 else
Thomas Hellere5529592007-12-13 21:20:29 +00004445 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004446 fi
4447 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004448 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004449 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004450 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004451 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004452 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004453 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4454 ;;
4455 esac
Fred Drake109d9862001-07-11 06:27:56 +00004456 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004457
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004458 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004459 OPT="-O"
4460 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004461 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004462
4463 # The current (beta) Monterey compiler dies with optimizations
4464 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004465 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004466 Monterey*)
4467 OPT=""
4468 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004469 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004470
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004471fi
4472
Skip Montanarodecc6a42003-01-01 20:07:49 +00004473
4474# tweak BASECFLAGS based on compiler and platform
4475case $GCC in
4476yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004477 # Python violates C99 rules, by casting between incompatible
4478 # pointer types. GCC may generate bad code as a result of that,
4479 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004480 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4481echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004482 ac_save_cc="$CC"
4483 CC="$CC -fno-strict-aliasing"
4484 if test "$cross_compiling" = yes; then
4485 ac_cv_no_strict_aliasing_ok=no
4486else
4487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004488/* confdefs.h. */
4489_ACEOF
4490cat confdefs.h >>conftest.$ac_ext
4491cat >>conftest.$ac_ext <<_ACEOF
4492/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004493int main() { return 0; }
4494_ACEOF
4495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004496if { (ac_try="$ac_link"
4497case "(($ac_try" in
4498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4499 *) ac_try_echo=$ac_try;;
4500esac
4501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4502 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004503 ac_status=$?
4504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004506 { (case "(($ac_try" in
4507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4508 *) ac_try_echo=$ac_try;;
4509esac
4510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4511 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004512 ac_status=$?
4513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4514 (exit $ac_status); }; }; then
4515 ac_cv_no_strict_aliasing_ok=yes
4516else
4517 echo "$as_me: program exited with status $ac_status" >&5
4518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004519sed 's/^/| /' conftest.$ac_ext >&5
4520
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004521( exit $ac_status )
4522ac_cv_no_strict_aliasing_ok=no
4523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004524rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526
4527
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004528 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004529 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4530echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004531 if test $ac_cv_no_strict_aliasing_ok = yes
4532 then
4533 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4534 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004535 case $ac_sys_system in
4536 SCO_SV*)
4537 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4538 ;;
4539 # is there any other compiler on Darwin besides gcc?
4540 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004541 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4542 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren988117f2006-04-29 11:31:35 +00004543 if test "${enable_universalsdk}"; then
4544 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4545 fi
4546
Skip Montanarodecc6a42003-01-01 20:07:49 +00004547 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004548 OSF*)
4549 BASECFLAGS="$BASECFLAGS -mieee"
4550 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004551 esac
4552 ;;
4553
4554*)
4555 case $ac_sys_system in
4556 OpenUNIX*|UnixWare*)
4557 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4558 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004559 OSF*)
4560 BASECFLAGS="$BASECFLAGS -ieee -std"
4561 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004562 SCO_SV*)
4563 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4564 ;;
4565 esac
4566 ;;
4567esac
4568
Fred Drakee1ceaa02001-12-04 20:55:47 +00004569if test "$Py_DEBUG" = 'true'; then
4570 :
4571else
4572 OPT="-DNDEBUG $OPT"
4573fi
4574
Guido van Rossum563e7081996-09-10 18:20:48 +00004575if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004576then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004577 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004578fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004579
Neal Norwitz020c46a2006-01-07 21:39:28 +00004580# disable check for icc since it seems to pass, but generates a warning
4581if test "$CC" = icc
4582then
4583 ac_cv_opt_olimit_ok=no
4584fi
4585
Martin v. Löwiseba40652007-08-30 20:10:57 +00004586{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4587echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004588if test "${ac_cv_opt_olimit_ok+set}" = set; then
4589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004590else
4591 ac_save_cc="$CC"
4592CC="$CC -OPT:Olimit=0"
4593if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004594 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004595else
Martin v. Löwis11437992002-04-12 09:54:03 +00004596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004597/* confdefs.h. */
4598_ACEOF
4599cat confdefs.h >>conftest.$ac_ext
4600cat >>conftest.$ac_ext <<_ACEOF
4601/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004602int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004603_ACEOF
4604rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004605if { (ac_try="$ac_link"
4606case "(($ac_try" in
4607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4608 *) ac_try_echo=$ac_try;;
4609esac
4610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4611 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004615 { (case "(($ac_try" in
4616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4617 *) ac_try_echo=$ac_try;;
4618esac
4619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4620 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004621 ac_status=$?
4622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4623 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004624 ac_cv_opt_olimit_ok=yes
4625else
Martin v. Löwis11437992002-04-12 09:54:03 +00004626 echo "$as_me: program exited with status $ac_status" >&5
4627echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004628sed 's/^/| /' conftest.$ac_ext >&5
4629
Martin v. Löwis11437992002-04-12 09:54:03 +00004630( exit $ac_status )
4631ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004633rm -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 +00004634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004635
4636
Guido van Rossum91922671997-10-09 20:24:13 +00004637CC="$ac_save_cc"
4638fi
4639
Martin v. Löwiseba40652007-08-30 20:10:57 +00004640{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4641echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004642if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004643 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004644 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4645 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4646 # environment?
4647 Darwin*)
4648 ;;
4649 *)
4650 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4651 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004652 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004653else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004654 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4655echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004656 if test "${ac_cv_olimit_ok+set}" = set; then
4657 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004658else
4659 ac_save_cc="$CC"
4660 CC="$CC -Olimit 1500"
4661 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004662 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004663else
Martin v. Löwis11437992002-04-12 09:54:03 +00004664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004665/* confdefs.h. */
4666_ACEOF
4667cat confdefs.h >>conftest.$ac_ext
4668cat >>conftest.$ac_ext <<_ACEOF
4669/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004670int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004671_ACEOF
4672rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004673if { (ac_try="$ac_link"
4674case "(($ac_try" in
4675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4676 *) ac_try_echo=$ac_try;;
4677esac
4678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4679 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004680 ac_status=$?
4681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004683 { (case "(($ac_try" in
4684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4685 *) ac_try_echo=$ac_try;;
4686esac
4687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4688 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004689 ac_status=$?
4690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4691 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004692 ac_cv_olimit_ok=yes
4693else
Martin v. Löwis11437992002-04-12 09:54:03 +00004694 echo "$as_me: program exited with status $ac_status" >&5
4695echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004696sed 's/^/| /' conftest.$ac_ext >&5
4697
Martin v. Löwis11437992002-04-12 09:54:03 +00004698( exit $ac_status )
4699ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004700fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004701rm -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 +00004702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004703
4704
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004705 CC="$ac_save_cc"
4706fi
4707
Martin v. Löwiseba40652007-08-30 20:10:57 +00004708 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4709echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004710 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004711 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004712 fi
4713fi
4714
Martin v. Löwisaac13162006-10-19 10:58:46 +00004715# Check whether GCC supports PyArg_ParseTuple format
4716if test "$GCC" = "yes"
4717then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004718 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4719echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004720 save_CFLAGS=$CFLAGS
4721 CFLAGS="$CFLAGS -Werror"
4722 cat >conftest.$ac_ext <<_ACEOF
4723/* confdefs.h. */
4724_ACEOF
4725cat confdefs.h >>conftest.$ac_ext
4726cat >>conftest.$ac_ext <<_ACEOF
4727/* end confdefs.h. */
4728
4729 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4730
4731int
4732main ()
4733{
4734
4735 ;
4736 return 0;
4737}
4738_ACEOF
4739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004740if { (ac_try="$ac_compile"
4741case "(($ac_try" in
4742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4743 *) ac_try_echo=$ac_try;;
4744esac
4745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4746 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004747 ac_status=$?
4748 grep -v '^ *+' conftest.er1 >conftest.err
4749 rm -f conftest.er1
4750 cat conftest.err >&5
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004752 (exit $ac_status); } && {
4753 test -z "$ac_c_werror_flag" ||
4754 test ! -s conftest.err
4755 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004756
4757cat >>confdefs.h <<\_ACEOF
4758#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4759_ACEOF
4760
Martin v. Löwiseba40652007-08-30 20:10:57 +00004761 { echo "$as_me:$LINENO: result: yes" >&5
4762echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004763else
4764 echo "$as_me: failed program was:" >&5
4765sed 's/^/| /' conftest.$ac_ext >&5
4766
Martin v. Löwiseba40652007-08-30 20:10:57 +00004767 { echo "$as_me:$LINENO: result: no" >&5
4768echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004769
4770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004771
4772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004773 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004774fi
4775
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004776# On some compilers, pthreads are available without further options
4777# (e.g. MacOS X). On some of these systems, the compiler will not
4778# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4779# So we have to see first whether pthreads are available without
4780# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004781{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4782echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004783if test "${ac_cv_pthread_is_default+set}" = set; then
4784 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004785else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004786 if test "$cross_compiling" = yes; then
4787 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004788else
Martin v. Löwis11437992002-04-12 09:54:03 +00004789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004795
Martin v. Löwis130fb172001-07-19 11:00:41 +00004796#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004797
4798void* routine(void* p){return NULL;}
4799
4800int main(){
4801 pthread_t p;
4802 if(pthread_create(&p,NULL,routine,NULL)!=0)
4803 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004804 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004805 return 0;
4806}
4807
Martin v. Löwis11437992002-04-12 09:54:03 +00004808_ACEOF
4809rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004810if { (ac_try="$ac_link"
4811case "(($ac_try" in
4812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813 *) ac_try_echo=$ac_try;;
4814esac
4815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4816 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004817 ac_status=$?
4818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004820 { (case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
4824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4825 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004826 ac_status=$?
4827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4828 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004829
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004830 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004831 ac_cv_kthread=no
4832 ac_cv_pthread=no
4833
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004834else
Martin v. Löwis11437992002-04-12 09:54:03 +00004835 echo "$as_me: program exited with status $ac_status" >&5
4836echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004837sed 's/^/| /' conftest.$ac_ext >&5
4838
Martin v. Löwis11437992002-04-12 09:54:03 +00004839( exit $ac_status )
4840ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004841fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004842rm -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 +00004843fi
4844
Martin v. Löwiseba40652007-08-30 20:10:57 +00004845
4846
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004847fi
4848
Martin v. Löwiseba40652007-08-30 20:10:57 +00004849{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4850echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004851
Michael W. Hudson54241132001-12-07 15:38:26 +00004852
Martin v. Löwis11437992002-04-12 09:54:03 +00004853if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004854then
4855 ac_cv_kpthread=no
4856else
4857# -Kpthread, if available, provides the right #defines
4858# and linker options to make pthread_create available
4859# Some compilers won't report that they do not support -Kpthread,
4860# so we need to run a program to see whether it really made the
4861# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004862{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4863echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004864if test "${ac_cv_kpthread+set}" = set; then
4865 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004866else
4867 ac_save_cc="$CC"
4868CC="$CC -Kpthread"
4869if test "$cross_compiling" = yes; then
4870 ac_cv_kpthread=no
4871else
Martin v. Löwis11437992002-04-12 09:54:03 +00004872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004873/* confdefs.h. */
4874_ACEOF
4875cat confdefs.h >>conftest.$ac_ext
4876cat >>conftest.$ac_ext <<_ACEOF
4877/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004878
4879#include <pthread.h>
4880
4881void* routine(void* p){return NULL;}
4882
4883int main(){
4884 pthread_t p;
4885 if(pthread_create(&p,NULL,routine,NULL)!=0)
4886 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004887 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004888 return 0;
4889}
4890
Martin v. Löwis11437992002-04-12 09:54:03 +00004891_ACEOF
4892rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004893if { (ac_try="$ac_link"
4894case "(($ac_try" in
4895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4896 *) ac_try_echo=$ac_try;;
4897esac
4898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 ac_status=$?
4901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 { (case "(($ac_try" in
4904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4905 *) ac_try_echo=$ac_try;;
4906esac
4907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004912 ac_cv_kpthread=yes
4913else
Martin v. Löwis11437992002-04-12 09:54:03 +00004914 echo "$as_me: program exited with status $ac_status" >&5
4915echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004916sed 's/^/| /' conftest.$ac_ext >&5
4917
Martin v. Löwis11437992002-04-12 09:54:03 +00004918( exit $ac_status )
4919ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004920fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921rm -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 +00004922fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004923
4924
Martin v. Löwis130fb172001-07-19 11:00:41 +00004925CC="$ac_save_cc"
4926fi
4927
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4929echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004930fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004931
Skip Montanarod8d39a02003-07-10 20:44:10 +00004932if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004933then
4934# -Kthread, if available, provides the right #defines
4935# and linker options to make pthread_create available
4936# Some compilers won't report that they do not support -Kthread,
4937# so we need to run a program to see whether it really made the
4938# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4940echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004941if test "${ac_cv_kthread+set}" = set; then
4942 echo $ECHO_N "(cached) $ECHO_C" >&6
4943else
4944 ac_save_cc="$CC"
4945CC="$CC -Kthread"
4946if test "$cross_compiling" = yes; then
4947 ac_cv_kthread=no
4948else
4949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004950/* confdefs.h. */
4951_ACEOF
4952cat confdefs.h >>conftest.$ac_ext
4953cat >>conftest.$ac_ext <<_ACEOF
4954/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004955
4956#include <pthread.h>
4957
4958void* routine(void* p){return NULL;}
4959
4960int main(){
4961 pthread_t p;
4962 if(pthread_create(&p,NULL,routine,NULL)!=0)
4963 return 1;
4964 (void)pthread_detach(p);
4965 return 0;
4966}
4967
4968_ACEOF
4969rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004970if { (ac_try="$ac_link"
4971case "(($ac_try" in
4972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4973 *) ac_try_echo=$ac_try;;
4974esac
4975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4976 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004977 ac_status=$?
4978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4979 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980 { (case "(($ac_try" in
4981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4982 *) ac_try_echo=$ac_try;;
4983esac
4984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4985 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004986 ac_status=$?
4987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4988 (exit $ac_status); }; }; then
4989 ac_cv_kthread=yes
4990else
4991 echo "$as_me: program exited with status $ac_status" >&5
4992echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004993sed 's/^/| /' conftest.$ac_ext >&5
4994
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004995( exit $ac_status )
4996ac_cv_kthread=no
4997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004998rm -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 +00004999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005000
5001
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005002CC="$ac_save_cc"
5003fi
5004
Martin v. Löwiseba40652007-08-30 20:10:57 +00005005{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5006echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005007fi
5008
Skip Montanarod8d39a02003-07-10 20:44:10 +00005009if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005010then
5011# -pthread, if available, provides the right #defines
5012# and linker options to make pthread_create available
5013# Some compilers won't report that they do not support -pthread,
5014# so we need to run a program to see whether it really made the
5015# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005016{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5017echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005018if test "${ac_cv_thread+set}" = set; then
5019 echo $ECHO_N "(cached) $ECHO_C" >&6
5020else
5021 ac_save_cc="$CC"
5022CC="$CC -pthread"
5023if test "$cross_compiling" = yes; then
5024 ac_cv_pthread=no
5025else
5026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005027/* confdefs.h. */
5028_ACEOF
5029cat confdefs.h >>conftest.$ac_ext
5030cat >>conftest.$ac_ext <<_ACEOF
5031/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005032
5033#include <pthread.h>
5034
5035void* routine(void* p){return NULL;}
5036
5037int main(){
5038 pthread_t p;
5039 if(pthread_create(&p,NULL,routine,NULL)!=0)
5040 return 1;
5041 (void)pthread_detach(p);
5042 return 0;
5043}
5044
5045_ACEOF
5046rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005047if { (ac_try="$ac_link"
5048case "(($ac_try" in
5049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5050 *) ac_try_echo=$ac_try;;
5051esac
5052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5053 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005054 ac_status=$?
5055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005057 { (case "(($ac_try" in
5058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5059 *) ac_try_echo=$ac_try;;
5060esac
5061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5062 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; }; then
5066 ac_cv_pthread=yes
5067else
5068 echo "$as_me: program exited with status $ac_status" >&5
5069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005070sed 's/^/| /' conftest.$ac_ext >&5
5071
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005072( exit $ac_status )
5073ac_cv_pthread=no
5074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005075rm -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 +00005076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005077
5078
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005079CC="$ac_save_cc"
5080fi
5081
Martin v. Löwiseba40652007-08-30 20:10:57 +00005082{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5083echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005084fi
5085
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005086# If we have set a CC compiler flag for thread support then
5087# check if it works for CXX, too.
5088ac_cv_cxx_thread=no
5089if test ! -z "$CXX"
5090then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005091{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5092echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005093ac_save_cxx="$CXX"
5094
5095if test "$ac_cv_kpthread" = "yes"
5096then
5097 CXX="$CXX -Kpthread"
5098 ac_cv_cxx_thread=yes
5099elif test "$ac_cv_kthread" = "yes"
5100then
5101 CXX="$CXX -Kthread"
5102 ac_cv_cxx_thread=yes
5103elif test "$ac_cv_pthread" = "yes"
5104then
5105 CXX="$CXX -pthread"
5106 ac_cv_cxx_thread=yes
5107fi
5108
5109if test $ac_cv_cxx_thread = yes
5110then
5111 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5112 $CXX -c conftest.$ac_ext 2>&5
5113 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5114 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5115 then
5116 ac_cv_cxx_thread=yes
5117 else
5118 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005119 fi
5120 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005122{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5123echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005124fi
5125CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005126
Michael W. Hudson54241132001-12-07 15:38:26 +00005127
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005128# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005129{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5130echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005131if test "${ac_cv_header_stdc+set}" = set; then
5132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133else
Martin v. Löwis11437992002-04-12 09:54:03 +00005134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005135/* confdefs.h. */
5136_ACEOF
5137cat confdefs.h >>conftest.$ac_ext
5138cat >>conftest.$ac_ext <<_ACEOF
5139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005140#include <stdlib.h>
5141#include <stdarg.h>
5142#include <string.h>
5143#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005144
Skip Montanaro6dead952003-09-25 14:50:04 +00005145int
5146main ()
5147{
5148
5149 ;
5150 return 0;
5151}
Martin v. Löwis11437992002-04-12 09:54:03 +00005152_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005154if { (ac_try="$ac_compile"
5155case "(($ac_try" in
5156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5157 *) ac_try_echo=$ac_try;;
5158esac
5159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005162 grep -v '^ *+' conftest.er1 >conftest.err
5163 rm -f conftest.er1
5164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005166 (exit $ac_status); } && {
5167 test -z "$ac_c_werror_flag" ||
5168 test ! -s conftest.err
5169 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005170 ac_cv_header_stdc=yes
5171else
Martin v. Löwis11437992002-04-12 09:54:03 +00005172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005173sed 's/^/| /' conftest.$ac_ext >&5
5174
Martin v. Löwiseba40652007-08-30 20:10:57 +00005175 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005177
5178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005179
5180if test $ac_cv_header_stdc = yes; then
5181 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005183/* confdefs.h. */
5184_ACEOF
5185cat confdefs.h >>conftest.$ac_ext
5186cat >>conftest.$ac_ext <<_ACEOF
5187/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005188#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005189
5190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005192 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193 :
5194else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005195 ac_cv_header_stdc=no
5196fi
5197rm -f conftest*
5198
5199fi
5200
5201if test $ac_cv_header_stdc = yes; then
5202 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005204/* confdefs.h. */
5205_ACEOF
5206cat confdefs.h >>conftest.$ac_ext
5207cat >>conftest.$ac_ext <<_ACEOF
5208/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005209#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005210
5211_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005213 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005214 :
5215else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005216 ac_cv_header_stdc=no
5217fi
5218rm -f conftest*
5219
5220fi
5221
5222if test $ac_cv_header_stdc = yes; then
5223 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005224 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005225 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005226else
Martin v. Löwis11437992002-04-12 09:54:03 +00005227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005228/* confdefs.h. */
5229_ACEOF
5230cat confdefs.h >>conftest.$ac_ext
5231cat >>conftest.$ac_ext <<_ACEOF
5232/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005233#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005234#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005235#if ((' ' & 0x0FF) == 0x020)
5236# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5237# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5238#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005239# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005240 (('a' <= (c) && (c) <= 'i') \
5241 || ('j' <= (c) && (c) <= 'r') \
5242 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005243# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5244#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005245
Martin v. Löwis11437992002-04-12 09:54:03 +00005246#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5247int
5248main ()
5249{
5250 int i;
5251 for (i = 0; i < 256; i++)
5252 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005253 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005254 return 2;
5255 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005256}
5257_ACEOF
5258rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005259if { (ac_try="$ac_link"
5260case "(($ac_try" in
5261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5262 *) ac_try_echo=$ac_try;;
5263esac
5264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5265 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005269 { (case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272esac
5273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5274 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005278 :
5279else
Martin v. Löwis11437992002-04-12 09:54:03 +00005280 echo "$as_me: program exited with status $ac_status" >&5
5281echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005282sed 's/^/| /' conftest.$ac_ext >&5
5283
Martin v. Löwis11437992002-04-12 09:54:03 +00005284( exit $ac_status )
5285ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5288fi
5289
5290
Michael W. Hudson54241132001-12-07 15:38:26 +00005291fi
5292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005293{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5294echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005295if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005296
5297cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005298#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005299_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005300
5301fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005302
Skip Montanarob9820a32004-01-17 00:16:12 +00005303# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005314 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005315do
5316as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005317{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5318echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005320 echo $ECHO_N "(cached) $ECHO_C" >&6
5321else
5322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005323/* confdefs.h. */
5324_ACEOF
5325cat confdefs.h >>conftest.$ac_ext
5326cat >>conftest.$ac_ext <<_ACEOF
5327/* end confdefs.h. */
5328$ac_includes_default
5329
5330#include <$ac_header>
5331_ACEOF
5332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005333if { (ac_try="$ac_compile"
5334case "(($ac_try" in
5335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5336 *) ac_try_echo=$ac_try;;
5337esac
5338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5339 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005341 grep -v '^ *+' conftest.er1 >conftest.err
5342 rm -f conftest.er1
5343 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005345 (exit $ac_status); } && {
5346 test -z "$ac_c_werror_flag" ||
5347 test ! -s conftest.err
5348 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005349 eval "$as_ac_Header=yes"
5350else
5351 echo "$as_me: failed program was:" >&5
5352sed 's/^/| /' conftest.$ac_ext >&5
5353
Martin v. Löwiseba40652007-08-30 20:10:57 +00005354 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005356
5357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005359ac_res=`eval echo '${'$as_ac_Header'}'`
5360 { echo "$as_me:$LINENO: result: $ac_res" >&5
5361echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005362if test `eval echo '${'$as_ac_Header'}'` = yes; then
5363 cat >>confdefs.h <<_ACEOF
5364#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5365_ACEOF
5366
5367fi
5368
5369done
5370
5371
Martin v. Löwis11437992002-04-12 09:54:03 +00005372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
Anthony Baxter8a560de2004-10-13 15:30:56 +00005408
Martin v. Löwisc3001752005-01-23 09:27:24 +00005409
Martin v. Löwis11017b12006-01-14 18:12:57 +00005410
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005411
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005412
5413
5414
5415
5416
5417
5418
5419
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005420
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005421
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005422
5423
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005424for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5425fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005426io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
5427shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005428unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005429sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5430sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005431sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
5432sys/time.h \
5433sys/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 +00005434sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005435bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436do
Martin v. Löwis11437992002-04-12 09:54:03 +00005437as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005438if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5439 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5440echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5441if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005442 echo $ECHO_N "(cached) $ECHO_C" >&6
5443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005444ac_res=`eval echo '${'$as_ac_Header'}'`
5445 { echo "$as_me:$LINENO: result: $ac_res" >&5
5446echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005447else
Martin v. Löwis11437992002-04-12 09:54:03 +00005448 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005449{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5450echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005451cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005452/* confdefs.h. */
5453_ACEOF
5454cat confdefs.h >>conftest.$ac_ext
5455cat >>conftest.$ac_ext <<_ACEOF
5456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005457$ac_includes_default
5458#include <$ac_header>
5459_ACEOF
5460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005461if { (ac_try="$ac_compile"
5462case "(($ac_try" in
5463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5464 *) ac_try_echo=$ac_try;;
5465esac
5466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005469 grep -v '^ *+' conftest.er1 >conftest.err
5470 rm -f conftest.er1
5471 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005473 (exit $ac_status); } && {
5474 test -z "$ac_c_werror_flag" ||
5475 test ! -s conftest.err
5476 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005477 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005478else
Martin v. Löwis11437992002-04-12 09:54:03 +00005479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005480sed 's/^/| /' conftest.$ac_ext >&5
5481
Martin v. Löwiseba40652007-08-30 20:10:57 +00005482 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005484
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5487echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005488
5489# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005490{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5491echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005492cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005493/* confdefs.h. */
5494_ACEOF
5495cat confdefs.h >>conftest.$ac_ext
5496cat >>conftest.$ac_ext <<_ACEOF
5497/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005498#include <$ac_header>
5499_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005500if { (ac_try="$ac_cpp conftest.$ac_ext"
5501case "(($ac_try" in
5502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5503 *) ac_try_echo=$ac_try;;
5504esac
5505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5506 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005507 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005508 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005509 rm -f conftest.er1
5510 cat conftest.err >&5
5511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005512 (exit $ac_status); } >/dev/null && {
5513 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5514 test ! -s conftest.err
5515 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005516 ac_header_preproc=yes
5517else
5518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005519sed 's/^/| /' conftest.$ac_ext >&5
5520
Martin v. Löwis11437992002-04-12 09:54:03 +00005521 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005523
Martin v. Löwis11437992002-04-12 09:54:03 +00005524rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005525{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5526echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005527
5528# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005529case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5530 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005531 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5532echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005533 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5534echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5535 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005536 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005537 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005538 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5539echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005540 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5541echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5542 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5543echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5544 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5545echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005546 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5547echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005548 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5549echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005550 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005551## ------------------------------------------------ ##
5552## Report this to http://www.python.org/python-bugs ##
5553## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005554_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005555 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005556 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005557esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005558{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5559echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5560if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005561 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005562else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005563 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005565ac_res=`eval echo '${'$as_ac_Header'}'`
5566 { echo "$as_me:$LINENO: result: $ac_res" >&5
5567echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005568
5569fi
5570if test `eval echo '${'$as_ac_Header'}'` = yes; then
5571 cat >>confdefs.h <<_ACEOF
5572#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5573_ACEOF
5574
5575fi
5576
Guido van Rossum627b2d71993-12-24 10:39:16 +00005577done
5578
Martin v. Löwis11437992002-04-12 09:54:03 +00005579
5580
5581
5582
5583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005584ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005585for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5586 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005587{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5588echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5589if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005590 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005591else
Martin v. Löwis11437992002-04-12 09:54:03 +00005592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005593/* confdefs.h. */
5594_ACEOF
5595cat confdefs.h >>conftest.$ac_ext
5596cat >>conftest.$ac_ext <<_ACEOF
5597/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005598#include <sys/types.h>
5599#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005600
Martin v. Löwis11437992002-04-12 09:54:03 +00005601int
5602main ()
5603{
5604if ((DIR *) 0)
5605return 0;
5606 ;
5607 return 0;
5608}
5609_ACEOF
5610rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005611if { (ac_try="$ac_compile"
5612case "(($ac_try" in
5613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5614 *) ac_try_echo=$ac_try;;
5615esac
5616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005619 grep -v '^ *+' conftest.er1 >conftest.err
5620 rm -f conftest.er1
5621 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005623 (exit $ac_status); } && {
5624 test -z "$ac_c_werror_flag" ||
5625 test ! -s conftest.err
5626 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005627 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005628else
Martin v. Löwis11437992002-04-12 09:54:03 +00005629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005630sed 's/^/| /' conftest.$ac_ext >&5
5631
Martin v. Löwiseba40652007-08-30 20:10:57 +00005632 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005634
5635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005637ac_res=`eval echo '${'$as_ac_Header'}'`
5638 { echo "$as_me:$LINENO: result: $ac_res" >&5
5639echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005640if test `eval echo '${'$as_ac_Header'}'` = yes; then
5641 cat >>confdefs.h <<_ACEOF
5642#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5643_ACEOF
5644
5645ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005646fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648done
5649# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5650if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005651 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5652echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005653if test "${ac_cv_search_opendir+set}" = set; then
5654 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005655else
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005658/* confdefs.h. */
5659_ACEOF
5660cat confdefs.h >>conftest.$ac_ext
5661cat >>conftest.$ac_ext <<_ACEOF
5662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005663
Martin v. Löwiseba40652007-08-30 20:10:57 +00005664/* Override any GCC internal prototype to avoid an error.
5665 Use char because int might match the return type of a GCC
5666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005667#ifdef __cplusplus
5668extern "C"
5669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005670char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005671int
5672main ()
5673{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005674return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 ;
5676 return 0;
5677}
5678_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005679for ac_lib in '' dir; do
5680 if test -z "$ac_lib"; then
5681 ac_res="none required"
5682 else
5683 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005684 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005685 fi
5686 rm -f conftest.$ac_objext conftest$ac_exeext
5687if { (ac_try="$ac_link"
5688case "(($ac_try" in
5689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5690 *) ac_try_echo=$ac_try;;
5691esac
5692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5693 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005694 ac_status=$?
5695 grep -v '^ *+' conftest.er1 >conftest.err
5696 rm -f conftest.er1
5697 cat conftest.err >&5
5698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005699 (exit $ac_status); } && {
5700 test -z "$ac_c_werror_flag" ||
5701 test ! -s conftest.err
5702 } && test -s conftest$ac_exeext &&
5703 $as_test_x conftest$ac_exeext; then
5704 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005705else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005706 echo "$as_me: failed program was:" >&5
5707sed 's/^/| /' conftest.$ac_ext >&5
5708
Martin v. Löwiseba40652007-08-30 20:10:57 +00005709
Brett Cannon19fab762007-06-02 03:02:29 +00005710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005711
5712rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5713 conftest$ac_exeext
5714 if test "${ac_cv_search_opendir+set}" = set; then
5715 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005717done
5718if test "${ac_cv_search_opendir+set}" = set; then
5719 :
5720else
5721 ac_cv_search_opendir=no
5722fi
5723rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005724LIBS=$ac_func_search_save_LIBS
5725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005726{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5727echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5728ac_res=$ac_cv_search_opendir
5729if test "$ac_res" != no; then
5730 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005731
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005733
Michael W. Hudson54241132001-12-07 15:38:26 +00005734else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005735 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5736echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005737if test "${ac_cv_search_opendir+set}" = set; then
5738 echo $ECHO_N "(cached) $ECHO_C" >&6
5739else
5740 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005742/* confdefs.h. */
5743_ACEOF
5744cat confdefs.h >>conftest.$ac_ext
5745cat >>conftest.$ac_ext <<_ACEOF
5746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
Martin v. Löwiseba40652007-08-30 20:10:57 +00005748/* Override any GCC internal prototype to avoid an error.
5749 Use char because int might match the return type of a GCC
5750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005751#ifdef __cplusplus
5752extern "C"
5753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005754char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005755int
5756main ()
5757{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005758return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005759 ;
5760 return 0;
5761}
5762_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005763for ac_lib in '' x; do
5764 if test -z "$ac_lib"; then
5765 ac_res="none required"
5766 else
5767 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005768 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005769 fi
5770 rm -f conftest.$ac_objext conftest$ac_exeext
5771if { (ac_try="$ac_link"
5772case "(($ac_try" in
5773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5774 *) ac_try_echo=$ac_try;;
5775esac
5776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5777 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005778 ac_status=$?
5779 grep -v '^ *+' conftest.er1 >conftest.err
5780 rm -f conftest.er1
5781 cat conftest.err >&5
5782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005783 (exit $ac_status); } && {
5784 test -z "$ac_c_werror_flag" ||
5785 test ! -s conftest.err
5786 } && test -s conftest$ac_exeext &&
5787 $as_test_x conftest$ac_exeext; then
5788 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005789else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005790 echo "$as_me: failed program was:" >&5
5791sed 's/^/| /' conftest.$ac_ext >&5
5792
Martin v. Löwiseba40652007-08-30 20:10:57 +00005793
Brett Cannon19fab762007-06-02 03:02:29 +00005794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005795
5796rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5797 conftest$ac_exeext
5798 if test "${ac_cv_search_opendir+set}" = set; then
5799 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005800fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005801done
5802if test "${ac_cv_search_opendir+set}" = set; then
5803 :
5804else
5805 ac_cv_search_opendir=no
5806fi
5807rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005808LIBS=$ac_func_search_save_LIBS
5809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005810{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5811echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5812ac_res=$ac_cv_search_opendir
5813if test "$ac_res" != no; then
5814 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816fi
5817
5818fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005819
Martin v. Löwiseba40652007-08-30 20:10:57 +00005820{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5821echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005822if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5823 echo $ECHO_N "(cached) $ECHO_C" >&6
5824else
5825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005831#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005832int
5833main ()
5834{
5835return makedev(0, 0);
5836 ;
5837 return 0;
5838}
5839_ACEOF
5840rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841if { (ac_try="$ac_link"
5842case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
5846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5847 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849 grep -v '^ *+' conftest.er1 >conftest.err
5850 rm -f conftest.er1
5851 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005853 (exit $ac_status); } && {
5854 test -z "$ac_c_werror_flag" ||
5855 test ! -s conftest.err
5856 } && test -s conftest$ac_exeext &&
5857 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005858 ac_cv_header_sys_types_h_makedev=yes
5859else
5860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005861sed 's/^/| /' conftest.$ac_ext >&5
5862
Martin v. Löwiseba40652007-08-30 20:10:57 +00005863 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005865
5866rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005867 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005868
5869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005870{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5871echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005872
5873if test $ac_cv_header_sys_types_h_makedev = no; then
5874if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005875 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5876echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005877if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5878 echo $ECHO_N "(cached) $ECHO_C" >&6
5879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5881echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005882else
5883 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005884{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5885echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005886cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005887/* confdefs.h. */
5888_ACEOF
5889cat confdefs.h >>conftest.$ac_ext
5890cat >>conftest.$ac_ext <<_ACEOF
5891/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005892$ac_includes_default
5893#include <sys/mkdev.h>
5894_ACEOF
5895rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005896if { (ac_try="$ac_compile"
5897case "(($ac_try" in
5898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5899 *) ac_try_echo=$ac_try;;
5900esac
5901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5902 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005903 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005904 grep -v '^ *+' conftest.er1 >conftest.err
5905 rm -f conftest.er1
5906 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005908 (exit $ac_status); } && {
5909 test -z "$ac_c_werror_flag" ||
5910 test ! -s conftest.err
5911 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005912 ac_header_compiler=yes
5913else
5914 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005915sed 's/^/| /' conftest.$ac_ext >&5
5916
Martin v. Löwiseba40652007-08-30 20:10:57 +00005917 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005919
5920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5921{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5922echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005923
5924# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005925{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5926echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005927cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005928/* confdefs.h. */
5929_ACEOF
5930cat confdefs.h >>conftest.$ac_ext
5931cat >>conftest.$ac_ext <<_ACEOF
5932/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005933#include <sys/mkdev.h>
5934_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005935if { (ac_try="$ac_cpp conftest.$ac_ext"
5936case "(($ac_try" in
5937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5938 *) ac_try_echo=$ac_try;;
5939esac
5940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5941 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005942 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005943 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005944 rm -f conftest.er1
5945 cat conftest.err >&5
5946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005947 (exit $ac_status); } >/dev/null && {
5948 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5949 test ! -s conftest.err
5950 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005951 ac_header_preproc=yes
5952else
5953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005954sed 's/^/| /' conftest.$ac_ext >&5
5955
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005956 ac_header_preproc=no
5957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005958
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005959rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005960{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5961echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005962
5963# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005964case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5965 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005966 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5967echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005968 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5969echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5970 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005971 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005972 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005973 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5974echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005975 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5976echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5977 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5978echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5979 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5980echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005981 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5982echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005983 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5984echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005985 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005986## ------------------------------------------------ ##
5987## Report this to http://www.python.org/python-bugs ##
5988## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005989_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005991 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005992esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005993{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5994echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005995if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5996 echo $ECHO_N "(cached) $ECHO_C" >&6
5997else
5998 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6001echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006002
6003fi
6004if test $ac_cv_header_sys_mkdev_h = yes; then
6005
6006cat >>confdefs.h <<\_ACEOF
6007#define MAJOR_IN_MKDEV 1
6008_ACEOF
6009
6010fi
6011
6012
6013
6014 if test $ac_cv_header_sys_mkdev_h = no; then
6015 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006016 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6017echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006018if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6019 echo $ECHO_N "(cached) $ECHO_C" >&6
6020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6022echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006023else
6024 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006025{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6026echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006027cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006028/* confdefs.h. */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006033$ac_includes_default
6034#include <sys/sysmacros.h>
6035_ACEOF
6036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006037if { (ac_try="$ac_compile"
6038case "(($ac_try" in
6039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6040 *) ac_try_echo=$ac_try;;
6041esac
6042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006045 grep -v '^ *+' conftest.er1 >conftest.err
6046 rm -f conftest.er1
6047 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006049 (exit $ac_status); } && {
6050 test -z "$ac_c_werror_flag" ||
6051 test ! -s conftest.err
6052 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006053 ac_header_compiler=yes
6054else
6055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006056sed 's/^/| /' conftest.$ac_ext >&5
6057
Martin v. Löwiseba40652007-08-30 20:10:57 +00006058 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006060
6061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6062{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6063echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006064
6065# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006066{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6067echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006069/* confdefs.h. */
6070_ACEOF
6071cat confdefs.h >>conftest.$ac_ext
6072cat >>conftest.$ac_ext <<_ACEOF
6073/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074#include <sys/sysmacros.h>
6075_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006076if { (ac_try="$ac_cpp conftest.$ac_ext"
6077case "(($ac_try" in
6078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6079 *) ac_try_echo=$ac_try;;
6080esac
6081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6082 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006083 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006084 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006085 rm -f conftest.er1
6086 cat conftest.err >&5
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006088 (exit $ac_status); } >/dev/null && {
6089 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6090 test ! -s conftest.err
6091 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006092 ac_header_preproc=yes
6093else
6094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006095sed 's/^/| /' conftest.$ac_ext >&5
6096
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006097 ac_header_preproc=no
6098fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006099
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006101{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6102echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006103
6104# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006105case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6106 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006107 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6108echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006109 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6110echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6111 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006112 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006113 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006114 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6115echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6117echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6118 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6119echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6120 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6121echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006122 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6123echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006124 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6125echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006127## ------------------------------------------------ ##
6128## Report this to http://www.python.org/python-bugs ##
6129## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006130_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006131 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006132 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006133esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006134{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6135echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006136if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6137 echo $ECHO_N "(cached) $ECHO_C" >&6
6138else
6139 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006141{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6142echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006143
6144fi
6145if test $ac_cv_header_sys_sysmacros_h = yes; then
6146
6147cat >>confdefs.h <<\_ACEOF
6148#define MAJOR_IN_SYSMACROS 1
6149_ACEOF
6150
6151fi
6152
6153
6154 fi
6155fi
6156
Michael W. Hudson54241132001-12-07 15:38:26 +00006157
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006158# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006159
6160for ac_header in term.h
6161do
6162as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006163{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6164echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6165if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006166 echo $ECHO_N "(cached) $ECHO_C" >&6
6167else
6168 cat >conftest.$ac_ext <<_ACEOF
6169/* confdefs.h. */
6170_ACEOF
6171cat confdefs.h >>conftest.$ac_ext
6172cat >>conftest.$ac_ext <<_ACEOF
6173/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006174
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006175#ifdef HAVE_CURSES_H
6176#include <curses.h>
6177#endif
6178
6179
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006180#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006181_ACEOF
6182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006183if { (ac_try="$ac_compile"
6184case "(($ac_try" in
6185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6186 *) ac_try_echo=$ac_try;;
6187esac
6188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006190 ac_status=$?
6191 grep -v '^ *+' conftest.er1 >conftest.err
6192 rm -f conftest.er1
6193 cat conftest.err >&5
6194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006195 (exit $ac_status); } && {
6196 test -z "$ac_c_werror_flag" ||
6197 test ! -s conftest.err
6198 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006199 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006200else
6201 echo "$as_me: failed program was:" >&5
6202sed 's/^/| /' conftest.$ac_ext >&5
6203
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006206
6207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209ac_res=`eval echo '${'$as_ac_Header'}'`
6210 { echo "$as_me:$LINENO: result: $ac_res" >&5
6211echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006212if test `eval echo '${'$as_ac_Header'}'` = yes; then
6213 cat >>confdefs.h <<_ACEOF
6214#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6215_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006216
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006217fi
6218
6219done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006220
6221
Martin v. Löwis11017b12006-01-14 18:12:57 +00006222# On Linux, netlink.h requires asm/types.h
6223
6224for ac_header in linux/netlink.h
6225do
6226as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6229if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006230 echo $ECHO_N "(cached) $ECHO_C" >&6
6231else
6232 cat >conftest.$ac_ext <<_ACEOF
6233/* confdefs.h. */
6234_ACEOF
6235cat confdefs.h >>conftest.$ac_ext
6236cat >>conftest.$ac_ext <<_ACEOF
6237/* end confdefs.h. */
6238
6239#ifdef HAVE_ASM_TYPES_H
6240#include <asm/types.h>
6241#endif
6242#ifdef HAVE_SYS_SOCKET_H
6243#include <sys/socket.h>
6244#endif
6245
6246
6247#include <$ac_header>
6248_ACEOF
6249rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006250if { (ac_try="$ac_compile"
6251case "(($ac_try" in
6252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6253 *) ac_try_echo=$ac_try;;
6254esac
6255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006257 ac_status=$?
6258 grep -v '^ *+' conftest.er1 >conftest.err
6259 rm -f conftest.er1
6260 cat conftest.err >&5
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006262 (exit $ac_status); } && {
6263 test -z "$ac_c_werror_flag" ||
6264 test ! -s conftest.err
6265 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006266 eval "$as_ac_Header=yes"
6267else
6268 echo "$as_me: failed program was:" >&5
6269sed 's/^/| /' conftest.$ac_ext >&5
6270
Martin v. Löwiseba40652007-08-30 20:10:57 +00006271 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273
6274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006276ac_res=`eval echo '${'$as_ac_Header'}'`
6277 { echo "$as_me:$LINENO: result: $ac_res" >&5
6278echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006279if test `eval echo '${'$as_ac_Header'}'` = yes; then
6280 cat >>confdefs.h <<_ACEOF
6281#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6282_ACEOF
6283
6284fi
6285
6286done
6287
6288
Guido van Rossum627b2d71993-12-24 10:39:16 +00006289# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006290was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006291{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6292echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006293cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006300
6301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006303 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006304 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006305else
Martin v. Löwis11437992002-04-12 09:54:03 +00006306
6307
6308cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006309#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006310_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006311
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006312
Guido van Rossum627b2d71993-12-24 10:39:16 +00006313fi
6314rm -f conftest*
6315
Martin v. Löwiseba40652007-08-30 20:10:57 +00006316{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6317echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006318
Neal Norwitz11690112002-07-30 01:08:28 +00006319# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006320{ echo "$as_me:$LINENO: checking for makedev" >&5
6321echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006322cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006323/* confdefs.h. */
6324_ACEOF
6325cat confdefs.h >>conftest.$ac_ext
6326cat >>conftest.$ac_ext <<_ACEOF
6327/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006328#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006329int
6330main ()
6331{
6332 makedev(0, 0)
6333 ;
6334 return 0;
6335}
6336_ACEOF
6337rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006338if { (ac_try="$ac_link"
6339case "(($ac_try" in
6340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6341 *) ac_try_echo=$ac_try;;
6342esac
6343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6344 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006346 grep -v '^ *+' conftest.er1 >conftest.err
6347 rm -f conftest.er1
6348 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006350 (exit $ac_status); } && {
6351 test -z "$ac_c_werror_flag" ||
6352 test ! -s conftest.err
6353 } && test -s conftest$ac_exeext &&
6354 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006355 ac_cv_has_makedev=yes
6356else
6357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006358sed 's/^/| /' conftest.$ac_ext >&5
6359
Martin v. Löwiseba40652007-08-30 20:10:57 +00006360 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362
6363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006364 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006365if test "$ac_cv_has_makedev" = "no"; then
6366 # we didn't link, try if _OSF_SOURCE will allow us to link
6367 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006368/* confdefs.h. */
6369_ACEOF
6370cat confdefs.h >>conftest.$ac_ext
6371cat >>conftest.$ac_ext <<_ACEOF
6372/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006373
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006374#define _OSF_SOURCE 1
6375#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006376
Neal Norwitz11690112002-07-30 01:08:28 +00006377int
6378main ()
6379{
6380 makedev(0, 0)
6381 ;
6382 return 0;
6383}
6384_ACEOF
6385rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006386if { (ac_try="$ac_link"
6387case "(($ac_try" in
6388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6389 *) ac_try_echo=$ac_try;;
6390esac
6391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6392 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006394 grep -v '^ *+' conftest.er1 >conftest.err
6395 rm -f conftest.er1
6396 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006398 (exit $ac_status); } && {
6399 test -z "$ac_c_werror_flag" ||
6400 test ! -s conftest.err
6401 } && test -s conftest$ac_exeext &&
6402 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006403 ac_cv_has_makedev=yes
6404else
6405 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006406sed 's/^/| /' conftest.$ac_ext >&5
6407
Martin v. Löwiseba40652007-08-30 20:10:57 +00006408 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006409fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006410
6411rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006412 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006413 if test "$ac_cv_has_makedev" = "yes"; then
6414
6415cat >>confdefs.h <<\_ACEOF
6416#define _OSF_SOURCE 1
6417_ACEOF
6418
6419 fi
6420fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006421{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6422echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006423if test "$ac_cv_has_makedev" = "yes"; then
6424
6425cat >>confdefs.h <<\_ACEOF
6426#define HAVE_MAKEDEV 1
6427_ACEOF
6428
6429fi
6430
Martin v. Löwis399a6892002-10-04 10:22:02 +00006431# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6432# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6433# defined, but the compiler does not support pragma redefine_extname,
6434# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6435# structures (such as rlimit64) without declaring them. As a
6436# work-around, disable LFS on such configurations
6437
6438use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006439{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6440echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006442/* confdefs.h. */
6443_ACEOF
6444cat confdefs.h >>conftest.$ac_ext
6445cat >>conftest.$ac_ext <<_ACEOF
6446/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006447
6448#define _LARGEFILE_SOURCE 1
6449#define _FILE_OFFSET_BITS 64
6450#include <sys/resource.h>
6451
Martin v. Löwis399a6892002-10-04 10:22:02 +00006452int
6453main ()
6454{
6455struct rlimit foo;
6456 ;
6457 return 0;
6458}
6459_ACEOF
6460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006461if { (ac_try="$ac_compile"
6462case "(($ac_try" in
6463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6464 *) ac_try_echo=$ac_try;;
6465esac
6466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006469 grep -v '^ *+' conftest.er1 >conftest.err
6470 rm -f conftest.er1
6471 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006473 (exit $ac_status); } && {
6474 test -z "$ac_c_werror_flag" ||
6475 test ! -s conftest.err
6476 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006477 sol_lfs_bug=no
6478else
6479 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006480sed 's/^/| /' conftest.$ac_ext >&5
6481
Martin v. Löwiseba40652007-08-30 20:10:57 +00006482 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006484
6485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6486{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6487echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006488if test "$sol_lfs_bug" = "yes"; then
6489 use_lfs=no
6490fi
6491
6492if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006493# Two defines needed to enable largefile support on various platforms
6494# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006495
Martin v. Löwis11437992002-04-12 09:54:03 +00006496cat >>confdefs.h <<\_ACEOF
6497#define _LARGEFILE_SOURCE 1
6498_ACEOF
6499
6500
6501cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006502#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006503_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006504
Martin v. Löwis399a6892002-10-04 10:22:02 +00006505fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006506
Guido van Rossum84e7b241996-08-19 21:59:00 +00006507# Add some code to confdefs.h so that the test for off_t works on SCO
6508cat >> confdefs.h <<\EOF
6509#if defined(SCO_DS)
6510#undef _OFF_T
6511#endif
6512EOF
6513
Guido van Rossumef2255b2000-03-10 22:30:29 +00006514# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006515{ echo "$as_me:$LINENO: checking for mode_t" >&5
6516echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006517if test "${ac_cv_type_mode_t+set}" = set; then
6518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006519else
Martin v. Löwis11437992002-04-12 09:54:03 +00006520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006521/* confdefs.h. */
6522_ACEOF
6523cat confdefs.h >>conftest.$ac_ext
6524cat >>conftest.$ac_ext <<_ACEOF
6525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006526$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006527typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006528int
6529main ()
6530{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006531if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006532 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006533if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006534 return 0;
6535 ;
6536 return 0;
6537}
6538_ACEOF
6539rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006540if { (ac_try="$ac_compile"
6541case "(($ac_try" in
6542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6543 *) ac_try_echo=$ac_try;;
6544esac
6545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006548 grep -v '^ *+' conftest.er1 >conftest.err
6549 rm -f conftest.er1
6550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006552 (exit $ac_status); } && {
6553 test -z "$ac_c_werror_flag" ||
6554 test ! -s conftest.err
6555 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006556 ac_cv_type_mode_t=yes
6557else
Martin v. Löwis11437992002-04-12 09:54:03 +00006558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006559sed 's/^/| /' conftest.$ac_ext >&5
6560
Martin v. Löwiseba40652007-08-30 20:10:57 +00006561 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006563
6564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6567echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006568if test $ac_cv_type_mode_t = yes; then
6569 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570else
Martin v. Löwis11437992002-04-12 09:54:03 +00006571
6572cat >>confdefs.h <<_ACEOF
6573#define mode_t int
6574_ACEOF
6575
6576fi
6577
Martin v. Löwiseba40652007-08-30 20:10:57 +00006578{ echo "$as_me:$LINENO: checking for off_t" >&5
6579echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006580if test "${ac_cv_type_off_t+set}" = set; then
6581 echo $ECHO_N "(cached) $ECHO_C" >&6
6582else
6583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006584/* confdefs.h. */
6585_ACEOF
6586cat confdefs.h >>conftest.$ac_ext
6587cat >>conftest.$ac_ext <<_ACEOF
6588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006589$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006590typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006591int
6592main ()
6593{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006594if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006595 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006596if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006597 return 0;
6598 ;
6599 return 0;
6600}
6601_ACEOF
6602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006603if { (ac_try="$ac_compile"
6604case "(($ac_try" in
6605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6606 *) ac_try_echo=$ac_try;;
6607esac
6608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006611 grep -v '^ *+' conftest.er1 >conftest.err
6612 rm -f conftest.er1
6613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006615 (exit $ac_status); } && {
6616 test -z "$ac_c_werror_flag" ||
6617 test ! -s conftest.err
6618 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006619 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006620else
Martin v. Löwis11437992002-04-12 09:54:03 +00006621 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006622sed 's/^/| /' conftest.$ac_ext >&5
6623
Martin v. Löwiseba40652007-08-30 20:10:57 +00006624 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006626
6627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006629{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6630echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006631if test $ac_cv_type_off_t = yes; then
6632 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006633else
Martin v. Löwis11437992002-04-12 09:54:03 +00006634
6635cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006636#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006637_ACEOF
6638
6639fi
6640
Martin v. Löwiseba40652007-08-30 20:10:57 +00006641{ echo "$as_me:$LINENO: checking for pid_t" >&5
6642echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006643if test "${ac_cv_type_pid_t+set}" = set; then
6644 echo $ECHO_N "(cached) $ECHO_C" >&6
6645else
6646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006647/* confdefs.h. */
6648_ACEOF
6649cat confdefs.h >>conftest.$ac_ext
6650cat >>conftest.$ac_ext <<_ACEOF
6651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006652$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006653typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006654int
6655main ()
6656{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006657if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006658 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006659if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006660 return 0;
6661 ;
6662 return 0;
6663}
6664_ACEOF
6665rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006666if { (ac_try="$ac_compile"
6667case "(($ac_try" in
6668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6669 *) ac_try_echo=$ac_try;;
6670esac
6671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6672 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006674 grep -v '^ *+' conftest.er1 >conftest.err
6675 rm -f conftest.er1
6676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006678 (exit $ac_status); } && {
6679 test -z "$ac_c_werror_flag" ||
6680 test ! -s conftest.err
6681 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006682 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006683else
Martin v. Löwis11437992002-04-12 09:54:03 +00006684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006685sed 's/^/| /' conftest.$ac_ext >&5
6686
Martin v. Löwiseba40652007-08-30 20:10:57 +00006687 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006688fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689
6690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6693echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006694if test $ac_cv_type_pid_t = yes; then
6695 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006696else
Martin v. Löwis11437992002-04-12 09:54:03 +00006697
6698cat >>confdefs.h <<_ACEOF
6699#define pid_t int
6700_ACEOF
6701
6702fi
6703
Martin v. Löwiseba40652007-08-30 20:10:57 +00006704{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6705echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006706if test "${ac_cv_type_signal+set}" = set; then
6707 echo $ECHO_N "(cached) $ECHO_C" >&6
6708else
6709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006710/* confdefs.h. */
6711_ACEOF
6712cat confdefs.h >>conftest.$ac_ext
6713cat >>conftest.$ac_ext <<_ACEOF
6714/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006715#include <sys/types.h>
6716#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718int
6719main ()
6720{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006721return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006722 ;
6723 return 0;
6724}
6725_ACEOF
6726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006727if { (ac_try="$ac_compile"
6728case "(($ac_try" in
6729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6730 *) ac_try_echo=$ac_try;;
6731esac
6732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006735 grep -v '^ *+' conftest.er1 >conftest.err
6736 rm -f conftest.er1
6737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006739 (exit $ac_status); } && {
6740 test -z "$ac_c_werror_flag" ||
6741 test ! -s conftest.err
6742 } && test -s conftest.$ac_objext; then
6743 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006744else
Martin v. Löwis11437992002-04-12 09:54:03 +00006745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006746sed 's/^/| /' conftest.$ac_ext >&5
6747
Martin v. Löwiseba40652007-08-30 20:10:57 +00006748 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006750
6751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006753{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6754echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006755
Martin v. Löwis11437992002-04-12 09:54:03 +00006756cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006757#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006758_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006759
Michael W. Hudson54241132001-12-07 15:38:26 +00006760
Martin v. Löwiseba40652007-08-30 20:10:57 +00006761{ echo "$as_me:$LINENO: checking for size_t" >&5
6762echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006763if test "${ac_cv_type_size_t+set}" = set; then
6764 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006765else
Martin v. Löwis11437992002-04-12 09:54:03 +00006766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006767/* confdefs.h. */
6768_ACEOF
6769cat confdefs.h >>conftest.$ac_ext
6770cat >>conftest.$ac_ext <<_ACEOF
6771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006773typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006774int
6775main ()
6776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006777if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006779if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006780 return 0;
6781 ;
6782 return 0;
6783}
6784_ACEOF
6785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786if { (ac_try="$ac_compile"
6787case "(($ac_try" in
6788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6789 *) ac_try_echo=$ac_try;;
6790esac
6791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006794 grep -v '^ *+' conftest.er1 >conftest.err
6795 rm -f conftest.er1
6796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006798 (exit $ac_status); } && {
6799 test -z "$ac_c_werror_flag" ||
6800 test ! -s conftest.err
6801 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006802 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006803else
Martin v. Löwis11437992002-04-12 09:54:03 +00006804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006805sed 's/^/| /' conftest.$ac_ext >&5
6806
Martin v. Löwiseba40652007-08-30 20:10:57 +00006807 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006809
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6813echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006814if test $ac_cv_type_size_t = yes; then
6815 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006816else
Martin v. Löwis11437992002-04-12 09:54:03 +00006817
6818cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006819#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00006820_ACEOF
6821
6822fi
6823
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6825echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006826if test "${ac_cv_type_uid_t+set}" = set; then
6827 echo $ECHO_N "(cached) $ECHO_C" >&6
6828else
6829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006830/* confdefs.h. */
6831_ACEOF
6832cat confdefs.h >>conftest.$ac_ext
6833cat >>conftest.$ac_ext <<_ACEOF
6834/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006835#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006836
6837_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006838if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006839 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006840 ac_cv_type_uid_t=yes
6841else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006842 ac_cv_type_uid_t=no
6843fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006844rm -f conftest*
6845
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6848echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006849if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006850
Martin v. Löwis11437992002-04-12 09:54:03 +00006851cat >>confdefs.h <<\_ACEOF
6852#define uid_t int
6853_ACEOF
6854
6855
6856cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006857#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006858_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006859
6860fi
6861
Martin v. Löwiseba40652007-08-30 20:10:57 +00006862{ echo "$as_me:$LINENO: checking for ssize_t" >&5
6863echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006864if test "${ac_cv_type_ssize_t+set}" = set; then
6865 echo $ECHO_N "(cached) $ECHO_C" >&6
6866else
6867 cat >conftest.$ac_ext <<_ACEOF
6868/* confdefs.h. */
6869_ACEOF
6870cat confdefs.h >>conftest.$ac_ext
6871cat >>conftest.$ac_ext <<_ACEOF
6872/* end confdefs.h. */
6873$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006874typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00006875int
6876main ()
6877{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006878if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006879 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006880if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006881 return 0;
6882 ;
6883 return 0;
6884}
6885_ACEOF
6886rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006887if { (ac_try="$ac_compile"
6888case "(($ac_try" in
6889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6890 *) ac_try_echo=$ac_try;;
6891esac
6892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006894 ac_status=$?
6895 grep -v '^ *+' conftest.er1 >conftest.err
6896 rm -f conftest.er1
6897 cat conftest.err >&5
6898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899 (exit $ac_status); } && {
6900 test -z "$ac_c_werror_flag" ||
6901 test ! -s conftest.err
6902 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006903 ac_cv_type_ssize_t=yes
6904else
6905 echo "$as_me: failed program was:" >&5
6906sed 's/^/| /' conftest.$ac_ext >&5
6907
Martin v. Löwiseba40652007-08-30 20:10:57 +00006908 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910
6911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006912fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006913{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6914echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00006915if test $ac_cv_type_ssize_t = yes; then
6916
6917cat >>confdefs.h <<\_ACEOF
6918#define HAVE_SSIZE_T 1
6919_ACEOF
6920
6921fi
6922
Jack Jansendd19cf82001-12-06 22:36:17 +00006923
Michael W. Hudson54241132001-12-07 15:38:26 +00006924# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006925# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00006926{ echo "$as_me:$LINENO: checking for int" >&5
6927echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006928if test "${ac_cv_type_int+set}" = set; then
6929 echo $ECHO_N "(cached) $ECHO_C" >&6
6930else
6931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006932/* confdefs.h. */
6933_ACEOF
6934cat confdefs.h >>conftest.$ac_ext
6935cat >>conftest.$ac_ext <<_ACEOF
6936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006937$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006939int
6940main ()
6941{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006942if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006944if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006945 return 0;
6946 ;
6947 return 0;
6948}
6949_ACEOF
6950rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006951if { (ac_try="$ac_compile"
6952case "(($ac_try" in
6953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6954 *) ac_try_echo=$ac_try;;
6955esac
6956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006959 grep -v '^ *+' conftest.er1 >conftest.err
6960 rm -f conftest.er1
6961 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963 (exit $ac_status); } && {
6964 test -z "$ac_c_werror_flag" ||
6965 test ! -s conftest.err
6966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006967 ac_cv_type_int=yes
6968else
6969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006970sed 's/^/| /' conftest.$ac_ext >&5
6971
Martin v. Löwiseba40652007-08-30 20:10:57 +00006972 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006973fi
Brett Cannon19fab762007-06-02 03:02:29 +00006974
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6976fi
6977{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6978echo "${ECHO_T}$ac_cv_type_int" >&6; }
6979
6980# The cast to long int works around a bug in the HP C Compiler
6981# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6982# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6983# This bug is HP SR number 8606223364.
6984{ echo "$as_me:$LINENO: checking size of int" >&5
6985echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006986if test "${ac_cv_sizeof_int+set}" = set; then
6987 echo $ECHO_N "(cached) $ECHO_C" >&6
6988else
Martin v. Löwis11437992002-04-12 09:54:03 +00006989 if test "$cross_compiling" = yes; then
6990 # Depending upon the size, compute the lo and hi bounds.
6991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006992/* confdefs.h. */
6993_ACEOF
6994cat confdefs.h >>conftest.$ac_ext
6995cat >>conftest.$ac_ext <<_ACEOF
6996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006997$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006999int
7000main ()
7001{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007002static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007003test_array [0] = 0
7004
7005 ;
7006 return 0;
7007}
7008_ACEOF
7009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007010if { (ac_try="$ac_compile"
7011case "(($ac_try" in
7012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7013 *) ac_try_echo=$ac_try;;
7014esac
7015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007018 grep -v '^ *+' conftest.er1 >conftest.err
7019 rm -f conftest.er1
7020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007022 (exit $ac_status); } && {
7023 test -z "$ac_c_werror_flag" ||
7024 test ! -s conftest.err
7025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007026 ac_lo=0 ac_mid=0
7027 while :; do
7028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007029/* confdefs.h. */
7030_ACEOF
7031cat confdefs.h >>conftest.$ac_ext
7032cat >>conftest.$ac_ext <<_ACEOF
7033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007034$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
7038{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007047if { (ac_try="$ac_compile"
7048case "(($ac_try" in
7049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7050 *) ac_try_echo=$ac_try;;
7051esac
7052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7053 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007055 grep -v '^ *+' conftest.er1 >conftest.err
7056 rm -f conftest.er1
7057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007059 (exit $ac_status); } && {
7060 test -z "$ac_c_werror_flag" ||
7061 test ! -s conftest.err
7062 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007063 ac_hi=$ac_mid; break
7064else
7065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007066sed 's/^/| /' conftest.$ac_ext >&5
7067
Martin v. Löwiseba40652007-08-30 20:10:57 +00007068 ac_lo=`expr $ac_mid + 1`
7069 if test $ac_lo -le $ac_mid; then
7070 ac_lo= ac_hi=
7071 break
7072 fi
7073 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007075
7076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 done
7078else
7079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007080sed 's/^/| /' conftest.$ac_ext >&5
7081
Martin v. Löwiseba40652007-08-30 20:10:57 +00007082 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007083/* confdefs.h. */
7084_ACEOF
7085cat confdefs.h >>conftest.$ac_ext
7086cat >>conftest.$ac_ext <<_ACEOF
7087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007088$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007089 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007090int
7091main ()
7092{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007093static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007094test_array [0] = 0
7095
7096 ;
7097 return 0;
7098}
7099_ACEOF
7100rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101if { (ac_try="$ac_compile"
7102case "(($ac_try" in
7103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7104 *) ac_try_echo=$ac_try;;
7105esac
7106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007109 grep -v '^ *+' conftest.er1 >conftest.err
7110 rm -f conftest.er1
7111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007113 (exit $ac_status); } && {
7114 test -z "$ac_c_werror_flag" ||
7115 test ! -s conftest.err
7116 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007117 ac_hi=-1 ac_mid=-1
7118 while :; do
7119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007120/* confdefs.h. */
7121_ACEOF
7122cat confdefs.h >>conftest.$ac_ext
7123cat >>conftest.$ac_ext <<_ACEOF
7124/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007125$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007126 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007127int
7128main ()
7129{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007131test_array [0] = 0
7132
7133 ;
7134 return 0;
7135}
7136_ACEOF
7137rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007138if { (ac_try="$ac_compile"
7139case "(($ac_try" in
7140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7141 *) ac_try_echo=$ac_try;;
7142esac
7143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007146 grep -v '^ *+' conftest.er1 >conftest.err
7147 rm -f conftest.er1
7148 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007150 (exit $ac_status); } && {
7151 test -z "$ac_c_werror_flag" ||
7152 test ! -s conftest.err
7153 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007154 ac_lo=$ac_mid; break
7155else
7156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007157sed 's/^/| /' conftest.$ac_ext >&5
7158
Martin v. Löwiseba40652007-08-30 20:10:57 +00007159 ac_hi=`expr '(' $ac_mid ')' - 1`
7160 if test $ac_mid -le $ac_hi; then
7161 ac_lo= ac_hi=
7162 break
7163 fi
7164 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007165fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007166
7167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007168 done
7169else
7170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007171sed 's/^/| /' conftest.$ac_ext >&5
7172
Martin v. Löwiseba40652007-08-30 20:10:57 +00007173 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007175
7176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007178
7179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007180# Binary search between lo and hi bounds.
7181while test "x$ac_lo" != "x$ac_hi"; do
7182 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007184/* confdefs.h. */
7185_ACEOF
7186cat confdefs.h >>conftest.$ac_ext
7187cat >>conftest.$ac_ext <<_ACEOF
7188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007189$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007191int
7192main ()
7193{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007194static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007195test_array [0] = 0
7196
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007202if { (ac_try="$ac_compile"
7203case "(($ac_try" in
7204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7205 *) ac_try_echo=$ac_try;;
7206esac
7207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007210 grep -v '^ *+' conftest.er1 >conftest.err
7211 rm -f conftest.er1
7212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007214 (exit $ac_status); } && {
7215 test -z "$ac_c_werror_flag" ||
7216 test ! -s conftest.err
7217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007218 ac_hi=$ac_mid
7219else
7220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007221sed 's/^/| /' conftest.$ac_ext >&5
7222
Martin v. Löwiseba40652007-08-30 20:10:57 +00007223 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007225
7226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007227done
7228case $ac_lo in
7229?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007230'') if test "$ac_cv_type_int" = yes; then
7231 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007232See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007233echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007234See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007235 { (exit 77); exit 77; }; }
7236 else
7237 ac_cv_sizeof_int=0
7238 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007239esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007240else
Martin v. Löwis11437992002-04-12 09:54:03 +00007241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007242/* confdefs.h. */
7243_ACEOF
7244cat confdefs.h >>conftest.$ac_ext
7245cat >>conftest.$ac_ext <<_ACEOF
7246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007247$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007248 typedef int ac__type_sizeof_;
7249static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7250static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007251#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007252#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007253int
7254main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007255{
Martin v. Löwis11437992002-04-12 09:54:03 +00007256
7257 FILE *f = fopen ("conftest.val", "w");
7258 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007259 return 1;
7260 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007261 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007262 long int i = longval ();
7263 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7264 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 fprintf (f, "%ld\n", i);
7266 }
7267 else
7268 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007269 unsigned long int i = ulongval ();
7270 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7271 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007272 fprintf (f, "%lu\n", i);
7273 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007274 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007275
7276 ;
7277 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007278}
Martin v. Löwis11437992002-04-12 09:54:03 +00007279_ACEOF
7280rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007281if { (ac_try="$ac_link"
7282case "(($ac_try" in
7283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7284 *) ac_try_echo=$ac_try;;
7285esac
7286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7287 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007288 ac_status=$?
7289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7290 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007291 { (case "(($ac_try" in
7292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7293 *) ac_try_echo=$ac_try;;
7294esac
7295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7296 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007297 ac_status=$?
7298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7299 (exit $ac_status); }; }; then
7300 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007301else
Martin v. Löwis11437992002-04-12 09:54:03 +00007302 echo "$as_me: program exited with status $ac_status" >&5
7303echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007304sed 's/^/| /' conftest.$ac_ext >&5
7305
Martin v. Löwis11437992002-04-12 09:54:03 +00007306( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007307if test "$ac_cv_type_int" = yes; then
7308 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007309See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007310echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007311See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007312 { (exit 77); exit 77; }; }
7313 else
7314 ac_cv_sizeof_int=0
7315 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007317rm -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 +00007318fi
7319rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007321{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7322echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7323
7324
7325
Martin v. Löwis11437992002-04-12 09:54:03 +00007326cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007327#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007328_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007329
7330
Martin v. Löwiseba40652007-08-30 20:10:57 +00007331{ echo "$as_me:$LINENO: checking for long" >&5
7332echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007333if test "${ac_cv_type_long+set}" = set; then
7334 echo $ECHO_N "(cached) $ECHO_C" >&6
7335else
7336 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007337/* confdefs.h. */
7338_ACEOF
7339cat confdefs.h >>conftest.$ac_ext
7340cat >>conftest.$ac_ext <<_ACEOF
7341/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007342$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007343typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007344int
7345main ()
7346{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007348 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007349if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007350 return 0;
7351 ;
7352 return 0;
7353}
7354_ACEOF
7355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007356if { (ac_try="$ac_compile"
7357case "(($ac_try" in
7358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7359 *) ac_try_echo=$ac_try;;
7360esac
7361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007364 grep -v '^ *+' conftest.er1 >conftest.err
7365 rm -f conftest.er1
7366 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007368 (exit $ac_status); } && {
7369 test -z "$ac_c_werror_flag" ||
7370 test ! -s conftest.err
7371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007372 ac_cv_type_long=yes
7373else
7374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007375sed 's/^/| /' conftest.$ac_ext >&5
7376
Martin v. Löwiseba40652007-08-30 20:10:57 +00007377 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007378fi
Brett Cannon19fab762007-06-02 03:02:29 +00007379
Martin v. Löwiseba40652007-08-30 20:10:57 +00007380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7381fi
7382{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7383echo "${ECHO_T}$ac_cv_type_long" >&6; }
7384
7385# The cast to long int works around a bug in the HP C Compiler
7386# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7387# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7388# This bug is HP SR number 8606223364.
7389{ echo "$as_me:$LINENO: checking size of long" >&5
7390echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007391if test "${ac_cv_sizeof_long+set}" = set; then
7392 echo $ECHO_N "(cached) $ECHO_C" >&6
7393else
Martin v. Löwis11437992002-04-12 09:54:03 +00007394 if test "$cross_compiling" = yes; then
7395 # Depending upon the size, compute the lo and hi bounds.
7396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007397/* confdefs.h. */
7398_ACEOF
7399cat confdefs.h >>conftest.$ac_ext
7400cat >>conftest.$ac_ext <<_ACEOF
7401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007402$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007403 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007404int
7405main ()
7406{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007408test_array [0] = 0
7409
7410 ;
7411 return 0;
7412}
7413_ACEOF
7414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007415if { (ac_try="$ac_compile"
7416case "(($ac_try" in
7417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7418 *) ac_try_echo=$ac_try;;
7419esac
7420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007423 grep -v '^ *+' conftest.er1 >conftest.err
7424 rm -f conftest.er1
7425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007427 (exit $ac_status); } && {
7428 test -z "$ac_c_werror_flag" ||
7429 test ! -s conftest.err
7430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007431 ac_lo=0 ac_mid=0
7432 while :; do
7433 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007434/* confdefs.h. */
7435_ACEOF
7436cat confdefs.h >>conftest.$ac_ext
7437cat >>conftest.$ac_ext <<_ACEOF
7438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007439$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007440 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007441int
7442main ()
7443{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007444static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007445test_array [0] = 0
7446
7447 ;
7448 return 0;
7449}
7450_ACEOF
7451rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007452if { (ac_try="$ac_compile"
7453case "(($ac_try" in
7454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7455 *) ac_try_echo=$ac_try;;
7456esac
7457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007460 grep -v '^ *+' conftest.er1 >conftest.err
7461 rm -f conftest.er1
7462 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007464 (exit $ac_status); } && {
7465 test -z "$ac_c_werror_flag" ||
7466 test ! -s conftest.err
7467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007468 ac_hi=$ac_mid; break
7469else
7470 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007471sed 's/^/| /' conftest.$ac_ext >&5
7472
Martin v. Löwiseba40652007-08-30 20:10:57 +00007473 ac_lo=`expr $ac_mid + 1`
7474 if test $ac_lo -le $ac_mid; then
7475 ac_lo= ac_hi=
7476 break
7477 fi
7478 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007480
7481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007482 done
7483else
7484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007485sed 's/^/| /' conftest.$ac_ext >&5
7486
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007488/* confdefs.h. */
7489_ACEOF
7490cat confdefs.h >>conftest.$ac_ext
7491cat >>conftest.$ac_ext <<_ACEOF
7492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007493$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007494 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007495int
7496main ()
7497{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007498static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007499test_array [0] = 0
7500
7501 ;
7502 return 0;
7503}
7504_ACEOF
7505rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007506if { (ac_try="$ac_compile"
7507case "(($ac_try" in
7508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7509 *) ac_try_echo=$ac_try;;
7510esac
7511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007514 grep -v '^ *+' conftest.er1 >conftest.err
7515 rm -f conftest.er1
7516 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007518 (exit $ac_status); } && {
7519 test -z "$ac_c_werror_flag" ||
7520 test ! -s conftest.err
7521 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 ac_hi=-1 ac_mid=-1
7523 while :; do
7524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007525/* confdefs.h. */
7526_ACEOF
7527cat confdefs.h >>conftest.$ac_ext
7528cat >>conftest.$ac_ext <<_ACEOF
7529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007530$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007531 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007532int
7533main ()
7534{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007536test_array [0] = 0
7537
7538 ;
7539 return 0;
7540}
7541_ACEOF
7542rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007543if { (ac_try="$ac_compile"
7544case "(($ac_try" in
7545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7546 *) ac_try_echo=$ac_try;;
7547esac
7548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007551 grep -v '^ *+' conftest.er1 >conftest.err
7552 rm -f conftest.er1
7553 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007555 (exit $ac_status); } && {
7556 test -z "$ac_c_werror_flag" ||
7557 test ! -s conftest.err
7558 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007559 ac_lo=$ac_mid; break
7560else
7561 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007562sed 's/^/| /' conftest.$ac_ext >&5
7563
Martin v. Löwiseba40652007-08-30 20:10:57 +00007564 ac_hi=`expr '(' $ac_mid ')' - 1`
7565 if test $ac_mid -le $ac_hi; then
7566 ac_lo= ac_hi=
7567 break
7568 fi
7569 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007571
7572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007573 done
7574else
7575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007576sed 's/^/| /' conftest.$ac_ext >&5
7577
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007580
7581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007583
7584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007585# Binary search between lo and hi bounds.
7586while test "x$ac_lo" != "x$ac_hi"; do
7587 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7588 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007589/* confdefs.h. */
7590_ACEOF
7591cat confdefs.h >>conftest.$ac_ext
7592cat >>conftest.$ac_ext <<_ACEOF
7593/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007594$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007600test_array [0] = 0
7601
7602 ;
7603 return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607if { (ac_try="$ac_compile"
7608case "(($ac_try" in
7609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7610 *) ac_try_echo=$ac_try;;
7611esac
7612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007615 grep -v '^ *+' conftest.er1 >conftest.err
7616 rm -f conftest.er1
7617 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007619 (exit $ac_status); } && {
7620 test -z "$ac_c_werror_flag" ||
7621 test ! -s conftest.err
7622 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007623 ac_hi=$ac_mid
7624else
7625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007626sed 's/^/| /' conftest.$ac_ext >&5
7627
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007630
7631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007632done
7633case $ac_lo in
7634?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007635'') if test "$ac_cv_type_long" = yes; then
7636 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007637See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007638echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007639See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640 { (exit 77); exit 77; }; }
7641 else
7642 ac_cv_sizeof_long=0
7643 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007644esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007645else
Martin v. Löwis11437992002-04-12 09:54:03 +00007646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007647/* confdefs.h. */
7648_ACEOF
7649cat confdefs.h >>conftest.$ac_ext
7650cat >>conftest.$ac_ext <<_ACEOF
7651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007652$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653 typedef long ac__type_sizeof_;
7654static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7655static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007656#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007657#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007658int
7659main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007660{
Martin v. Löwis11437992002-04-12 09:54:03 +00007661
7662 FILE *f = fopen ("conftest.val", "w");
7663 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007664 return 1;
7665 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007666 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007667 long int i = longval ();
7668 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7669 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 fprintf (f, "%ld\n", i);
7671 }
7672 else
7673 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007674 unsigned long int i = ulongval ();
7675 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7676 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007677 fprintf (f, "%lu\n", i);
7678 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007679 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007680
7681 ;
7682 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007683}
Martin v. Löwis11437992002-04-12 09:54:03 +00007684_ACEOF
7685rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686if { (ac_try="$ac_link"
7687case "(($ac_try" in
7688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7689 *) ac_try_echo=$ac_try;;
7690esac
7691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7692 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007693 ac_status=$?
7694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7695 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007696 { (case "(($ac_try" in
7697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7698 *) ac_try_echo=$ac_try;;
7699esac
7700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7701 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); }; }; then
7705 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007706else
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 echo "$as_me: program exited with status $ac_status" >&5
7708echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007709sed 's/^/| /' conftest.$ac_ext >&5
7710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007712if test "$ac_cv_type_long" = yes; then
7713 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007714See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007715echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007716See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717 { (exit 77); exit 77; }; }
7718 else
7719 ac_cv_sizeof_long=0
7720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722rm -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 +00007723fi
7724rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007725fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7727echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7728
7729
7730
Martin v. Löwis11437992002-04-12 09:54:03 +00007731cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007732#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007733_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007734
7735
Martin v. Löwiseba40652007-08-30 20:10:57 +00007736{ echo "$as_me:$LINENO: checking for void *" >&5
7737echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007738if test "${ac_cv_type_void_p+set}" = set; then
7739 echo $ECHO_N "(cached) $ECHO_C" >&6
7740else
7741 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007742/* confdefs.h. */
7743_ACEOF
7744cat confdefs.h >>conftest.$ac_ext
7745cat >>conftest.$ac_ext <<_ACEOF
7746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007747$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007749int
7750main ()
7751{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007753 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007754if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 return 0;
7756 ;
7757 return 0;
7758}
7759_ACEOF
7760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007761if { (ac_try="$ac_compile"
7762case "(($ac_try" in
7763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7764 *) ac_try_echo=$ac_try;;
7765esac
7766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007768 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007769 grep -v '^ *+' conftest.er1 >conftest.err
7770 rm -f conftest.er1
7771 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007773 (exit $ac_status); } && {
7774 test -z "$ac_c_werror_flag" ||
7775 test ! -s conftest.err
7776 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 ac_cv_type_void_p=yes
7778else
7779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007780sed 's/^/| /' conftest.$ac_ext >&5
7781
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007783fi
Brett Cannon19fab762007-06-02 03:02:29 +00007784
Martin v. Löwiseba40652007-08-30 20:10:57 +00007785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7786fi
7787{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7788echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7789
7790# The cast to long int works around a bug in the HP C Compiler
7791# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7792# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7793# This bug is HP SR number 8606223364.
7794{ echo "$as_me:$LINENO: checking size of void *" >&5
7795echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007796if test "${ac_cv_sizeof_void_p+set}" = set; then
7797 echo $ECHO_N "(cached) $ECHO_C" >&6
7798else
Martin v. Löwis11437992002-04-12 09:54:03 +00007799 if test "$cross_compiling" = yes; then
7800 # Depending upon the size, compute the lo and hi bounds.
7801cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007802/* confdefs.h. */
7803_ACEOF
7804cat confdefs.h >>conftest.$ac_ext
7805cat >>conftest.$ac_ext <<_ACEOF
7806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007808 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007809int
7810main ()
7811{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007813test_array [0] = 0
7814
7815 ;
7816 return 0;
7817}
7818_ACEOF
7819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007820if { (ac_try="$ac_compile"
7821case "(($ac_try" in
7822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7823 *) ac_try_echo=$ac_try;;
7824esac
7825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007828 grep -v '^ *+' conftest.er1 >conftest.err
7829 rm -f conftest.er1
7830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832 (exit $ac_status); } && {
7833 test -z "$ac_c_werror_flag" ||
7834 test ! -s conftest.err
7835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007836 ac_lo=0 ac_mid=0
7837 while :; do
7838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007839/* confdefs.h. */
7840_ACEOF
7841cat confdefs.h >>conftest.$ac_ext
7842cat >>conftest.$ac_ext <<_ACEOF
7843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007844$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007845 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007846int
7847main ()
7848{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007849static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007850test_array [0] = 0
7851
7852 ;
7853 return 0;
7854}
7855_ACEOF
7856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007857if { (ac_try="$ac_compile"
7858case "(($ac_try" in
7859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7860 *) ac_try_echo=$ac_try;;
7861esac
7862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007865 grep -v '^ *+' conftest.er1 >conftest.err
7866 rm -f conftest.er1
7867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007869 (exit $ac_status); } && {
7870 test -z "$ac_c_werror_flag" ||
7871 test ! -s conftest.err
7872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007873 ac_hi=$ac_mid; break
7874else
7875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007876sed 's/^/| /' conftest.$ac_ext >&5
7877
Martin v. Löwiseba40652007-08-30 20:10:57 +00007878 ac_lo=`expr $ac_mid + 1`
7879 if test $ac_lo -le $ac_mid; then
7880 ac_lo= ac_hi=
7881 break
7882 fi
7883 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885
7886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007887 done
7888else
7889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007890sed 's/^/| /' conftest.$ac_ext >&5
7891
Martin v. Löwiseba40652007-08-30 20:10:57 +00007892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007893/* confdefs.h. */
7894_ACEOF
7895cat confdefs.h >>conftest.$ac_ext
7896cat >>conftest.$ac_ext <<_ACEOF
7897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007898$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007899 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007900int
7901main ()
7902{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007904test_array [0] = 0
7905
7906 ;
7907 return 0;
7908}
7909_ACEOF
7910rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911if { (ac_try="$ac_compile"
7912case "(($ac_try" in
7913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7914 *) ac_try_echo=$ac_try;;
7915esac
7916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007919 grep -v '^ *+' conftest.er1 >conftest.err
7920 rm -f conftest.er1
7921 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007923 (exit $ac_status); } && {
7924 test -z "$ac_c_werror_flag" ||
7925 test ! -s conftest.err
7926 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007927 ac_hi=-1 ac_mid=-1
7928 while :; do
7929 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007930/* confdefs.h. */
7931_ACEOF
7932cat confdefs.h >>conftest.$ac_ext
7933cat >>conftest.$ac_ext <<_ACEOF
7934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007935$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007936 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007941test_array [0] = 0
7942
7943 ;
7944 return 0;
7945}
7946_ACEOF
7947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948if { (ac_try="$ac_compile"
7949case "(($ac_try" in
7950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7951 *) ac_try_echo=$ac_try;;
7952esac
7953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007956 grep -v '^ *+' conftest.er1 >conftest.err
7957 rm -f conftest.er1
7958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007960 (exit $ac_status); } && {
7961 test -z "$ac_c_werror_flag" ||
7962 test ! -s conftest.err
7963 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007964 ac_lo=$ac_mid; break
7965else
7966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007967sed 's/^/| /' conftest.$ac_ext >&5
7968
Martin v. Löwiseba40652007-08-30 20:10:57 +00007969 ac_hi=`expr '(' $ac_mid ')' - 1`
7970 if test $ac_mid -le $ac_hi; then
7971 ac_lo= ac_hi=
7972 break
7973 fi
7974 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976
7977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 done
7979else
7980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007981sed 's/^/| /' conftest.$ac_ext >&5
7982
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007985
7986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007988
7989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007990# Binary search between lo and hi bounds.
7991while test "x$ac_lo" != "x$ac_hi"; do
7992 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007994/* confdefs.h. */
7995_ACEOF
7996cat confdefs.h >>conftest.$ac_ext
7997cat >>conftest.$ac_ext <<_ACEOF
7998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007999$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008001int
8002main ()
8003{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008004static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008005test_array [0] = 0
8006
8007 ;
8008 return 0;
8009}
8010_ACEOF
8011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008012if { (ac_try="$ac_compile"
8013case "(($ac_try" in
8014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8015 *) ac_try_echo=$ac_try;;
8016esac
8017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008020 grep -v '^ *+' conftest.er1 >conftest.err
8021 rm -f conftest.er1
8022 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008024 (exit $ac_status); } && {
8025 test -z "$ac_c_werror_flag" ||
8026 test ! -s conftest.err
8027 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 ac_hi=$ac_mid
8029else
8030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008031sed 's/^/| /' conftest.$ac_ext >&5
8032
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035
8036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008037done
8038case $ac_lo in
8039?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008040'') if test "$ac_cv_type_void_p" = yes; then
8041 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008042See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008043echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008044See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008045 { (exit 77); exit 77; }; }
8046 else
8047 ac_cv_sizeof_void_p=0
8048 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008049esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008050else
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058 typedef void * ac__type_sizeof_;
8059static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8060static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008061#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008062#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008063int
8064main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008065{
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
8067 FILE *f = fopen ("conftest.val", "w");
8068 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008069 return 1;
8070 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008072 long int i = longval ();
8073 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8074 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 fprintf (f, "%ld\n", i);
8076 }
8077 else
8078 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008079 unsigned long int i = ulongval ();
8080 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8081 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082 fprintf (f, "%lu\n", i);
8083 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008084 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008085
8086 ;
8087 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008088}
Martin v. Löwis11437992002-04-12 09:54:03 +00008089_ACEOF
8090rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091if { (ac_try="$ac_link"
8092case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
8096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8097 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008098 ac_status=$?
8099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008101 { (case "(($ac_try" in
8102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8103 *) ac_try_echo=$ac_try;;
8104esac
8105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8106 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008107 ac_status=$?
8108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8109 (exit $ac_status); }; }; then
8110 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008111else
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 echo "$as_me: program exited with status $ac_status" >&5
8113echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008114sed 's/^/| /' conftest.$ac_ext >&5
8115
Martin v. Löwis11437992002-04-12 09:54:03 +00008116( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008117if test "$ac_cv_type_void_p" = yes; then
8118 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008119See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008120echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008121See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122 { (exit 77); exit 77; }; }
8123 else
8124 ac_cv_sizeof_void_p=0
8125 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008127rm -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 +00008128fi
8129rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008131{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8132echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8133
8134
8135
Martin v. Löwis11437992002-04-12 09:54:03 +00008136cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008137#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008138_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008139
8140
Martin v. Löwiseba40652007-08-30 20:10:57 +00008141{ echo "$as_me:$LINENO: checking for short" >&5
8142echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008143if test "${ac_cv_type_short+set}" = set; then
8144 echo $ECHO_N "(cached) $ECHO_C" >&6
8145else
8146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008147/* confdefs.h. */
8148_ACEOF
8149cat confdefs.h >>conftest.$ac_ext
8150cat >>conftest.$ac_ext <<_ACEOF
8151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008152$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008153typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008154int
8155main ()
8156{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008159if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 return 0;
8161 ;
8162 return 0;
8163}
8164_ACEOF
8165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008166if { (ac_try="$ac_compile"
8167case "(($ac_try" in
8168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8169 *) ac_try_echo=$ac_try;;
8170esac
8171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008174 grep -v '^ *+' conftest.er1 >conftest.err
8175 rm -f conftest.er1
8176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008178 (exit $ac_status); } && {
8179 test -z "$ac_c_werror_flag" ||
8180 test ! -s conftest.err
8181 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008182 ac_cv_type_short=yes
8183else
8184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008185sed 's/^/| /' conftest.$ac_ext >&5
8186
Martin v. Löwiseba40652007-08-30 20:10:57 +00008187 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008188fi
Brett Cannon19fab762007-06-02 03:02:29 +00008189
Martin v. Löwiseba40652007-08-30 20:10:57 +00008190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8191fi
8192{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8193echo "${ECHO_T}$ac_cv_type_short" >&6; }
8194
8195# The cast to long int works around a bug in the HP C Compiler
8196# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8197# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8198# This bug is HP SR number 8606223364.
8199{ echo "$as_me:$LINENO: checking size of short" >&5
8200echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008201if test "${ac_cv_sizeof_short+set}" = set; then
8202 echo $ECHO_N "(cached) $ECHO_C" >&6
8203else
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 if test "$cross_compiling" = yes; then
8205 # Depending upon the size, compute the lo and hi bounds.
8206cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008207/* confdefs.h. */
8208_ACEOF
8209cat confdefs.h >>conftest.$ac_ext
8210cat >>conftest.$ac_ext <<_ACEOF
8211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008213 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008214int
8215main ()
8216{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008218test_array [0] = 0
8219
8220 ;
8221 return 0;
8222}
8223_ACEOF
8224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008225if { (ac_try="$ac_compile"
8226case "(($ac_try" in
8227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8228 *) ac_try_echo=$ac_try;;
8229esac
8230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008233 grep -v '^ *+' conftest.er1 >conftest.err
8234 rm -f conftest.er1
8235 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008237 (exit $ac_status); } && {
8238 test -z "$ac_c_werror_flag" ||
8239 test ! -s conftest.err
8240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008241 ac_lo=0 ac_mid=0
8242 while :; do
8243 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008244/* confdefs.h. */
8245_ACEOF
8246cat confdefs.h >>conftest.$ac_ext
8247cat >>conftest.$ac_ext <<_ACEOF
8248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008250 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008251int
8252main ()
8253{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008255test_array [0] = 0
8256
8257 ;
8258 return 0;
8259}
8260_ACEOF
8261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008262if { (ac_try="$ac_compile"
8263case "(($ac_try" in
8264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8265 *) ac_try_echo=$ac_try;;
8266esac
8267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008270 grep -v '^ *+' conftest.er1 >conftest.err
8271 rm -f conftest.er1
8272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008274 (exit $ac_status); } && {
8275 test -z "$ac_c_werror_flag" ||
8276 test ! -s conftest.err
8277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008278 ac_hi=$ac_mid; break
8279else
8280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008281sed 's/^/| /' conftest.$ac_ext >&5
8282
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283 ac_lo=`expr $ac_mid + 1`
8284 if test $ac_lo -le $ac_mid; then
8285 ac_lo= ac_hi=
8286 break
8287 fi
8288 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008290
8291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008292 done
8293else
8294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008295sed 's/^/| /' conftest.$ac_ext >&5
8296
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008298/* confdefs.h. */
8299_ACEOF
8300cat confdefs.h >>conftest.$ac_ext
8301cat >>conftest.$ac_ext <<_ACEOF
8302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008303$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008304 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008305int
8306main ()
8307{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008309test_array [0] = 0
8310
8311 ;
8312 return 0;
8313}
8314_ACEOF
8315rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008316if { (ac_try="$ac_compile"
8317case "(($ac_try" in
8318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8319 *) ac_try_echo=$ac_try;;
8320esac
8321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008324 grep -v '^ *+' conftest.er1 >conftest.err
8325 rm -f conftest.er1
8326 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008328 (exit $ac_status); } && {
8329 test -z "$ac_c_werror_flag" ||
8330 test ! -s conftest.err
8331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ac_hi=-1 ac_mid=-1
8333 while :; do
8334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008335/* confdefs.h. */
8336_ACEOF
8337cat confdefs.h >>conftest.$ac_ext
8338cat >>conftest.$ac_ext <<_ACEOF
8339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008340$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008341 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008342int
8343main ()
8344{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008346test_array [0] = 0
8347
8348 ;
8349 return 0;
8350}
8351_ACEOF
8352rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008353if { (ac_try="$ac_compile"
8354case "(($ac_try" in
8355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8356 *) ac_try_echo=$ac_try;;
8357esac
8358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8359 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008361 grep -v '^ *+' conftest.er1 >conftest.err
8362 rm -f conftest.er1
8363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008365 (exit $ac_status); } && {
8366 test -z "$ac_c_werror_flag" ||
8367 test ! -s conftest.err
8368 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008369 ac_lo=$ac_mid; break
8370else
8371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008372sed 's/^/| /' conftest.$ac_ext >&5
8373
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374 ac_hi=`expr '(' $ac_mid ')' - 1`
8375 if test $ac_mid -le $ac_hi; then
8376 ac_lo= ac_hi=
8377 break
8378 fi
8379 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381
8382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 done
8384else
8385 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008386sed 's/^/| /' conftest.$ac_ext >&5
8387
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008390
8391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008393
8394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008395# Binary search between lo and hi bounds.
8396while test "x$ac_lo" != "x$ac_hi"; do
8397 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008399/* confdefs.h. */
8400_ACEOF
8401cat confdefs.h >>conftest.$ac_ext
8402cat >>conftest.$ac_ext <<_ACEOF
8403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008404$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008406int
8407main ()
8408{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008410test_array [0] = 0
8411
8412 ;
8413 return 0;
8414}
8415_ACEOF
8416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008417if { (ac_try="$ac_compile"
8418case "(($ac_try" in
8419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8420 *) ac_try_echo=$ac_try;;
8421esac
8422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008425 grep -v '^ *+' conftest.er1 >conftest.err
8426 rm -f conftest.er1
8427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008429 (exit $ac_status); } && {
8430 test -z "$ac_c_werror_flag" ||
8431 test ! -s conftest.err
8432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008433 ac_hi=$ac_mid
8434else
8435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008436sed 's/^/| /' conftest.$ac_ext >&5
8437
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440
8441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008442done
8443case $ac_lo in
8444?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008445'') if test "$ac_cv_type_short" = yes; then
8446 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008447See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008448echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008449See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450 { (exit 77); exit 77; }; }
8451 else
8452 ac_cv_sizeof_short=0
8453 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008454esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008455else
Martin v. Löwis11437992002-04-12 09:54:03 +00008456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008457/* confdefs.h. */
8458_ACEOF
8459cat confdefs.h >>conftest.$ac_ext
8460cat >>conftest.$ac_ext <<_ACEOF
8461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008462$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008463 typedef short ac__type_sizeof_;
8464static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8465static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008466#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008467#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008468int
8469main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008470{
Martin v. Löwis11437992002-04-12 09:54:03 +00008471
8472 FILE *f = fopen ("conftest.val", "w");
8473 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008474 return 1;
8475 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008476 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008477 long int i = longval ();
8478 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8479 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 fprintf (f, "%ld\n", i);
8481 }
8482 else
8483 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008484 unsigned long int i = ulongval ();
8485 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8486 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 fprintf (f, "%lu\n", i);
8488 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008489 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008490
8491 ;
8492 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008493}
Martin v. Löwis11437992002-04-12 09:54:03 +00008494_ACEOF
8495rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496if { (ac_try="$ac_link"
8497case "(($ac_try" in
8498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8499 *) ac_try_echo=$ac_try;;
8500esac
8501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8502 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 ac_status=$?
8504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8505 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008506 { (case "(($ac_try" in
8507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8508 *) ac_try_echo=$ac_try;;
8509esac
8510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8511 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 ac_status=$?
8513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8514 (exit $ac_status); }; }; then
8515 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008516else
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 echo "$as_me: program exited with status $ac_status" >&5
8518echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008522if test "$ac_cv_type_short" = yes; then
8523 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008524See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008525echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008526See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008527 { (exit 77); exit 77; }; }
8528 else
8529 ac_cv_sizeof_short=0
8530 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008531fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008532rm -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 +00008533fi
8534rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008536{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8537echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8538
8539
8540
Martin v. Löwis11437992002-04-12 09:54:03 +00008541cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544
8545
Martin v. Löwiseba40652007-08-30 20:10:57 +00008546{ echo "$as_me:$LINENO: checking for float" >&5
8547echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008548if test "${ac_cv_type_float+set}" = set; then
8549 echo $ECHO_N "(cached) $ECHO_C" >&6
8550else
8551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008558typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008559int
8560main ()
8561{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008564if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 return 0;
8566 ;
8567 return 0;
8568}
8569_ACEOF
8570rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008571if { (ac_try="$ac_compile"
8572case "(($ac_try" in
8573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8574 *) ac_try_echo=$ac_try;;
8575esac
8576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008579 grep -v '^ *+' conftest.er1 >conftest.err
8580 rm -f conftest.er1
8581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008583 (exit $ac_status); } && {
8584 test -z "$ac_c_werror_flag" ||
8585 test ! -s conftest.err
8586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 ac_cv_type_float=yes
8588else
8589 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008590sed 's/^/| /' conftest.$ac_ext >&5
8591
Martin v. Löwiseba40652007-08-30 20:10:57 +00008592 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008593fi
Brett Cannon19fab762007-06-02 03:02:29 +00008594
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8596fi
8597{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8598echo "${ECHO_T}$ac_cv_type_float" >&6; }
8599
8600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
8604{ echo "$as_me:$LINENO: checking size of float" >&5
8605echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008606if test "${ac_cv_sizeof_float+set}" = set; then
8607 echo $ECHO_N "(cached) $ECHO_C" >&6
8608else
Martin v. Löwis11437992002-04-12 09:54:03 +00008609 if test "$cross_compiling" = yes; then
8610 # Depending upon the size, compute the lo and hi bounds.
8611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008612/* confdefs.h. */
8613_ACEOF
8614cat confdefs.h >>conftest.$ac_ext
8615cat >>conftest.$ac_ext <<_ACEOF
8616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008617$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008618 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008619int
8620main ()
8621{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008623test_array [0] = 0
8624
8625 ;
8626 return 0;
8627}
8628_ACEOF
8629rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630if { (ac_try="$ac_compile"
8631case "(($ac_try" in
8632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8633 *) ac_try_echo=$ac_try;;
8634esac
8635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008638 grep -v '^ *+' conftest.er1 >conftest.err
8639 rm -f conftest.er1
8640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 (exit $ac_status); } && {
8643 test -z "$ac_c_werror_flag" ||
8644 test ! -s conftest.err
8645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008646 ac_lo=0 ac_mid=0
8647 while :; do
8648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008649/* confdefs.h. */
8650_ACEOF
8651cat confdefs.h >>conftest.$ac_ext
8652cat >>conftest.$ac_ext <<_ACEOF
8653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008654$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008655 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008656int
8657main ()
8658{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008659static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008660test_array [0] = 0
8661
8662 ;
8663 return 0;
8664}
8665_ACEOF
8666rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008667if { (ac_try="$ac_compile"
8668case "(($ac_try" in
8669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8670 *) ac_try_echo=$ac_try;;
8671esac
8672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8673 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008675 grep -v '^ *+' conftest.er1 >conftest.err
8676 rm -f conftest.er1
8677 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008679 (exit $ac_status); } && {
8680 test -z "$ac_c_werror_flag" ||
8681 test ! -s conftest.err
8682 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ac_hi=$ac_mid; break
8684else
8685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008686sed 's/^/| /' conftest.$ac_ext >&5
8687
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688 ac_lo=`expr $ac_mid + 1`
8689 if test $ac_lo -le $ac_mid; then
8690 ac_lo= ac_hi=
8691 break
8692 fi
8693 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008695
8696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008697 done
8698else
8699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008700sed 's/^/| /' conftest.$ac_ext >&5
8701
Martin v. Löwiseba40652007-08-30 20:10:57 +00008702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008703/* confdefs.h. */
8704_ACEOF
8705cat confdefs.h >>conftest.$ac_ext
8706cat >>conftest.$ac_ext <<_ACEOF
8707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008708$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008709 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008710int
8711main ()
8712{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008714test_array [0] = 0
8715
8716 ;
8717 return 0;
8718}
8719_ACEOF
8720rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008721if { (ac_try="$ac_compile"
8722case "(($ac_try" in
8723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8724 *) ac_try_echo=$ac_try;;
8725esac
8726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008729 grep -v '^ *+' conftest.er1 >conftest.err
8730 rm -f conftest.er1
8731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733 (exit $ac_status); } && {
8734 test -z "$ac_c_werror_flag" ||
8735 test ! -s conftest.err
8736 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 ac_hi=-1 ac_mid=-1
8738 while :; do
8739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* confdefs.h. */
8741_ACEOF
8742cat confdefs.h >>conftest.$ac_ext
8743cat >>conftest.$ac_ext <<_ACEOF
8744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008746 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008747int
8748main ()
8749{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008751test_array [0] = 0
8752
8753 ;
8754 return 0;
8755}
8756_ACEOF
8757rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008758if { (ac_try="$ac_compile"
8759case "(($ac_try" in
8760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8761 *) ac_try_echo=$ac_try;;
8762esac
8763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008766 grep -v '^ *+' conftest.er1 >conftest.err
8767 rm -f conftest.er1
8768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770 (exit $ac_status); } && {
8771 test -z "$ac_c_werror_flag" ||
8772 test ! -s conftest.err
8773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_lo=$ac_mid; break
8775else
8776 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008777sed 's/^/| /' conftest.$ac_ext >&5
8778
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779 ac_hi=`expr '(' $ac_mid ')' - 1`
8780 if test $ac_mid -le $ac_hi; then
8781 ac_lo= ac_hi=
8782 break
8783 fi
8784 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786
8787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 done
8789else
8790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008791sed 's/^/| /' conftest.$ac_ext >&5
8792
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798
8799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008800# Binary search between lo and hi bounds.
8801while test "x$ac_lo" != "x$ac_hi"; do
8802 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* confdefs.h. */
8805_ACEOF
8806cat confdefs.h >>conftest.$ac_ext
8807cat >>conftest.$ac_ext <<_ACEOF
8808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008811int
8812main ()
8813{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008814static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008815test_array [0] = 0
8816
8817 ;
8818 return 0;
8819}
8820_ACEOF
8821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008822if { (ac_try="$ac_compile"
8823case "(($ac_try" in
8824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8825 *) ac_try_echo=$ac_try;;
8826esac
8827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008830 grep -v '^ *+' conftest.er1 >conftest.err
8831 rm -f conftest.er1
8832 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008834 (exit $ac_status); } && {
8835 test -z "$ac_c_werror_flag" ||
8836 test ! -s conftest.err
8837 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 ac_hi=$ac_mid
8839else
8840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008841sed 's/^/| /' conftest.$ac_ext >&5
8842
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008845
8846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008847done
8848case $ac_lo in
8849?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008850'') if test "$ac_cv_type_float" = yes; then
8851 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008852See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008853echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008854See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008855 { (exit 77); exit 77; }; }
8856 else
8857 ac_cv_sizeof_float=0
8858 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008859esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008860else
Martin v. Löwis11437992002-04-12 09:54:03 +00008861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008862/* confdefs.h. */
8863_ACEOF
8864cat confdefs.h >>conftest.$ac_ext
8865cat >>conftest.$ac_ext <<_ACEOF
8866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008867$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868 typedef float ac__type_sizeof_;
8869static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8870static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008871#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008872#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008873int
8874main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008875{
Martin v. Löwis11437992002-04-12 09:54:03 +00008876
8877 FILE *f = fopen ("conftest.val", "w");
8878 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008879 return 1;
8880 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882 long int i = longval ();
8883 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8884 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 fprintf (f, "%ld\n", i);
8886 }
8887 else
8888 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008889 unsigned long int i = ulongval ();
8890 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8891 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 fprintf (f, "%lu\n", i);
8893 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008894 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008895
8896 ;
8897 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008898}
Martin v. Löwis11437992002-04-12 09:54:03 +00008899_ACEOF
8900rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901if { (ac_try="$ac_link"
8902case "(($ac_try" in
8903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8904 *) ac_try_echo=$ac_try;;
8905esac
8906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8907 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008908 ac_status=$?
8909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008911 { (case "(($ac_try" in
8912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8913 *) ac_try_echo=$ac_try;;
8914esac
8915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8916 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ac_status=$?
8918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8919 (exit $ac_status); }; }; then
8920 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008921else
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 echo "$as_me: program exited with status $ac_status" >&5
8923echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008924sed 's/^/| /' conftest.$ac_ext >&5
8925
Martin v. Löwis11437992002-04-12 09:54:03 +00008926( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008927if test "$ac_cv_type_float" = yes; then
8928 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008929See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008930echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00008931See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932 { (exit 77); exit 77; }; }
8933 else
8934 ac_cv_sizeof_float=0
8935 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008937rm -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 +00008938fi
8939rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008941{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8942echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
8943
8944
8945
Martin v. Löwis11437992002-04-12 09:54:03 +00008946cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008947#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008948_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008949
8950
Martin v. Löwiseba40652007-08-30 20:10:57 +00008951{ echo "$as_me:$LINENO: checking for double" >&5
8952echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008953if test "${ac_cv_type_double+set}" = set; then
8954 echo $ECHO_N "(cached) $ECHO_C" >&6
8955else
8956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008957/* confdefs.h. */
8958_ACEOF
8959cat confdefs.h >>conftest.$ac_ext
8960cat >>conftest.$ac_ext <<_ACEOF
8961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008962$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008964int
8965main ()
8966{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 return 0;
8971 ;
8972 return 0;
8973}
8974_ACEOF
8975rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008976if { (ac_try="$ac_compile"
8977case "(($ac_try" in
8978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8979 *) ac_try_echo=$ac_try;;
8980esac
8981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008984 grep -v '^ *+' conftest.er1 >conftest.err
8985 rm -f conftest.er1
8986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008988 (exit $ac_status); } && {
8989 test -z "$ac_c_werror_flag" ||
8990 test ! -s conftest.err
8991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ac_cv_type_double=yes
8993else
8994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008995sed 's/^/| /' conftest.$ac_ext >&5
8996
Martin v. Löwiseba40652007-08-30 20:10:57 +00008997 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008998fi
Brett Cannon19fab762007-06-02 03:02:29 +00008999
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9001fi
9002{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9003echo "${ECHO_T}$ac_cv_type_double" >&6; }
9004
9005# The cast to long int works around a bug in the HP C Compiler
9006# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9007# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9008# This bug is HP SR number 8606223364.
9009{ echo "$as_me:$LINENO: checking size of double" >&5
9010echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009011if test "${ac_cv_sizeof_double+set}" = set; then
9012 echo $ECHO_N "(cached) $ECHO_C" >&6
9013else
Martin v. Löwis11437992002-04-12 09:54:03 +00009014 if test "$cross_compiling" = yes; then
9015 # Depending upon the size, compute the lo and hi bounds.
9016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009017/* confdefs.h. */
9018_ACEOF
9019cat confdefs.h >>conftest.$ac_ext
9020cat >>conftest.$ac_ext <<_ACEOF
9021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009022$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009023 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009024int
9025main ()
9026{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009028test_array [0] = 0
9029
9030 ;
9031 return 0;
9032}
9033_ACEOF
9034rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009035if { (ac_try="$ac_compile"
9036case "(($ac_try" in
9037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9038 *) ac_try_echo=$ac_try;;
9039esac
9040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9041 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009042 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009043 grep -v '^ *+' conftest.er1 >conftest.err
9044 rm -f conftest.er1
9045 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009047 (exit $ac_status); } && {
9048 test -z "$ac_c_werror_flag" ||
9049 test ! -s conftest.err
9050 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009051 ac_lo=0 ac_mid=0
9052 while :; do
9053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* confdefs.h. */
9055_ACEOF
9056cat confdefs.h >>conftest.$ac_ext
9057cat >>conftest.$ac_ext <<_ACEOF
9058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009059$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009060 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009061int
9062main ()
9063{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009065test_array [0] = 0
9066
9067 ;
9068 return 0;
9069}
9070_ACEOF
9071rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072if { (ac_try="$ac_compile"
9073case "(($ac_try" in
9074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9075 *) ac_try_echo=$ac_try;;
9076esac
9077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009080 grep -v '^ *+' conftest.er1 >conftest.err
9081 rm -f conftest.er1
9082 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009084 (exit $ac_status); } && {
9085 test -z "$ac_c_werror_flag" ||
9086 test ! -s conftest.err
9087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009088 ac_hi=$ac_mid; break
9089else
9090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009091sed 's/^/| /' conftest.$ac_ext >&5
9092
Martin v. Löwiseba40652007-08-30 20:10:57 +00009093 ac_lo=`expr $ac_mid + 1`
9094 if test $ac_lo -le $ac_mid; then
9095 ac_lo= ac_hi=
9096 break
9097 fi
9098 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009100
9101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009102 done
9103else
9104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009105sed 's/^/| /' conftest.$ac_ext >&5
9106
Martin v. Löwiseba40652007-08-30 20:10:57 +00009107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009108/* confdefs.h. */
9109_ACEOF
9110cat confdefs.h >>conftest.$ac_ext
9111cat >>conftest.$ac_ext <<_ACEOF
9112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009113$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009114 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009115int
9116main ()
9117{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009119test_array [0] = 0
9120
9121 ;
9122 return 0;
9123}
9124_ACEOF
9125rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009126if { (ac_try="$ac_compile"
9127case "(($ac_try" in
9128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9129 *) ac_try_echo=$ac_try;;
9130esac
9131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9132 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009134 grep -v '^ *+' conftest.er1 >conftest.err
9135 rm -f conftest.er1
9136 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009138 (exit $ac_status); } && {
9139 test -z "$ac_c_werror_flag" ||
9140 test ! -s conftest.err
9141 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009142 ac_hi=-1 ac_mid=-1
9143 while :; do
9144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009145/* confdefs.h. */
9146_ACEOF
9147cat confdefs.h >>conftest.$ac_ext
9148cat >>conftest.$ac_ext <<_ACEOF
9149/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009150$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009151 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009152int
9153main ()
9154{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009156test_array [0] = 0
9157
9158 ;
9159 return 0;
9160}
9161_ACEOF
9162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009163if { (ac_try="$ac_compile"
9164case "(($ac_try" in
9165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9166 *) ac_try_echo=$ac_try;;
9167esac
9168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9169 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009171 grep -v '^ *+' conftest.er1 >conftest.err
9172 rm -f conftest.er1
9173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009175 (exit $ac_status); } && {
9176 test -z "$ac_c_werror_flag" ||
9177 test ! -s conftest.err
9178 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009179 ac_lo=$ac_mid; break
9180else
9181 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009182sed 's/^/| /' conftest.$ac_ext >&5
9183
Martin v. Löwiseba40652007-08-30 20:10:57 +00009184 ac_hi=`expr '(' $ac_mid ')' - 1`
9185 if test $ac_mid -le $ac_hi; then
9186 ac_lo= ac_hi=
9187 break
9188 fi
9189 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009191
9192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 done
9194else
9195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009196sed 's/^/| /' conftest.$ac_ext >&5
9197
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009200
9201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009203
9204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009205# Binary search between lo and hi bounds.
9206while test "x$ac_lo" != "x$ac_hi"; do
9207 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009209/* confdefs.h. */
9210_ACEOF
9211cat confdefs.h >>conftest.$ac_ext
9212cat >>conftest.$ac_ext <<_ACEOF
9213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009214$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009216int
9217main ()
9218{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009219static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009220test_array [0] = 0
9221
9222 ;
9223 return 0;
9224}
9225_ACEOF
9226rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227if { (ac_try="$ac_compile"
9228case "(($ac_try" in
9229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9230 *) ac_try_echo=$ac_try;;
9231esac
9232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9233 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009235 grep -v '^ *+' conftest.er1 >conftest.err
9236 rm -f conftest.er1
9237 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009239 (exit $ac_status); } && {
9240 test -z "$ac_c_werror_flag" ||
9241 test ! -s conftest.err
9242 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009243 ac_hi=$ac_mid
9244else
9245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009246sed 's/^/| /' conftest.$ac_ext >&5
9247
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009250
9251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009252done
9253case $ac_lo in
9254?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009255'') if test "$ac_cv_type_double" = yes; then
9256 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009257See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009259See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260 { (exit 77); exit 77; }; }
9261 else
9262 ac_cv_sizeof_double=0
9263 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009264esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009265else
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009267/* confdefs.h. */
9268_ACEOF
9269cat confdefs.h >>conftest.$ac_ext
9270cat >>conftest.$ac_ext <<_ACEOF
9271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009272$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273 typedef double ac__type_sizeof_;
9274static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9275static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009276#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009277#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009278int
9279main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009280{
Martin v. Löwis11437992002-04-12 09:54:03 +00009281
9282 FILE *f = fopen ("conftest.val", "w");
9283 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284 return 1;
9285 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009287 long int i = longval ();
9288 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9289 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 fprintf (f, "%ld\n", i);
9291 }
9292 else
9293 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009294 unsigned long int i = ulongval ();
9295 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9296 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009297 fprintf (f, "%lu\n", i);
9298 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009300
9301 ;
9302 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009303}
Martin v. Löwis11437992002-04-12 09:54:03 +00009304_ACEOF
9305rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306if { (ac_try="$ac_link"
9307case "(($ac_try" in
9308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9309 *) ac_try_echo=$ac_try;;
9310esac
9311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9312 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009313 ac_status=$?
9314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009316 { (case "(($ac_try" in
9317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9318 *) ac_try_echo=$ac_try;;
9319esac
9320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9321 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009322 ac_status=$?
9323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9324 (exit $ac_status); }; }; then
9325 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009326else
Martin v. Löwis11437992002-04-12 09:54:03 +00009327 echo "$as_me: program exited with status $ac_status" >&5
9328echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009329sed 's/^/| /' conftest.$ac_ext >&5
9330
Martin v. Löwis11437992002-04-12 09:54:03 +00009331( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009332if test "$ac_cv_type_double" = yes; then
9333 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009334See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009335echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009336See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009337 { (exit 77); exit 77; }; }
9338 else
9339 ac_cv_sizeof_double=0
9340 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009342rm -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 +00009343fi
9344rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9347echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9348
9349
9350
Martin v. Löwis11437992002-04-12 09:54:03 +00009351cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009352#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009353_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009354
9355
Martin v. Löwiseba40652007-08-30 20:10:57 +00009356{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9357echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009358if test "${ac_cv_type_fpos_t+set}" = set; then
9359 echo $ECHO_N "(cached) $ECHO_C" >&6
9360else
9361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009362/* confdefs.h. */
9363_ACEOF
9364cat confdefs.h >>conftest.$ac_ext
9365cat >>conftest.$ac_ext <<_ACEOF
9366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009368typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009369int
9370main ()
9371{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 return 0;
9376 ;
9377 return 0;
9378}
9379_ACEOF
9380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009381if { (ac_try="$ac_compile"
9382case "(($ac_try" in
9383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384 *) ac_try_echo=$ac_try;;
9385esac
9386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009389 grep -v '^ *+' conftest.er1 >conftest.err
9390 rm -f conftest.er1
9391 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009393 (exit $ac_status); } && {
9394 test -z "$ac_c_werror_flag" ||
9395 test ! -s conftest.err
9396 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009397 ac_cv_type_fpos_t=yes
9398else
9399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009400sed 's/^/| /' conftest.$ac_ext >&5
9401
Martin v. Löwiseba40652007-08-30 20:10:57 +00009402 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009403fi
Brett Cannon19fab762007-06-02 03:02:29 +00009404
Martin v. Löwiseba40652007-08-30 20:10:57 +00009405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9406fi
9407{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9408echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9409
9410# The cast to long int works around a bug in the HP C Compiler
9411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9413# This bug is HP SR number 8606223364.
9414{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9415echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009416if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9417 echo $ECHO_N "(cached) $ECHO_C" >&6
9418else
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 if test "$cross_compiling" = yes; then
9420 # Depending upon the size, compute the lo and hi bounds.
9421cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009422/* confdefs.h. */
9423_ACEOF
9424cat confdefs.h >>conftest.$ac_ext
9425cat >>conftest.$ac_ext <<_ACEOF
9426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009428 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009429int
9430main ()
9431{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009433test_array [0] = 0
9434
9435 ;
9436 return 0;
9437}
9438_ACEOF
9439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009440if { (ac_try="$ac_compile"
9441case "(($ac_try" in
9442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9443 *) ac_try_echo=$ac_try;;
9444esac
9445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009448 grep -v '^ *+' conftest.er1 >conftest.err
9449 rm -f conftest.er1
9450 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009452 (exit $ac_status); } && {
9453 test -z "$ac_c_werror_flag" ||
9454 test ! -s conftest.err
9455 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 ac_lo=0 ac_mid=0
9457 while :; do
9458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009459/* confdefs.h. */
9460_ACEOF
9461cat confdefs.h >>conftest.$ac_ext
9462cat >>conftest.$ac_ext <<_ACEOF
9463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009464$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009465 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009466int
9467main ()
9468{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009469static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009470test_array [0] = 0
9471
9472 ;
9473 return 0;
9474}
9475_ACEOF
9476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009477if { (ac_try="$ac_compile"
9478case "(($ac_try" in
9479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9480 *) ac_try_echo=$ac_try;;
9481esac
9482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009485 grep -v '^ *+' conftest.er1 >conftest.err
9486 rm -f conftest.er1
9487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009489 (exit $ac_status); } && {
9490 test -z "$ac_c_werror_flag" ||
9491 test ! -s conftest.err
9492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ac_hi=$ac_mid; break
9494else
9495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009496sed 's/^/| /' conftest.$ac_ext >&5
9497
Martin v. Löwiseba40652007-08-30 20:10:57 +00009498 ac_lo=`expr $ac_mid + 1`
9499 if test $ac_lo -le $ac_mid; then
9500 ac_lo= ac_hi=
9501 break
9502 fi
9503 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009505
9506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 done
9508else
9509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009510sed 's/^/| /' conftest.$ac_ext >&5
9511
Martin v. Löwiseba40652007-08-30 20:10:57 +00009512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* confdefs.h. */
9514_ACEOF
9515cat confdefs.h >>conftest.$ac_ext
9516cat >>conftest.$ac_ext <<_ACEOF
9517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009518$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009519 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009520int
9521main ()
9522{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009524test_array [0] = 0
9525
9526 ;
9527 return 0;
9528}
9529_ACEOF
9530rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009531if { (ac_try="$ac_compile"
9532case "(($ac_try" in
9533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9534 *) ac_try_echo=$ac_try;;
9535esac
9536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9537 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009539 grep -v '^ *+' conftest.er1 >conftest.err
9540 rm -f conftest.er1
9541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009543 (exit $ac_status); } && {
9544 test -z "$ac_c_werror_flag" ||
9545 test ! -s conftest.err
9546 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_hi=-1 ac_mid=-1
9548 while :; do
9549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009550/* confdefs.h. */
9551_ACEOF
9552cat confdefs.h >>conftest.$ac_ext
9553cat >>conftest.$ac_ext <<_ACEOF
9554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009555$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009556 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009561test_array [0] = 0
9562
9563 ;
9564 return 0;
9565}
9566_ACEOF
9567rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009568if { (ac_try="$ac_compile"
9569case "(($ac_try" in
9570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9571 *) ac_try_echo=$ac_try;;
9572esac
9573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9574 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009575 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009576 grep -v '^ *+' conftest.er1 >conftest.err
9577 rm -f conftest.er1
9578 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009580 (exit $ac_status); } && {
9581 test -z "$ac_c_werror_flag" ||
9582 test ! -s conftest.err
9583 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 ac_lo=$ac_mid; break
9585else
9586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009587sed 's/^/| /' conftest.$ac_ext >&5
9588
Martin v. Löwiseba40652007-08-30 20:10:57 +00009589 ac_hi=`expr '(' $ac_mid ')' - 1`
9590 if test $ac_mid -le $ac_hi; then
9591 ac_lo= ac_hi=
9592 break
9593 fi
9594 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596
9597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 done
9599else
9600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009601sed 's/^/| /' conftest.$ac_ext >&5
9602
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009605
9606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608
9609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009610# Binary search between lo and hi bounds.
9611while test "x$ac_lo" != "x$ac_hi"; do
9612 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009614/* confdefs.h. */
9615_ACEOF
9616cat confdefs.h >>conftest.$ac_ext
9617cat >>conftest.$ac_ext <<_ACEOF
9618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009621int
9622main ()
9623{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009625test_array [0] = 0
9626
9627 ;
9628 return 0;
9629}
9630_ACEOF
9631rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009632if { (ac_try="$ac_compile"
9633case "(($ac_try" in
9634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9635 *) ac_try_echo=$ac_try;;
9636esac
9637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9638 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009640 grep -v '^ *+' conftest.er1 >conftest.err
9641 rm -f conftest.er1
9642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009644 (exit $ac_status); } && {
9645 test -z "$ac_c_werror_flag" ||
9646 test ! -s conftest.err
9647 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_hi=$ac_mid
9649else
9650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009651sed 's/^/| /' conftest.$ac_ext >&5
9652
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009654fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655
9656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009657done
9658case $ac_lo in
9659?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009660'') if test "$ac_cv_type_fpos_t" = yes; then
9661 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009662See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009663echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009664See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665 { (exit 77); exit 77; }; }
9666 else
9667 ac_cv_sizeof_fpos_t=0
9668 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009669esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009670else
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009672/* confdefs.h. */
9673_ACEOF
9674cat confdefs.h >>conftest.$ac_ext
9675cat >>conftest.$ac_ext <<_ACEOF
9676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009678 typedef fpos_t ac__type_sizeof_;
9679static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9680static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009681#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009682#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009685{
Martin v. Löwis11437992002-04-12 09:54:03 +00009686
9687 FILE *f = fopen ("conftest.val", "w");
9688 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009689 return 1;
9690 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009691 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009692 long int i = longval ();
9693 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9694 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 fprintf (f, "%ld\n", i);
9696 }
9697 else
9698 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009699 unsigned long int i = ulongval ();
9700 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9701 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009702 fprintf (f, "%lu\n", i);
9703 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009704 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009705
9706 ;
9707 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009708}
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
9710rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711if { (ac_try="$ac_link"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
9716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9717 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009718 ac_status=$?
9719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009721 { (case "(($ac_try" in
9722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9723 *) ac_try_echo=$ac_try;;
9724esac
9725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9726 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_status=$?
9728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9729 (exit $ac_status); }; }; then
9730 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 echo "$as_me: program exited with status $ac_status" >&5
9733echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009734sed 's/^/| /' conftest.$ac_ext >&5
9735
Martin v. Löwis11437992002-04-12 09:54:03 +00009736( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737if test "$ac_cv_type_fpos_t" = yes; then
9738 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009739See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009740echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009741See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009742 { (exit 77); exit 77; }; }
9743 else
9744 ac_cv_sizeof_fpos_t=0
9745 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009747rm -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 +00009748fi
9749rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009751{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9752echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9753
9754
9755
Martin v. Löwis11437992002-04-12 09:54:03 +00009756cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009757#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009758_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009759
Michael W. Hudson54241132001-12-07 15:38:26 +00009760
Martin v. Löwiseba40652007-08-30 20:10:57 +00009761{ echo "$as_me:$LINENO: checking for size_t" >&5
9762echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009763if test "${ac_cv_type_size_t+set}" = set; then
9764 echo $ECHO_N "(cached) $ECHO_C" >&6
9765else
9766 cat >conftest.$ac_ext <<_ACEOF
9767/* confdefs.h. */
9768_ACEOF
9769cat confdefs.h >>conftest.$ac_ext
9770cat >>conftest.$ac_ext <<_ACEOF
9771/* end confdefs.h. */
9772$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009774int
9775main ()
9776{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009778 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009779if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009780 return 0;
9781 ;
9782 return 0;
9783}
9784_ACEOF
9785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009786if { (ac_try="$ac_compile"
9787case "(($ac_try" in
9788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9789 *) ac_try_echo=$ac_try;;
9790esac
9791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009793 ac_status=$?
9794 grep -v '^ *+' conftest.er1 >conftest.err
9795 rm -f conftest.er1
9796 cat conftest.err >&5
9797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009798 (exit $ac_status); } && {
9799 test -z "$ac_c_werror_flag" ||
9800 test ! -s conftest.err
9801 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009802 ac_cv_type_size_t=yes
9803else
9804 echo "$as_me: failed program was:" >&5
9805sed 's/^/| /' conftest.$ac_ext >&5
9806
Martin v. Löwiseba40652007-08-30 20:10:57 +00009807 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009808fi
Brett Cannon19fab762007-06-02 03:02:29 +00009809
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9811fi
9812{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9813echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
9814
9815# The cast to long int works around a bug in the HP C Compiler
9816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9818# This bug is HP SR number 8606223364.
9819{ echo "$as_me:$LINENO: checking size of size_t" >&5
9820echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009821if test "${ac_cv_sizeof_size_t+set}" = set; then
9822 echo $ECHO_N "(cached) $ECHO_C" >&6
9823else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009824 if test "$cross_compiling" = yes; then
9825 # Depending upon the size, compute the lo and hi bounds.
9826cat >conftest.$ac_ext <<_ACEOF
9827/* confdefs.h. */
9828_ACEOF
9829cat confdefs.h >>conftest.$ac_ext
9830cat >>conftest.$ac_ext <<_ACEOF
9831/* end confdefs.h. */
9832$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009833 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009834int
9835main ()
9836{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009838test_array [0] = 0
9839
9840 ;
9841 return 0;
9842}
9843_ACEOF
9844rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009845if { (ac_try="$ac_compile"
9846case "(($ac_try" in
9847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9848 *) ac_try_echo=$ac_try;;
9849esac
9850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009852 ac_status=$?
9853 grep -v '^ *+' conftest.er1 >conftest.err
9854 rm -f conftest.er1
9855 cat conftest.err >&5
9856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009857 (exit $ac_status); } && {
9858 test -z "$ac_c_werror_flag" ||
9859 test ! -s conftest.err
9860 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009861 ac_lo=0 ac_mid=0
9862 while :; do
9863 cat >conftest.$ac_ext <<_ACEOF
9864/* confdefs.h. */
9865_ACEOF
9866cat confdefs.h >>conftest.$ac_ext
9867cat >>conftest.$ac_ext <<_ACEOF
9868/* end confdefs.h. */
9869$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009870 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009871int
9872main ()
9873{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009875test_array [0] = 0
9876
9877 ;
9878 return 0;
9879}
9880_ACEOF
9881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009882if { (ac_try="$ac_compile"
9883case "(($ac_try" in
9884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9885 *) ac_try_echo=$ac_try;;
9886esac
9887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009889 ac_status=$?
9890 grep -v '^ *+' conftest.er1 >conftest.err
9891 rm -f conftest.er1
9892 cat conftest.err >&5
9893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009894 (exit $ac_status); } && {
9895 test -z "$ac_c_werror_flag" ||
9896 test ! -s conftest.err
9897 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009898 ac_hi=$ac_mid; break
9899else
9900 echo "$as_me: failed program was:" >&5
9901sed 's/^/| /' conftest.$ac_ext >&5
9902
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903 ac_lo=`expr $ac_mid + 1`
9904 if test $ac_lo -le $ac_mid; then
9905 ac_lo= ac_hi=
9906 break
9907 fi
9908 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910
9911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009912 done
9913else
9914 echo "$as_me: failed program was:" >&5
9915sed 's/^/| /' conftest.$ac_ext >&5
9916
Martin v. Löwiseba40652007-08-30 20:10:57 +00009917 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009918/* confdefs.h. */
9919_ACEOF
9920cat confdefs.h >>conftest.$ac_ext
9921cat >>conftest.$ac_ext <<_ACEOF
9922/* end confdefs.h. */
9923$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009924 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009925int
9926main ()
9927{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009929test_array [0] = 0
9930
9931 ;
9932 return 0;
9933}
9934_ACEOF
9935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009936if { (ac_try="$ac_compile"
9937case "(($ac_try" in
9938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9939 *) ac_try_echo=$ac_try;;
9940esac
9941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009943 ac_status=$?
9944 grep -v '^ *+' conftest.er1 >conftest.err
9945 rm -f conftest.er1
9946 cat conftest.err >&5
9947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009948 (exit $ac_status); } && {
9949 test -z "$ac_c_werror_flag" ||
9950 test ! -s conftest.err
9951 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009952 ac_hi=-1 ac_mid=-1
9953 while :; do
9954 cat >conftest.$ac_ext <<_ACEOF
9955/* confdefs.h. */
9956_ACEOF
9957cat confdefs.h >>conftest.$ac_ext
9958cat >>conftest.$ac_ext <<_ACEOF
9959/* end confdefs.h. */
9960$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009961 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009962int
9963main ()
9964{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009966test_array [0] = 0
9967
9968 ;
9969 return 0;
9970}
9971_ACEOF
9972rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973if { (ac_try="$ac_compile"
9974case "(($ac_try" in
9975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9976 *) ac_try_echo=$ac_try;;
9977esac
9978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9979 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009980 ac_status=$?
9981 grep -v '^ *+' conftest.er1 >conftest.err
9982 rm -f conftest.er1
9983 cat conftest.err >&5
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009985 (exit $ac_status); } && {
9986 test -z "$ac_c_werror_flag" ||
9987 test ! -s conftest.err
9988 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009989 ac_lo=$ac_mid; break
9990else
9991 echo "$as_me: failed program was:" >&5
9992sed 's/^/| /' conftest.$ac_ext >&5
9993
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994 ac_hi=`expr '(' $ac_mid ')' - 1`
9995 if test $ac_mid -le $ac_hi; then
9996 ac_lo= ac_hi=
9997 break
9998 fi
9999 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001
10002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010003 done
10004else
10005 echo "$as_me: failed program was:" >&5
10006sed 's/^/| /' conftest.$ac_ext >&5
10007
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010010
10011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010013
10014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010015# Binary search between lo and hi bounds.
10016while test "x$ac_lo" != "x$ac_hi"; do
10017 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10018 cat >conftest.$ac_ext <<_ACEOF
10019/* confdefs.h. */
10020_ACEOF
10021cat confdefs.h >>conftest.$ac_ext
10022cat >>conftest.$ac_ext <<_ACEOF
10023/* end confdefs.h. */
10024$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010026int
10027main ()
10028{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010030test_array [0] = 0
10031
10032 ;
10033 return 0;
10034}
10035_ACEOF
10036rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010037if { (ac_try="$ac_compile"
10038case "(($ac_try" in
10039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10040 *) ac_try_echo=$ac_try;;
10041esac
10042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010044 ac_status=$?
10045 grep -v '^ *+' conftest.er1 >conftest.err
10046 rm -f conftest.er1
10047 cat conftest.err >&5
10048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010049 (exit $ac_status); } && {
10050 test -z "$ac_c_werror_flag" ||
10051 test ! -s conftest.err
10052 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010053 ac_hi=$ac_mid
10054else
10055 echo "$as_me: failed program was:" >&5
10056sed 's/^/| /' conftest.$ac_ext >&5
10057
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060
10061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010062done
10063case $ac_lo in
10064?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010065'') if test "$ac_cv_type_size_t" = yes; then
10066 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010067See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010068echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010069See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070 { (exit 77); exit 77; }; }
10071 else
10072 ac_cv_sizeof_size_t=0
10073 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010074esac
10075else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010076 cat >conftest.$ac_ext <<_ACEOF
10077/* confdefs.h. */
10078_ACEOF
10079cat confdefs.h >>conftest.$ac_ext
10080cat >>conftest.$ac_ext <<_ACEOF
10081/* end confdefs.h. */
10082$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010083 typedef size_t ac__type_sizeof_;
10084static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10085static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010086#include <stdio.h>
10087#include <stdlib.h>
10088int
10089main ()
10090{
10091
10092 FILE *f = fopen ("conftest.val", "w");
10093 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010094 return 1;
10095 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010096 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010097 long int i = longval ();
10098 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10099 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010100 fprintf (f, "%ld\n", i);
10101 }
10102 else
10103 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010104 unsigned long int i = ulongval ();
10105 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10106 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010107 fprintf (f, "%lu\n", i);
10108 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010109 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010110
10111 ;
10112 return 0;
10113}
10114_ACEOF
10115rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116if { (ac_try="$ac_link"
10117case "(($ac_try" in
10118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10119 *) ac_try_echo=$ac_try;;
10120esac
10121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10122 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010123 ac_status=$?
10124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126 { (case "(($ac_try" in
10127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10128 *) ac_try_echo=$ac_try;;
10129esac
10130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10131 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010132 ac_status=$?
10133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10134 (exit $ac_status); }; }; then
10135 ac_cv_sizeof_size_t=`cat conftest.val`
10136else
10137 echo "$as_me: program exited with status $ac_status" >&5
10138echo "$as_me: failed program was:" >&5
10139sed 's/^/| /' conftest.$ac_ext >&5
10140
10141( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010142if test "$ac_cv_type_size_t" = yes; then
10143 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010144See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010145echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010146See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010147 { (exit 77); exit 77; }; }
10148 else
10149 ac_cv_sizeof_size_t=0
10150 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010152rm -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 +000010153fi
10154rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010156{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10157echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10158
10159
10160
Martin v. Löwis18e16552006-02-15 17:27:45 +000010161cat >>confdefs.h <<_ACEOF
10162#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10163_ACEOF
10164
10165
Christian Heimes951cc0f2008-01-31 23:08:23 +000010166{ echo "$as_me:$LINENO: checking for pid_t" >&5
10167echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10168if test "${ac_cv_type_pid_t+set}" = set; then
10169 echo $ECHO_N "(cached) $ECHO_C" >&6
10170else
10171 cat >conftest.$ac_ext <<_ACEOF
10172/* confdefs.h. */
10173_ACEOF
10174cat confdefs.h >>conftest.$ac_ext
10175cat >>conftest.$ac_ext <<_ACEOF
10176/* end confdefs.h. */
10177$ac_includes_default
10178typedef pid_t ac__type_new_;
10179int
10180main ()
10181{
10182if ((ac__type_new_ *) 0)
10183 return 0;
10184if (sizeof (ac__type_new_))
10185 return 0;
10186 ;
10187 return 0;
10188}
10189_ACEOF
10190rm -f conftest.$ac_objext
10191if { (ac_try="$ac_compile"
10192case "(($ac_try" in
10193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10194 *) ac_try_echo=$ac_try;;
10195esac
10196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10197 (eval "$ac_compile") 2>conftest.er1
10198 ac_status=$?
10199 grep -v '^ *+' conftest.er1 >conftest.err
10200 rm -f conftest.er1
10201 cat conftest.err >&5
10202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10203 (exit $ac_status); } && {
10204 test -z "$ac_c_werror_flag" ||
10205 test ! -s conftest.err
10206 } && test -s conftest.$ac_objext; then
10207 ac_cv_type_pid_t=yes
10208else
10209 echo "$as_me: failed program was:" >&5
10210sed 's/^/| /' conftest.$ac_ext >&5
10211
10212 ac_cv_type_pid_t=no
10213fi
10214
10215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10216fi
10217{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10218echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10219
10220# The cast to long int works around a bug in the HP C Compiler
10221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10223# This bug is HP SR number 8606223364.
10224{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10225echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10226if test "${ac_cv_sizeof_pid_t+set}" = set; then
10227 echo $ECHO_N "(cached) $ECHO_C" >&6
10228else
10229 if test "$cross_compiling" = yes; then
10230 # Depending upon the size, compute the lo and hi bounds.
10231cat >conftest.$ac_ext <<_ACEOF
10232/* confdefs.h. */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h. */
10237$ac_includes_default
10238 typedef pid_t ac__type_sizeof_;
10239int
10240main ()
10241{
10242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10243test_array [0] = 0
10244
10245 ;
10246 return 0;
10247}
10248_ACEOF
10249rm -f conftest.$ac_objext
10250if { (ac_try="$ac_compile"
10251case "(($ac_try" in
10252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10253 *) ac_try_echo=$ac_try;;
10254esac
10255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10256 (eval "$ac_compile") 2>conftest.er1
10257 ac_status=$?
10258 grep -v '^ *+' conftest.er1 >conftest.err
10259 rm -f conftest.er1
10260 cat conftest.err >&5
10261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10262 (exit $ac_status); } && {
10263 test -z "$ac_c_werror_flag" ||
10264 test ! -s conftest.err
10265 } && test -s conftest.$ac_objext; then
10266 ac_lo=0 ac_mid=0
10267 while :; do
10268 cat >conftest.$ac_ext <<_ACEOF
10269/* confdefs.h. */
10270_ACEOF
10271cat confdefs.h >>conftest.$ac_ext
10272cat >>conftest.$ac_ext <<_ACEOF
10273/* end confdefs.h. */
10274$ac_includes_default
10275 typedef pid_t ac__type_sizeof_;
10276int
10277main ()
10278{
10279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10280test_array [0] = 0
10281
10282 ;
10283 return 0;
10284}
10285_ACEOF
10286rm -f conftest.$ac_objext
10287if { (ac_try="$ac_compile"
10288case "(($ac_try" in
10289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10290 *) ac_try_echo=$ac_try;;
10291esac
10292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10293 (eval "$ac_compile") 2>conftest.er1
10294 ac_status=$?
10295 grep -v '^ *+' conftest.er1 >conftest.err
10296 rm -f conftest.er1
10297 cat conftest.err >&5
10298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10299 (exit $ac_status); } && {
10300 test -z "$ac_c_werror_flag" ||
10301 test ! -s conftest.err
10302 } && test -s conftest.$ac_objext; then
10303 ac_hi=$ac_mid; break
10304else
10305 echo "$as_me: failed program was:" >&5
10306sed 's/^/| /' conftest.$ac_ext >&5
10307
10308 ac_lo=`expr $ac_mid + 1`
10309 if test $ac_lo -le $ac_mid; then
10310 ac_lo= ac_hi=
10311 break
10312 fi
10313 ac_mid=`expr 2 '*' $ac_mid + 1`
10314fi
10315
10316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10317 done
10318else
10319 echo "$as_me: failed program was:" >&5
10320sed 's/^/| /' conftest.$ac_ext >&5
10321
10322 cat >conftest.$ac_ext <<_ACEOF
10323/* confdefs.h. */
10324_ACEOF
10325cat confdefs.h >>conftest.$ac_ext
10326cat >>conftest.$ac_ext <<_ACEOF
10327/* end confdefs.h. */
10328$ac_includes_default
10329 typedef pid_t ac__type_sizeof_;
10330int
10331main ()
10332{
10333static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10334test_array [0] = 0
10335
10336 ;
10337 return 0;
10338}
10339_ACEOF
10340rm -f conftest.$ac_objext
10341if { (ac_try="$ac_compile"
10342case "(($ac_try" in
10343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10344 *) ac_try_echo=$ac_try;;
10345esac
10346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10347 (eval "$ac_compile") 2>conftest.er1
10348 ac_status=$?
10349 grep -v '^ *+' conftest.er1 >conftest.err
10350 rm -f conftest.er1
10351 cat conftest.err >&5
10352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10353 (exit $ac_status); } && {
10354 test -z "$ac_c_werror_flag" ||
10355 test ! -s conftest.err
10356 } && test -s conftest.$ac_objext; then
10357 ac_hi=-1 ac_mid=-1
10358 while :; do
10359 cat >conftest.$ac_ext <<_ACEOF
10360/* confdefs.h. */
10361_ACEOF
10362cat confdefs.h >>conftest.$ac_ext
10363cat >>conftest.$ac_ext <<_ACEOF
10364/* end confdefs.h. */
10365$ac_includes_default
10366 typedef pid_t ac__type_sizeof_;
10367int
10368main ()
10369{
10370static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10371test_array [0] = 0
10372
10373 ;
10374 return 0;
10375}
10376_ACEOF
10377rm -f conftest.$ac_objext
10378if { (ac_try="$ac_compile"
10379case "(($ac_try" in
10380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10381 *) ac_try_echo=$ac_try;;
10382esac
10383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10384 (eval "$ac_compile") 2>conftest.er1
10385 ac_status=$?
10386 grep -v '^ *+' conftest.er1 >conftest.err
10387 rm -f conftest.er1
10388 cat conftest.err >&5
10389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390 (exit $ac_status); } && {
10391 test -z "$ac_c_werror_flag" ||
10392 test ! -s conftest.err
10393 } && test -s conftest.$ac_objext; then
10394 ac_lo=$ac_mid; break
10395else
10396 echo "$as_me: failed program was:" >&5
10397sed 's/^/| /' conftest.$ac_ext >&5
10398
10399 ac_hi=`expr '(' $ac_mid ')' - 1`
10400 if test $ac_mid -le $ac_hi; then
10401 ac_lo= ac_hi=
10402 break
10403 fi
10404 ac_mid=`expr 2 '*' $ac_mid`
10405fi
10406
10407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10408 done
10409else
10410 echo "$as_me: failed program was:" >&5
10411sed 's/^/| /' conftest.$ac_ext >&5
10412
10413 ac_lo= ac_hi=
10414fi
10415
10416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10417fi
10418
10419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10420# Binary search between lo and hi bounds.
10421while test "x$ac_lo" != "x$ac_hi"; do
10422 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10423 cat >conftest.$ac_ext <<_ACEOF
10424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
10429$ac_includes_default
10430 typedef pid_t ac__type_sizeof_;
10431int
10432main ()
10433{
10434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10435test_array [0] = 0
10436
10437 ;
10438 return 0;
10439}
10440_ACEOF
10441rm -f conftest.$ac_objext
10442if { (ac_try="$ac_compile"
10443case "(($ac_try" in
10444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10445 *) ac_try_echo=$ac_try;;
10446esac
10447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10448 (eval "$ac_compile") 2>conftest.er1
10449 ac_status=$?
10450 grep -v '^ *+' conftest.er1 >conftest.err
10451 rm -f conftest.er1
10452 cat conftest.err >&5
10453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10454 (exit $ac_status); } && {
10455 test -z "$ac_c_werror_flag" ||
10456 test ! -s conftest.err
10457 } && test -s conftest.$ac_objext; then
10458 ac_hi=$ac_mid
10459else
10460 echo "$as_me: failed program was:" >&5
10461sed 's/^/| /' conftest.$ac_ext >&5
10462
10463 ac_lo=`expr '(' $ac_mid ')' + 1`
10464fi
10465
10466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10467done
10468case $ac_lo in
10469?*) ac_cv_sizeof_pid_t=$ac_lo;;
10470'') if test "$ac_cv_type_pid_t" = yes; then
10471 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10472See \`config.log' for more details." >&5
10473echo "$as_me: error: cannot compute sizeof (pid_t)
10474See \`config.log' for more details." >&2;}
10475 { (exit 77); exit 77; }; }
10476 else
10477 ac_cv_sizeof_pid_t=0
10478 fi ;;
10479esac
10480else
10481 cat >conftest.$ac_ext <<_ACEOF
10482/* confdefs.h. */
10483_ACEOF
10484cat confdefs.h >>conftest.$ac_ext
10485cat >>conftest.$ac_ext <<_ACEOF
10486/* end confdefs.h. */
10487$ac_includes_default
10488 typedef pid_t ac__type_sizeof_;
10489static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10490static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10491#include <stdio.h>
10492#include <stdlib.h>
10493int
10494main ()
10495{
10496
10497 FILE *f = fopen ("conftest.val", "w");
10498 if (! f)
10499 return 1;
10500 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10501 {
10502 long int i = longval ();
10503 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10504 return 1;
10505 fprintf (f, "%ld\n", i);
10506 }
10507 else
10508 {
10509 unsigned long int i = ulongval ();
10510 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10511 return 1;
10512 fprintf (f, "%lu\n", i);
10513 }
10514 return ferror (f) || fclose (f) != 0;
10515
10516 ;
10517 return 0;
10518}
10519_ACEOF
10520rm -f conftest$ac_exeext
10521if { (ac_try="$ac_link"
10522case "(($ac_try" in
10523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10524 *) ac_try_echo=$ac_try;;
10525esac
10526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10527 (eval "$ac_link") 2>&5
10528 ac_status=$?
10529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10530 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10531 { (case "(($ac_try" in
10532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10533 *) ac_try_echo=$ac_try;;
10534esac
10535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10536 (eval "$ac_try") 2>&5
10537 ac_status=$?
10538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539 (exit $ac_status); }; }; then
10540 ac_cv_sizeof_pid_t=`cat conftest.val`
10541else
10542 echo "$as_me: program exited with status $ac_status" >&5
10543echo "$as_me: failed program was:" >&5
10544sed 's/^/| /' conftest.$ac_ext >&5
10545
10546( exit $ac_status )
10547if test "$ac_cv_type_pid_t" = yes; then
10548 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10549See \`config.log' for more details." >&5
10550echo "$as_me: error: cannot compute sizeof (pid_t)
10551See \`config.log' for more details." >&2;}
10552 { (exit 77); exit 77; }; }
10553 else
10554 ac_cv_sizeof_pid_t=0
10555 fi
10556fi
10557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10558fi
10559rm -f conftest.val
10560fi
10561{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10562echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10563
10564
10565
10566cat >>confdefs.h <<_ACEOF
10567#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10568_ACEOF
10569
10570
Michael W. Hudson54241132001-12-07 15:38:26 +000010571
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572{ echo "$as_me:$LINENO: checking for long long support" >&5
10573echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010574have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010575cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010576/* confdefs.h. */
10577_ACEOF
10578cat confdefs.h >>conftest.$ac_ext
10579cat >>conftest.$ac_ext <<_ACEOF
10580/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010581
Martin v. Löwis11437992002-04-12 09:54:03 +000010582int
10583main ()
10584{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010585long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010586 ;
10587 return 0;
10588}
10589_ACEOF
10590rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010591if { (ac_try="$ac_compile"
10592case "(($ac_try" in
10593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10594 *) ac_try_echo=$ac_try;;
10595esac
10596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10597 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010598 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010599 grep -v '^ *+' conftest.er1 >conftest.err
10600 rm -f conftest.er1
10601 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010603 (exit $ac_status); } && {
10604 test -z "$ac_c_werror_flag" ||
10605 test ! -s conftest.err
10606 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010607
10608
10609cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010610#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010611_ACEOF
10612
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010613 have_long_long=yes
10614
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010615else
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010617sed 's/^/| /' conftest.$ac_ext >&5
10618
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010620fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010621
10622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10623{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10624echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010625if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010626{ echo "$as_me:$LINENO: checking for long long" >&5
10627echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010628if test "${ac_cv_type_long_long+set}" = set; then
10629 echo $ECHO_N "(cached) $ECHO_C" >&6
10630else
10631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010632/* confdefs.h. */
10633_ACEOF
10634cat confdefs.h >>conftest.$ac_ext
10635cat >>conftest.$ac_ext <<_ACEOF
10636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010637$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010638typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010639int
10640main ()
10641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010642if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010643 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010644if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010645 return 0;
10646 ;
10647 return 0;
10648}
10649_ACEOF
10650rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010651if { (ac_try="$ac_compile"
10652case "(($ac_try" in
10653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10654 *) ac_try_echo=$ac_try;;
10655esac
10656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010659 grep -v '^ *+' conftest.er1 >conftest.err
10660 rm -f conftest.er1
10661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663 (exit $ac_status); } && {
10664 test -z "$ac_c_werror_flag" ||
10665 test ! -s conftest.err
10666 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010667 ac_cv_type_long_long=yes
10668else
10669 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010670sed 's/^/| /' conftest.$ac_ext >&5
10671
Martin v. Löwiseba40652007-08-30 20:10:57 +000010672 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010673fi
Brett Cannon19fab762007-06-02 03:02:29 +000010674
Martin v. Löwiseba40652007-08-30 20:10:57 +000010675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10676fi
10677{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10678echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10679
10680# The cast to long int works around a bug in the HP C Compiler
10681# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10682# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10683# This bug is HP SR number 8606223364.
10684{ echo "$as_me:$LINENO: checking size of long long" >&5
10685echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010686if test "${ac_cv_sizeof_long_long+set}" = set; then
10687 echo $ECHO_N "(cached) $ECHO_C" >&6
10688else
Martin v. Löwis11437992002-04-12 09:54:03 +000010689 if test "$cross_compiling" = yes; then
10690 # Depending upon the size, compute the lo and hi bounds.
10691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010692/* confdefs.h. */
10693_ACEOF
10694cat confdefs.h >>conftest.$ac_ext
10695cat >>conftest.$ac_ext <<_ACEOF
10696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010697$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010698 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010699int
10700main ()
10701{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010702static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010703test_array [0] = 0
10704
10705 ;
10706 return 0;
10707}
10708_ACEOF
10709rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010710if { (ac_try="$ac_compile"
10711case "(($ac_try" in
10712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10713 *) ac_try_echo=$ac_try;;
10714esac
10715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10716 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010718 grep -v '^ *+' conftest.er1 >conftest.err
10719 rm -f conftest.er1
10720 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722 (exit $ac_status); } && {
10723 test -z "$ac_c_werror_flag" ||
10724 test ! -s conftest.err
10725 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010726 ac_lo=0 ac_mid=0
10727 while :; do
10728 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010729/* confdefs.h. */
10730_ACEOF
10731cat confdefs.h >>conftest.$ac_ext
10732cat >>conftest.$ac_ext <<_ACEOF
10733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010734$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010735 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010736int
10737main ()
10738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010740test_array [0] = 0
10741
10742 ;
10743 return 0;
10744}
10745_ACEOF
10746rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010747if { (ac_try="$ac_compile"
10748case "(($ac_try" in
10749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10750 *) ac_try_echo=$ac_try;;
10751esac
10752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10753 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010755 grep -v '^ *+' conftest.er1 >conftest.err
10756 rm -f conftest.er1
10757 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010759 (exit $ac_status); } && {
10760 test -z "$ac_c_werror_flag" ||
10761 test ! -s conftest.err
10762 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010763 ac_hi=$ac_mid; break
10764else
10765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010766sed 's/^/| /' conftest.$ac_ext >&5
10767
Martin v. Löwiseba40652007-08-30 20:10:57 +000010768 ac_lo=`expr $ac_mid + 1`
10769 if test $ac_lo -le $ac_mid; then
10770 ac_lo= ac_hi=
10771 break
10772 fi
10773 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010775
10776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 done
10778else
10779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010780sed 's/^/| /' conftest.$ac_ext >&5
10781
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010783/* confdefs.h. */
10784_ACEOF
10785cat confdefs.h >>conftest.$ac_ext
10786cat >>conftest.$ac_ext <<_ACEOF
10787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010788$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010789 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010790int
10791main ()
10792{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010793static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010794test_array [0] = 0
10795
10796 ;
10797 return 0;
10798}
10799_ACEOF
10800rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010801if { (ac_try="$ac_compile"
10802case "(($ac_try" in
10803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10804 *) ac_try_echo=$ac_try;;
10805esac
10806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10807 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010809 grep -v '^ *+' conftest.er1 >conftest.err
10810 rm -f conftest.er1
10811 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010813 (exit $ac_status); } && {
10814 test -z "$ac_c_werror_flag" ||
10815 test ! -s conftest.err
10816 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010817 ac_hi=-1 ac_mid=-1
10818 while :; do
10819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010820/* confdefs.h. */
10821_ACEOF
10822cat confdefs.h >>conftest.$ac_ext
10823cat >>conftest.$ac_ext <<_ACEOF
10824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010825$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010826 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010831test_array [0] = 0
10832
10833 ;
10834 return 0;
10835}
10836_ACEOF
10837rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010838if { (ac_try="$ac_compile"
10839case "(($ac_try" in
10840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10841 *) ac_try_echo=$ac_try;;
10842esac
10843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010846 grep -v '^ *+' conftest.er1 >conftest.err
10847 rm -f conftest.er1
10848 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010850 (exit $ac_status); } && {
10851 test -z "$ac_c_werror_flag" ||
10852 test ! -s conftest.err
10853 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010854 ac_lo=$ac_mid; break
10855else
10856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010857sed 's/^/| /' conftest.$ac_ext >&5
10858
Martin v. Löwiseba40652007-08-30 20:10:57 +000010859 ac_hi=`expr '(' $ac_mid ')' - 1`
10860 if test $ac_mid -le $ac_hi; then
10861 ac_lo= ac_hi=
10862 break
10863 fi
10864 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010866
10867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 done
10869else
10870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010871sed 's/^/| /' conftest.$ac_ext >&5
10872
Martin v. Löwiseba40652007-08-30 20:10:57 +000010873 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010875
10876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010878
10879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010880# Binary search between lo and hi bounds.
10881while test "x$ac_lo" != "x$ac_hi"; do
10882 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010884/* confdefs.h. */
10885_ACEOF
10886cat confdefs.h >>conftest.$ac_ext
10887cat >>conftest.$ac_ext <<_ACEOF
10888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010889$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010891int
10892main ()
10893{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010894static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010895test_array [0] = 0
10896
10897 ;
10898 return 0;
10899}
10900_ACEOF
10901rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010902if { (ac_try="$ac_compile"
10903case "(($ac_try" in
10904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10905 *) ac_try_echo=$ac_try;;
10906esac
10907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010910 grep -v '^ *+' conftest.er1 >conftest.err
10911 rm -f conftest.er1
10912 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010914 (exit $ac_status); } && {
10915 test -z "$ac_c_werror_flag" ||
10916 test ! -s conftest.err
10917 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010918 ac_hi=$ac_mid
10919else
10920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010921sed 's/^/| /' conftest.$ac_ext >&5
10922
Martin v. Löwiseba40652007-08-30 20:10:57 +000010923 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010924fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010925
10926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010927done
10928case $ac_lo in
10929?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010930'') if test "$ac_cv_type_long_long" = yes; then
10931 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010932See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010933echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000010934See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010935 { (exit 77); exit 77; }; }
10936 else
10937 ac_cv_sizeof_long_long=0
10938 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010939esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010940else
Martin v. Löwis11437992002-04-12 09:54:03 +000010941 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010942/* confdefs.h. */
10943_ACEOF
10944cat confdefs.h >>conftest.$ac_ext
10945cat >>conftest.$ac_ext <<_ACEOF
10946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010947$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010948 typedef long long ac__type_sizeof_;
10949static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10950static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010951#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010952#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010953int
10954main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010955{
Martin v. Löwis11437992002-04-12 09:54:03 +000010956
10957 FILE *f = fopen ("conftest.val", "w");
10958 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010959 return 1;
10960 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010962 long int i = longval ();
10963 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10964 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 fprintf (f, "%ld\n", i);
10966 }
10967 else
10968 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010969 unsigned long int i = ulongval ();
10970 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10971 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000010972 fprintf (f, "%lu\n", i);
10973 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010974 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010975
10976 ;
10977 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010978}
Martin v. Löwis11437992002-04-12 09:54:03 +000010979_ACEOF
10980rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010981if { (ac_try="$ac_link"
10982case "(($ac_try" in
10983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10984 *) ac_try_echo=$ac_try;;
10985esac
10986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10987 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 ac_status=$?
10989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10990 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010991 { (case "(($ac_try" in
10992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10993 *) ac_try_echo=$ac_try;;
10994esac
10995eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10996 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010997 ac_status=$?
10998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10999 (exit $ac_status); }; }; then
11000 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011001else
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 echo "$as_me: program exited with status $ac_status" >&5
11003echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011004sed 's/^/| /' conftest.$ac_ext >&5
11005
Martin v. Löwis11437992002-04-12 09:54:03 +000011006( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011007if test "$ac_cv_type_long_long" = yes; then
11008 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011009See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011010echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011011See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011012 { (exit 77); exit 77; }; }
11013 else
11014 ac_cv_sizeof_long_long=0
11015 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011017rm -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 +000011018fi
11019rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011021{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11022echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11023
11024
11025
Martin v. Löwis11437992002-04-12 09:54:03 +000011026cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011027#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011028_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011029
Michael W. Hudson54241132001-12-07 15:38:26 +000011030
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011031fi
11032
Martin v. Löwiseba40652007-08-30 20:10:57 +000011033{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11034echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011035have_c99_bool=no
11036cat >conftest.$ac_ext <<_ACEOF
11037/* confdefs.h. */
11038_ACEOF
11039cat confdefs.h >>conftest.$ac_ext
11040cat >>conftest.$ac_ext <<_ACEOF
11041/* end confdefs.h. */
11042
11043int
11044main ()
11045{
11046_Bool x; x = (_Bool)0;
11047 ;
11048 return 0;
11049}
11050_ACEOF
11051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011052if { (ac_try="$ac_compile"
11053case "(($ac_try" in
11054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11055 *) ac_try_echo=$ac_try;;
11056esac
11057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11058 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011059 ac_status=$?
11060 grep -v '^ *+' conftest.er1 >conftest.err
11061 rm -f conftest.er1
11062 cat conftest.err >&5
11063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011064 (exit $ac_status); } && {
11065 test -z "$ac_c_werror_flag" ||
11066 test ! -s conftest.err
11067 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011068
11069
11070cat >>confdefs.h <<\_ACEOF
11071#define HAVE_C99_BOOL 1
11072_ACEOF
11073
11074 have_c99_bool=yes
11075
11076else
11077 echo "$as_me: failed program was:" >&5
11078sed 's/^/| /' conftest.$ac_ext >&5
11079
Martin v. Löwiseba40652007-08-30 20:10:57 +000011080
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082
11083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11084{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11085echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011086if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011087{ echo "$as_me:$LINENO: checking for _Bool" >&5
11088echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011089if test "${ac_cv_type__Bool+set}" = set; then
11090 echo $ECHO_N "(cached) $ECHO_C" >&6
11091else
11092 cat >conftest.$ac_ext <<_ACEOF
11093/* confdefs.h. */
11094_ACEOF
11095cat confdefs.h >>conftest.$ac_ext
11096cat >>conftest.$ac_ext <<_ACEOF
11097/* end confdefs.h. */
11098$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011099typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011100int
11101main ()
11102{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011103if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011104 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011105if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011106 return 0;
11107 ;
11108 return 0;
11109}
11110_ACEOF
11111rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011112if { (ac_try="$ac_compile"
11113case "(($ac_try" in
11114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11115 *) ac_try_echo=$ac_try;;
11116esac
11117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11118 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011119 ac_status=$?
11120 grep -v '^ *+' conftest.er1 >conftest.err
11121 rm -f conftest.er1
11122 cat conftest.err >&5
11123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011124 (exit $ac_status); } && {
11125 test -z "$ac_c_werror_flag" ||
11126 test ! -s conftest.err
11127 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011128 ac_cv_type__Bool=yes
11129else
11130 echo "$as_me: failed program was:" >&5
11131sed 's/^/| /' conftest.$ac_ext >&5
11132
Martin v. Löwiseba40652007-08-30 20:10:57 +000011133 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011134fi
Brett Cannon19fab762007-06-02 03:02:29 +000011135
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11137fi
11138{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11139echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11140
11141# The cast to long int works around a bug in the HP C Compiler
11142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11144# This bug is HP SR number 8606223364.
11145{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11146echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011147if test "${ac_cv_sizeof__Bool+set}" = set; then
11148 echo $ECHO_N "(cached) $ECHO_C" >&6
11149else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011150 if test "$cross_compiling" = yes; then
11151 # Depending upon the size, compute the lo and hi bounds.
11152cat >conftest.$ac_ext <<_ACEOF
11153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
11158$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011159 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011160int
11161main ()
11162{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011163static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011164test_array [0] = 0
11165
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011171if { (ac_try="$ac_compile"
11172case "(($ac_try" in
11173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11174 *) ac_try_echo=$ac_try;;
11175esac
11176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011178 ac_status=$?
11179 grep -v '^ *+' conftest.er1 >conftest.err
11180 rm -f conftest.er1
11181 cat conftest.err >&5
11182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011183 (exit $ac_status); } && {
11184 test -z "$ac_c_werror_flag" ||
11185 test ! -s conftest.err
11186 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011187 ac_lo=0 ac_mid=0
11188 while :; do
11189 cat >conftest.$ac_ext <<_ACEOF
11190/* confdefs.h. */
11191_ACEOF
11192cat confdefs.h >>conftest.$ac_ext
11193cat >>conftest.$ac_ext <<_ACEOF
11194/* end confdefs.h. */
11195$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011196 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011197int
11198main ()
11199{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011201test_array [0] = 0
11202
11203 ;
11204 return 0;
11205}
11206_ACEOF
11207rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011208if { (ac_try="$ac_compile"
11209case "(($ac_try" in
11210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11211 *) ac_try_echo=$ac_try;;
11212esac
11213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011215 ac_status=$?
11216 grep -v '^ *+' conftest.er1 >conftest.err
11217 rm -f conftest.er1
11218 cat conftest.err >&5
11219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220 (exit $ac_status); } && {
11221 test -z "$ac_c_werror_flag" ||
11222 test ! -s conftest.err
11223 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011224 ac_hi=$ac_mid; break
11225else
11226 echo "$as_me: failed program was:" >&5
11227sed 's/^/| /' conftest.$ac_ext >&5
11228
Martin v. Löwiseba40652007-08-30 20:10:57 +000011229 ac_lo=`expr $ac_mid + 1`
11230 if test $ac_lo -le $ac_mid; then
11231 ac_lo= ac_hi=
11232 break
11233 fi
11234 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011235fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011236
11237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011238 done
11239else
11240 echo "$as_me: failed program was:" >&5
11241sed 's/^/| /' conftest.$ac_ext >&5
11242
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011244/* confdefs.h. */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h. */
11249$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011251int
11252main ()
11253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011255test_array [0] = 0
11256
11257 ;
11258 return 0;
11259}
11260_ACEOF
11261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262if { (ac_try="$ac_compile"
11263case "(($ac_try" in
11264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11265 *) ac_try_echo=$ac_try;;
11266esac
11267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011269 ac_status=$?
11270 grep -v '^ *+' conftest.er1 >conftest.err
11271 rm -f conftest.er1
11272 cat conftest.err >&5
11273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011274 (exit $ac_status); } && {
11275 test -z "$ac_c_werror_flag" ||
11276 test ! -s conftest.err
11277 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011278 ac_hi=-1 ac_mid=-1
11279 while :; do
11280 cat >conftest.$ac_ext <<_ACEOF
11281/* confdefs.h. */
11282_ACEOF
11283cat confdefs.h >>conftest.$ac_ext
11284cat >>conftest.$ac_ext <<_ACEOF
11285/* end confdefs.h. */
11286$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011287 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011288int
11289main ()
11290{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011291static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011292test_array [0] = 0
11293
11294 ;
11295 return 0;
11296}
11297_ACEOF
11298rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299if { (ac_try="$ac_compile"
11300case "(($ac_try" in
11301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11302 *) ac_try_echo=$ac_try;;
11303esac
11304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011306 ac_status=$?
11307 grep -v '^ *+' conftest.er1 >conftest.err
11308 rm -f conftest.er1
11309 cat conftest.err >&5
11310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011311 (exit $ac_status); } && {
11312 test -z "$ac_c_werror_flag" ||
11313 test ! -s conftest.err
11314 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011315 ac_lo=$ac_mid; break
11316else
11317 echo "$as_me: failed program was:" >&5
11318sed 's/^/| /' conftest.$ac_ext >&5
11319
Martin v. Löwiseba40652007-08-30 20:10:57 +000011320 ac_hi=`expr '(' $ac_mid ')' - 1`
11321 if test $ac_mid -le $ac_hi; then
11322 ac_lo= ac_hi=
11323 break
11324 fi
11325 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011326fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011327
11328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011329 done
11330else
11331 echo "$as_me: failed program was:" >&5
11332sed 's/^/| /' conftest.$ac_ext >&5
11333
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011336
11337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339
11340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011341# Binary search between lo and hi bounds.
11342while test "x$ac_lo" != "x$ac_hi"; do
11343 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11344 cat >conftest.$ac_ext <<_ACEOF
11345/* confdefs.h. */
11346_ACEOF
11347cat confdefs.h >>conftest.$ac_ext
11348cat >>conftest.$ac_ext <<_ACEOF
11349/* end confdefs.h. */
11350$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011352int
11353main ()
11354{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011356test_array [0] = 0
11357
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011363if { (ac_try="$ac_compile"
11364case "(($ac_try" in
11365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366 *) ac_try_echo=$ac_try;;
11367esac
11368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011370 ac_status=$?
11371 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1
11373 cat conftest.err >&5
11374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err
11378 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011379 ac_hi=$ac_mid
11380else
11381 echo "$as_me: failed program was:" >&5
11382sed 's/^/| /' conftest.$ac_ext >&5
11383
Martin v. Löwiseba40652007-08-30 20:10:57 +000011384 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386
11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011388done
11389case $ac_lo in
11390?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391'') if test "$ac_cv_type__Bool" = yes; then
11392 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011393See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011395See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011396 { (exit 77); exit 77; }; }
11397 else
11398 ac_cv_sizeof__Bool=0
11399 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011400esac
11401else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011402 cat >conftest.$ac_ext <<_ACEOF
11403/* confdefs.h. */
11404_ACEOF
11405cat confdefs.h >>conftest.$ac_ext
11406cat >>conftest.$ac_ext <<_ACEOF
11407/* end confdefs.h. */
11408$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011409 typedef _Bool ac__type_sizeof_;
11410static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11411static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011412#include <stdio.h>
11413#include <stdlib.h>
11414int
11415main ()
11416{
11417
11418 FILE *f = fopen ("conftest.val", "w");
11419 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011420 return 1;
11421 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011422 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011423 long int i = longval ();
11424 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11425 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011426 fprintf (f, "%ld\n", i);
11427 }
11428 else
11429 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011430 unsigned long int i = ulongval ();
11431 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11432 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011433 fprintf (f, "%lu\n", i);
11434 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011435 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011436
11437 ;
11438 return 0;
11439}
11440_ACEOF
11441rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011442if { (ac_try="$ac_link"
11443case "(($ac_try" in
11444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11445 *) ac_try_echo=$ac_try;;
11446esac
11447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11448 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011449 ac_status=$?
11450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 { (case "(($ac_try" in
11453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11454 *) ac_try_echo=$ac_try;;
11455esac
11456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11457 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011458 ac_status=$?
11459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11460 (exit $ac_status); }; }; then
11461 ac_cv_sizeof__Bool=`cat conftest.val`
11462else
11463 echo "$as_me: program exited with status $ac_status" >&5
11464echo "$as_me: failed program was:" >&5
11465sed 's/^/| /' conftest.$ac_ext >&5
11466
11467( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468if test "$ac_cv_type__Bool" = yes; then
11469 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011470See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011472See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011473 { (exit 77); exit 77; }; }
11474 else
11475 ac_cv_sizeof__Bool=0
11476 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011478rm -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 +000011479fi
11480rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011481fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011482{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
11483echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
11484
11485
11486
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011487cat >>confdefs.h <<_ACEOF
11488#define SIZEOF__BOOL $ac_cv_sizeof__Bool
11489_ACEOF
11490
11491
11492fi
11493
Martin v. Löwiseba40652007-08-30 20:10:57 +000011494{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11495echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011496if test "${ac_cv_type_uintptr_t+set}" = set; then
11497 echo $ECHO_N "(cached) $ECHO_C" >&6
11498else
11499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011500/* confdefs.h. */
11501_ACEOF
11502cat confdefs.h >>conftest.$ac_ext
11503cat >>conftest.$ac_ext <<_ACEOF
11504/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000011505#ifdef HAVE_STDINT_H
11506 #include <stdint.h>
11507 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011508
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011510int
11511main ()
11512{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000011514 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011515if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000011516 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011517 ;
11518 return 0;
11519}
11520_ACEOF
11521rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011522if { (ac_try="$ac_compile"
11523case "(($ac_try" in
11524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11525 *) ac_try_echo=$ac_try;;
11526esac
11527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011530 grep -v '^ *+' conftest.er1 >conftest.err
11531 rm -f conftest.er1
11532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011534 (exit $ac_status); } && {
11535 test -z "$ac_c_werror_flag" ||
11536 test ! -s conftest.err
11537 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000011538 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011539else
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011541sed 's/^/| /' conftest.$ac_ext >&5
11542
Martin v. Löwiseba40652007-08-30 20:10:57 +000011543 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011545
11546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000011547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011548{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11549echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000011550if test $ac_cv_type_uintptr_t = yes; then
11551
11552cat >>confdefs.h <<_ACEOF
11553#define HAVE_UINTPTR_T 1
11554_ACEOF
11555
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
11557echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011558if test "${ac_cv_type_uintptr_t+set}" = set; then
11559 echo $ECHO_N "(cached) $ECHO_C" >&6
11560else
11561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011567$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011568typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011569int
11570main ()
11571{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011572if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 return 0;
11576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011581if { (ac_try="$ac_compile"
11582case "(($ac_try" in
11583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584 *) ac_try_echo=$ac_try;;
11585esac
11586eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011589 grep -v '^ *+' conftest.er1 >conftest.err
11590 rm -f conftest.er1
11591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011593 (exit $ac_status); } && {
11594 test -z "$ac_c_werror_flag" ||
11595 test ! -s conftest.err
11596 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 ac_cv_type_uintptr_t=yes
11598else
11599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011600sed 's/^/| /' conftest.$ac_ext >&5
11601
Martin v. Löwiseba40652007-08-30 20:10:57 +000011602 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011603fi
Brett Cannon19fab762007-06-02 03:02:29 +000011604
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11606fi
11607{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
11608echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
11609
11610# The cast to long int works around a bug in the HP C Compiler
11611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11613# This bug is HP SR number 8606223364.
11614{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
11615echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011616if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
11617 echo $ECHO_N "(cached) $ECHO_C" >&6
11618else
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 if test "$cross_compiling" = yes; then
11620 # Depending upon the size, compute the lo and hi bounds.
11621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011622/* confdefs.h. */
11623_ACEOF
11624cat confdefs.h >>conftest.$ac_ext
11625cat >>conftest.$ac_ext <<_ACEOF
11626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011627$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011628 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011629int
11630main ()
11631{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011633test_array [0] = 0
11634
11635 ;
11636 return 0;
11637}
11638_ACEOF
11639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011640if { (ac_try="$ac_compile"
11641case "(($ac_try" in
11642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11643 *) ac_try_echo=$ac_try;;
11644esac
11645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011648 grep -v '^ *+' conftest.er1 >conftest.err
11649 rm -f conftest.er1
11650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011652 (exit $ac_status); } && {
11653 test -z "$ac_c_werror_flag" ||
11654 test ! -s conftest.err
11655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011656 ac_lo=0 ac_mid=0
11657 while :; do
11658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* confdefs.h. */
11660_ACEOF
11661cat confdefs.h >>conftest.$ac_ext
11662cat >>conftest.$ac_ext <<_ACEOF
11663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011664$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011665 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011666int
11667main ()
11668{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011669static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011670test_array [0] = 0
11671
11672 ;
11673 return 0;
11674}
11675_ACEOF
11676rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011677if { (ac_try="$ac_compile"
11678case "(($ac_try" in
11679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11680 *) ac_try_echo=$ac_try;;
11681esac
11682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11683 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011684 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011685 grep -v '^ *+' conftest.er1 >conftest.err
11686 rm -f conftest.er1
11687 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011689 (exit $ac_status); } && {
11690 test -z "$ac_c_werror_flag" ||
11691 test ! -s conftest.err
11692 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011693 ac_hi=$ac_mid; break
11694else
11695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011696sed 's/^/| /' conftest.$ac_ext >&5
11697
Martin v. Löwiseba40652007-08-30 20:10:57 +000011698 ac_lo=`expr $ac_mid + 1`
11699 if test $ac_lo -le $ac_mid; then
11700 ac_lo= ac_hi=
11701 break
11702 fi
11703 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011704fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011705
11706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 done
11708else
11709 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011710sed 's/^/| /' conftest.$ac_ext >&5
11711
Martin v. Löwiseba40652007-08-30 20:10:57 +000011712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011713/* confdefs.h. */
11714_ACEOF
11715cat confdefs.h >>conftest.$ac_ext
11716cat >>conftest.$ac_ext <<_ACEOF
11717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011718$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011720int
11721main ()
11722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011724test_array [0] = 0
11725
11726 ;
11727 return 0;
11728}
11729_ACEOF
11730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011731if { (ac_try="$ac_compile"
11732case "(($ac_try" in
11733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11734 *) ac_try_echo=$ac_try;;
11735esac
11736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011739 grep -v '^ *+' conftest.er1 >conftest.err
11740 rm -f conftest.er1
11741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011743 (exit $ac_status); } && {
11744 test -z "$ac_c_werror_flag" ||
11745 test ! -s conftest.err
11746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 ac_hi=-1 ac_mid=-1
11748 while :; do
11749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* confdefs.h. */
11751_ACEOF
11752cat confdefs.h >>conftest.$ac_ext
11753cat >>conftest.$ac_ext <<_ACEOF
11754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011755$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011756 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011757int
11758main ()
11759{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011760static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011761test_array [0] = 0
11762
11763 ;
11764 return 0;
11765}
11766_ACEOF
11767rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011768if { (ac_try="$ac_compile"
11769case "(($ac_try" in
11770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11771 *) ac_try_echo=$ac_try;;
11772esac
11773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11774 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011775 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011776 grep -v '^ *+' conftest.er1 >conftest.err
11777 rm -f conftest.er1
11778 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011780 (exit $ac_status); } && {
11781 test -z "$ac_c_werror_flag" ||
11782 test ! -s conftest.err
11783 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 ac_lo=$ac_mid; break
11785else
11786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011787sed 's/^/| /' conftest.$ac_ext >&5
11788
Martin v. Löwiseba40652007-08-30 20:10:57 +000011789 ac_hi=`expr '(' $ac_mid ')' - 1`
11790 if test $ac_mid -le $ac_hi; then
11791 ac_lo= ac_hi=
11792 break
11793 fi
11794 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011796
11797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011798 done
11799else
11800 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011801sed 's/^/| /' conftest.$ac_ext >&5
11802
Martin v. Löwiseba40652007-08-30 20:10:57 +000011803 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011805
11806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011807fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808
11809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011810# Binary search between lo and hi bounds.
11811while test "x$ac_lo" != "x$ac_hi"; do
11812 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011814/* confdefs.h. */
11815_ACEOF
11816cat confdefs.h >>conftest.$ac_ext
11817cat >>conftest.$ac_ext <<_ACEOF
11818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011819$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011821int
11822main ()
11823{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011824static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011825test_array [0] = 0
11826
11827 ;
11828 return 0;
11829}
11830_ACEOF
11831rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011832if { (ac_try="$ac_compile"
11833case "(($ac_try" in
11834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11835 *) ac_try_echo=$ac_try;;
11836esac
11837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11838 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011840 grep -v '^ *+' conftest.er1 >conftest.err
11841 rm -f conftest.er1
11842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011844 (exit $ac_status); } && {
11845 test -z "$ac_c_werror_flag" ||
11846 test ! -s conftest.err
11847 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 ac_hi=$ac_mid
11849else
11850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011851sed 's/^/| /' conftest.$ac_ext >&5
11852
Martin v. Löwiseba40652007-08-30 20:10:57 +000011853 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011854fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011855
11856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011857done
11858case $ac_lo in
11859?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011860'') if test "$ac_cv_type_uintptr_t" = yes; then
11861 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011862See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011863echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011864See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011865 { (exit 77); exit 77; }; }
11866 else
11867 ac_cv_sizeof_uintptr_t=0
11868 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011869esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011870else
Martin v. Löwis11437992002-04-12 09:54:03 +000011871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011872/* confdefs.h. */
11873_ACEOF
11874cat confdefs.h >>conftest.$ac_ext
11875cat >>conftest.$ac_ext <<_ACEOF
11876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011877$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011878 typedef uintptr_t ac__type_sizeof_;
11879static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11880static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011881#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011882#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011883int
11884main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011885{
Martin v. Löwis11437992002-04-12 09:54:03 +000011886
11887 FILE *f = fopen ("conftest.val", "w");
11888 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011889 return 1;
11890 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011892 long int i = longval ();
11893 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11894 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011895 fprintf (f, "%ld\n", i);
11896 }
11897 else
11898 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011899 unsigned long int i = ulongval ();
11900 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11901 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011902 fprintf (f, "%lu\n", i);
11903 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011904 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
11906 ;
11907 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011908}
Martin v. Löwis11437992002-04-12 09:54:03 +000011909_ACEOF
11910rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911if { (ac_try="$ac_link"
11912case "(($ac_try" in
11913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11914 *) ac_try_echo=$ac_try;;
11915esac
11916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11917 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 ac_status=$?
11919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11920 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011921 { (case "(($ac_try" in
11922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11923 *) ac_try_echo=$ac_try;;
11924esac
11925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011927 ac_status=$?
11928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11929 (exit $ac_status); }; }; then
11930 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011931else
Martin v. Löwis11437992002-04-12 09:54:03 +000011932 echo "$as_me: program exited with status $ac_status" >&5
11933echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011934sed 's/^/| /' conftest.$ac_ext >&5
11935
Martin v. Löwis11437992002-04-12 09:54:03 +000011936( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011937if test "$ac_cv_type_uintptr_t" = yes; then
11938 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011939See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000011941See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011942 { (exit 77); exit 77; }; }
11943 else
11944 ac_cv_sizeof_uintptr_t=0
11945 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011947rm -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 +000011948fi
11949rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011951{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11952echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
11953
11954
11955
Martin v. Löwis11437992002-04-12 09:54:03 +000011956cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011957#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011958_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011959
Michael W. Hudson54241132001-12-07 15:38:26 +000011960
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011961fi
11962
Martin v. Löwisebe26702006-10-02 14:55:51 +000011963
11964
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011965# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000011966{ echo "$as_me:$LINENO: checking size of off_t" >&5
11967echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011968if test "${ac_cv_sizeof_off_t+set}" = set; then
11969 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011970else
11971 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011972 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011973else
Martin v. Löwis11437992002-04-12 09:54:03 +000011974 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011975/* confdefs.h. */
11976_ACEOF
11977cat confdefs.h >>conftest.$ac_ext
11978cat >>conftest.$ac_ext <<_ACEOF
11979/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011980#include <stdio.h>
11981#include <sys/types.h>
11982main()
11983{
11984 FILE *f=fopen("conftestval", "w");
11985 if (!f) exit(1);
11986 fprintf(f, "%d\n", sizeof(off_t));
11987 exit(0);
11988}
Martin v. Löwis11437992002-04-12 09:54:03 +000011989_ACEOF
11990rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991if { (ac_try="$ac_link"
11992case "(($ac_try" in
11993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11994 *) ac_try_echo=$ac_try;;
11995esac
11996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011998 ac_status=$?
11999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012001 { (case "(($ac_try" in
12002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12003 *) ac_try_echo=$ac_try;;
12004esac
12005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 ac_status=$?
12008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12009 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012010 ac_cv_sizeof_off_t=`cat conftestval`
12011else
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 echo "$as_me: program exited with status $ac_status" >&5
12013echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012014sed 's/^/| /' conftest.$ac_ext >&5
12015
Martin v. Löwis11437992002-04-12 09:54:03 +000012016( exit $ac_status )
12017ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012018fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012019rm -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 +000012020fi
12021
Martin v. Löwiseba40652007-08-30 20:10:57 +000012022
12023
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012024fi
12025
Martin v. Löwiseba40652007-08-30 20:10:57 +000012026{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12027echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012028
12029cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012030#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012031_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012032
Michael W. Hudson54241132001-12-07 15:38:26 +000012033
Martin v. Löwiseba40652007-08-30 20:10:57 +000012034{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12035echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012036if test "$have_long_long" = yes -a \
12037 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12038 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012039
Martin v. Löwis11437992002-04-12 09:54:03 +000012040cat >>confdefs.h <<\_ACEOF
12041#define HAVE_LARGEFILE_SUPPORT 1
12042_ACEOF
12043
Martin v. Löwiseba40652007-08-30 20:10:57 +000012044 { echo "$as_me:$LINENO: result: yes" >&5
12045echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012046else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012047 { echo "$as_me:$LINENO: result: no" >&5
12048echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012049fi
12050
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012051# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052{ echo "$as_me:$LINENO: checking size of time_t" >&5
12053echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012054if test "${ac_cv_sizeof_time_t+set}" = set; then
12055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012056else
12057 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012058 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012059else
Martin v. Löwis11437992002-04-12 09:54:03 +000012060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012061/* confdefs.h. */
12062_ACEOF
12063cat confdefs.h >>conftest.$ac_ext
12064cat >>conftest.$ac_ext <<_ACEOF
12065/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012066#include <stdio.h>
12067#include <time.h>
12068main()
12069{
12070 FILE *f=fopen("conftestval", "w");
12071 if (!f) exit(1);
12072 fprintf(f, "%d\n", sizeof(time_t));
12073 exit(0);
12074}
Martin v. Löwis11437992002-04-12 09:54:03 +000012075_ACEOF
12076rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012077if { (ac_try="$ac_link"
12078case "(($ac_try" in
12079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12080 *) ac_try_echo=$ac_try;;
12081esac
12082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12083 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012084 ac_status=$?
12085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12086 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012087 { (case "(($ac_try" in
12088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12089 *) ac_try_echo=$ac_try;;
12090esac
12091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12092 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012093 ac_status=$?
12094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12095 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012096 ac_cv_sizeof_time_t=`cat conftestval`
12097else
Martin v. Löwis11437992002-04-12 09:54:03 +000012098 echo "$as_me: program exited with status $ac_status" >&5
12099echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012100sed 's/^/| /' conftest.$ac_ext >&5
12101
Martin v. Löwis11437992002-04-12 09:54:03 +000012102( exit $ac_status )
12103ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105rm -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 +000012106fi
12107
Martin v. Löwiseba40652007-08-30 20:10:57 +000012108
12109
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012110fi
12111
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12113echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012114
12115cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012116#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012117_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012118
Michael W. Hudson54241132001-12-07 15:38:26 +000012119
12120
Trent Mick635f6fb2000-08-23 21:33:05 +000012121# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012122ac_save_cc="$CC"
12123if test "$ac_cv_kpthread" = "yes"
12124then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012125elif test "$ac_cv_kthread" = "yes"
12126then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012127elif test "$ac_cv_pthread" = "yes"
12128then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012130{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12131echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012132have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012134/* confdefs.h. */
12135_ACEOF
12136cat confdefs.h >>conftest.$ac_ext
12137cat >>conftest.$ac_ext <<_ACEOF
12138/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012139#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012140int
12141main ()
12142{
Guido van Rossum12580492000-09-24 16:47:19 +000012143pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012144 ;
12145 return 0;
12146}
12147_ACEOF
12148rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012149if { (ac_try="$ac_compile"
12150case "(($ac_try" in
12151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12152 *) ac_try_echo=$ac_try;;
12153esac
12154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12155 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012157 grep -v '^ *+' conftest.er1 >conftest.err
12158 rm -f conftest.er1
12159 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012161 (exit $ac_status); } && {
12162 test -z "$ac_c_werror_flag" ||
12163 test ! -s conftest.err
12164 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012165 have_pthread_t=yes
12166else
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012168sed 's/^/| /' conftest.$ac_ext >&5
12169
Martin v. Löwiseba40652007-08-30 20:10:57 +000012170
Trent Mick635f6fb2000-08-23 21:33:05 +000012171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172
12173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12174{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12175echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012176if test "$have_pthread_t" = yes ; then
12177 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12179echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12181 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012182else
12183 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012184 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012185else
Martin v. Löwis11437992002-04-12 09:54:03 +000012186 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012187/* confdefs.h. */
12188_ACEOF
12189cat confdefs.h >>conftest.$ac_ext
12190cat >>conftest.$ac_ext <<_ACEOF
12191/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012192#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012193#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012194 main()
12195 {
12196 FILE *f=fopen("conftestval", "w");
12197 if (!f) exit(1);
12198 fprintf(f, "%d\n", sizeof(pthread_t));
12199 exit(0);
12200 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012201_ACEOF
12202rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012203if { (ac_try="$ac_link"
12204case "(($ac_try" in
12205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12206 *) ac_try_echo=$ac_try;;
12207esac
12208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12209 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 ac_status=$?
12211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12212 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213 { (case "(($ac_try" in
12214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12215 *) ac_try_echo=$ac_try;;
12216esac
12217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12218 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ac_status=$?
12220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012222 ac_cv_sizeof_pthread_t=`cat conftestval`
12223else
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 echo "$as_me: program exited with status $ac_status" >&5
12225echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012226sed 's/^/| /' conftest.$ac_ext >&5
12227
Martin v. Löwis11437992002-04-12 09:54:03 +000012228( exit $ac_status )
12229ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231rm -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 +000012232fi
12233
Martin v. Löwiseba40652007-08-30 20:10:57 +000012234
12235
Trent Mick635f6fb2000-08-23 21:33:05 +000012236fi
12237
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12239echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012240
12241cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012242#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012243_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012244
12245fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012246CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012247
Martin v. Löwiseba40652007-08-30 20:10:57 +000012248{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12249echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12250# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012251if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012252 enableval=$enable_toolbox_glue;
12253fi
Jack Jansene578a632001-08-15 01:27:14 +000012254
12255
12256if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012257then
Jack Jansene578a632001-08-15 01:27:14 +000012258 case $ac_sys_system/$ac_sys_release in
12259 Darwin/*)
12260 enable_toolbox_glue="yes";;
12261 *)
12262 enable_toolbox_glue="no";;
12263 esac
12264fi
12265case "$enable_toolbox_glue" in
12266yes)
Jack Jansene578a632001-08-15 01:27:14 +000012267 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012268 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
12270cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012271#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012272_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012273
12274 ;;
12275*)
Jack Jansene578a632001-08-15 01:27:14 +000012276 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012277 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012278 ;;
12279esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012280{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12281echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012282
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012283
12284case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012285 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012286 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12287 ;;
12288 Darwin/*)
12289 OTHER_LIBTOOL_OPT=""
12290 ;;
12291esac
12292
12293
12294case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012295 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012296 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12297 if test "${enable_universalsdk}"; then
12298 :
12299 else
12300 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
12301 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012302 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012303 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012304 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012305 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12306 if test ${gcc_version} '<' 4.0
12307 then
12308 LIBTOOL_CRUFT="-lcc_dynamic"
12309 else
12310 LIBTOOL_CRUFT=""
12311 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000012312 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000012313 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012314 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012315esac
12316
Martin v. Löwiseba40652007-08-30 20:10:57 +000012317{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
12318echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012319if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012320then
Skip Montanarodecc6a42003-01-01 20:07:49 +000012321 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000012322 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000012323 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012324
Martin v. Löwis11437992002-04-12 09:54:03 +000012325cat >>confdefs.h <<\_ACEOF
12326#define WITH_NEXT_FRAMEWORK 1
12327_ACEOF
12328
Martin v. Löwiseba40652007-08-30 20:10:57 +000012329 { echo "$as_me:$LINENO: result: yes" >&5
12330echo "${ECHO_T}yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012331else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012332 { echo "$as_me:$LINENO: result: no" >&5
12333echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012334fi
12335
Martin v. Löwiseba40652007-08-30 20:10:57 +000012336{ echo "$as_me:$LINENO: checking for dyld" >&5
12337echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012338case $ac_sys_system/$ac_sys_release in
12339 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012340
Martin v. Löwis11437992002-04-12 09:54:03 +000012341cat >>confdefs.h <<\_ACEOF
12342#define WITH_DYLD 1
12343_ACEOF
12344
Martin v. Löwiseba40652007-08-30 20:10:57 +000012345 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
12346echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012347 ;;
12348 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012349 { echo "$as_me:$LINENO: result: no" >&5
12350echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000012351 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012352esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012353
Guido van Rossum0a516c91994-09-12 10:58:40 +000012354# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000012355
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
12357
12358
12359
Guido van Rossum0a516c91994-09-12 10:58:40 +000012360# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000012361# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000012362{ echo "$as_me:$LINENO: checking SO" >&5
12363echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012364if test -z "$SO"
12365then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012366 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000012367 hp*|HP*)
12368 case `uname -m` in
12369 ia64) SO=.so;;
12370 *) SO=.sl;;
12371 esac
12372 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012373 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012374 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012375 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000012376else
12377 # this might also be a termcap variable, see #610332
12378 echo
12379 echo '====================================================================='
12380 echo '+ +'
12381 echo '+ WARNING: You have set SO in your environment. +'
12382 echo '+ Do you really mean to change the extension for shared libraries? +'
12383 echo '+ Continuing in 10 seconds to let you to ponder. +'
12384 echo '+ +'
12385 echo '====================================================================='
12386 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000012387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388{ echo "$as_me:$LINENO: result: $SO" >&5
12389echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000012390
12391cat >>confdefs.h <<_ACEOF
12392#define SHLIB_EXT "$SO"
12393_ACEOF
12394
Guido van Rossum0a516c91994-09-12 10:58:40 +000012395# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000012396# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012397# (Shared libraries in this instance are shared modules to be loaded into
12398# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012399{ echo "$as_me:$LINENO: checking LDSHARED" >&5
12400echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012401if test -z "$LDSHARED"
12402then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012403 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012404 AIX*)
12405 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000012406 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012407 ;;
12408 BeOS*)
12409 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000012410 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012411 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000012412 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000012413 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000012415 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000012416 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000012417 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000012418 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012419 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000012420 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000012421 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000012422 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12423 if test "$enable_framework" ; then
12424 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012425 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12426 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012427 else
12428 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000012429 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000012430 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012431 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000012432 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12433 if test "$enable_framework" ; then
12434 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012435 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12436 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012437 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000012438 # No framework, use the Python app as bundle-loader
12439 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000012440 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012441 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000012442 Darwin/*)
12443 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
12444 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000012445 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000012446 if test ${cur_target} '>' 10.2; then
12447 cur_target=10.3
12448 fi
Jack Jansenc110f862005-01-07 10:49:32 +000012449 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren38f1b982007-09-02 09:46:07 +000012450
12451 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
12452 # environment with a value that is the same as what we'll use
12453 # in the Makefile to ensure that we'll get the same compiler
12454 # environment during configure and build time.
12455 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
12456 export MACOSX_DEPLOYMENT_TARGET
12457
Ronald Oussoren988117f2006-04-29 11:31:35 +000012458 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000012459 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000012460 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000012461 if test "${enable_universalsdk}"; then
12462 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
12463 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000012464 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
12465 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000012466 else
12467 LDSHARED='$(CC) $(LDFLAGS) -bundle'
12468 if test "$enable_framework" ; then
12469 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000012470 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
12471 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000012472 else
12473 # No framework, use the Python app as bundle-loader
12474 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
12475 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
12476 fi
12477 fi
12478 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000012479 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000012480 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012481 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000012482 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000012483 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000012484 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000012485 else
12486 LDSHARED="ld -Bshareable ${LDFLAGS}"
12487 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000012488 OpenBSD*)
12489 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12490 then
12491 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12492 else
12493 case `uname -r` in
12494 [01].* | 2.[0-7] | 2.[0-7].*)
12495 LDSHARED="ld -Bshareable ${LDFLAGS}"
12496 ;;
12497 *)
12498 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
12499 ;;
12500 esac
12501 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012502 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012503 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012504 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012505 then LDSHARED='$(CC) -shared'
12506 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000012507 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000012508 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000012509 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000012510 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012511 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012512 *) LDSHARED="ld";;
12513 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012515{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
12516echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012517BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000012518# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012519# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012520{ echo "$as_me:$LINENO: checking CCSHARED" >&5
12521echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012522if test -z "$CCSHARED"
12523then
Guido van Rossum07397971997-04-29 21:49:50 +000012524 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000012525 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000012526 then CCSHARED="-fPIC";
12527 elif test `uname -p` = sparc;
12528 then CCSHARED="-xcode=pic32";
12529 else CCSHARED="-Kpic";
12530 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000012531 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000012532 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000012533 else CCSHARED="+z";
12534 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012535 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012536 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012537 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012538 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000012539 if test "$GCC" = "yes"
12540 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012541 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000012542 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012543 SCO_SV*)
12544 if test "$GCC" = "yes"
12545 then CCSHARED="-fPIC"
12546 else CCSHARED="-Kpic -belf"
12547 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000012548 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012549 IRIX*/6*) case $CC in
12550 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000012551 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012552 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012553 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012554 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012555fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012556{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
12557echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012558# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012559# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000012560{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
12561echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012562if test -z "$LINKFORSHARED"
12563then
Guido van Rossum07397971997-04-29 21:49:50 +000012564 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000012565 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000012566 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000012567 LINKFORSHARED="-Wl,-E -Wl,+s";;
12568# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000012569 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012570 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012571 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000012572 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012573 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
12574 # which is
Jack Jansene578a632001-08-15 01:27:14 +000012575 # not used by the core itself but which needs to be in the core so
12576 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000012577 # -prebind is no longer used, because it actually seems to give a
12578 # slowdown in stead of a speedup, maybe due to the large number of
12579 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012580
12581 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000012582 if test "$enable_framework"
12583 then
Jack Jansenda49e192005-01-07 13:08:22 +000012584 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000012585 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012586 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000012587 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000012588 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000012589 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000012590 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000012591 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
12592 then
12593 LINKFORSHARED="-Wl,--export-dynamic"
12594 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012595 SunOS/5*) case $CC in
12596 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000012597 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000012598 then
12599 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000012600 fi;;
12601 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000012602 CYGWIN*)
12603 if test $enable_shared = "no"
12604 then
12605 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
12606 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000012607 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000012608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012609{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
12610echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000012611
Michael W. Hudson54241132001-12-07 15:38:26 +000012612
Martin v. Löwiseba40652007-08-30 20:10:57 +000012613{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
12614echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012615if test ! "$LIBRARY" = "$LDLIBRARY"
12616then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000012617 case $ac_sys_system in
12618 CYGWIN*)
12619 # Cygwin needs CCSHARED when building extension DLLs
12620 # but not when building the interpreter DLL.
12621 CFLAGSFORSHARED='';;
12622 *)
12623 CFLAGSFORSHARED='$(CCSHARED)'
12624 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012626{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
12627echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000012628
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012629# SHLIBS are libraries (except -lc and -lm) to link to the python shared
12630# library (with --enable-shared).
12631# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012632# symbols, this must be set to $(LIBS) (expanded by make). We do this even
12633# if it is not required, since it creates a dependency of the shared library
12634# to LIBS. This, in turn, means that applications linking the shared libpython
12635# don't need to link LIBS explicitly. The default should be only changed
12636# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012637
Martin v. Löwiseba40652007-08-30 20:10:57 +000012638{ echo "$as_me:$LINENO: checking SHLIBS" >&5
12639echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012640case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012641 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000012642 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012643esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012644{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
12645echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012646
12647
Guido van Rossum627b2d71993-12-24 10:39:16 +000012648# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
Martin v. Löwiseba40652007-08-30 20:10:57 +000012650{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
12651echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012652if test "${ac_cv_lib_dl_dlopen+set}" = set; then
12653 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654else
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012656LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012657cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* confdefs.h. */
12659_ACEOF
12660cat confdefs.h >>conftest.$ac_ext
12661cat >>conftest.$ac_ext <<_ACEOF
12662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Martin v. Löwiseba40652007-08-30 20:10:57 +000012664/* Override any GCC internal prototype to avoid an error.
12665 Use char because int might match the return type of a GCC
12666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012667#ifdef __cplusplus
12668extern "C"
12669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012670char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012671int
12672main ()
12673{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 ;
12676 return 0;
12677}
12678_ACEOF
12679rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012680if { (ac_try="$ac_link"
12681case "(($ac_try" in
12682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12683 *) ac_try_echo=$ac_try;;
12684esac
12685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12686 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012688 grep -v '^ *+' conftest.er1 >conftest.err
12689 rm -f conftest.er1
12690 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692 (exit $ac_status); } && {
12693 test -z "$ac_c_werror_flag" ||
12694 test ! -s conftest.err
12695 } && test -s conftest$ac_exeext &&
12696 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012697 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698else
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012700sed 's/^/| /' conftest.$ac_ext >&5
12701
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012703fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012704
12705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012707LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
12710echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012711if test $ac_cv_lib_dl_dlopen = yes; then
12712 cat >>confdefs.h <<_ACEOF
12713#define HAVE_LIBDL 1
12714_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012715
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012716 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012718fi
12719 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000012720
Martin v. Löwiseba40652007-08-30 20:10:57 +000012721{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
12722echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012723if test "${ac_cv_lib_dld_shl_load+set}" = set; then
12724 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012725else
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012727LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012729/* confdefs.h. */
12730_ACEOF
12731cat confdefs.h >>conftest.$ac_ext
12732cat >>conftest.$ac_ext <<_ACEOF
12733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
Martin v. Löwiseba40652007-08-30 20:10:57 +000012735/* Override any GCC internal prototype to avoid an error.
12736 Use char because int might match the return type of a GCC
12737 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012738#ifdef __cplusplus
12739extern "C"
12740#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012741char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012742int
12743main ()
12744{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012745return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ;
12747 return 0;
12748}
12749_ACEOF
12750rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751if { (ac_try="$ac_link"
12752case "(($ac_try" in
12753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12754 *) ac_try_echo=$ac_try;;
12755esac
12756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12757 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012759 grep -v '^ *+' conftest.er1 >conftest.err
12760 rm -f conftest.er1
12761 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012763 (exit $ac_status); } && {
12764 test -z "$ac_c_werror_flag" ||
12765 test ! -s conftest.err
12766 } && test -s conftest$ac_exeext &&
12767 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012769else
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012771sed 's/^/| /' conftest.$ac_ext >&5
12772
Martin v. Löwiseba40652007-08-30 20:10:57 +000012773 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012775
12776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012777 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012778LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000012779fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012780{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
12781echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012782if test $ac_cv_lib_dld_shl_load = yes; then
12783 cat >>confdefs.h <<_ACEOF
12784#define HAVE_LIBDLD 1
12785_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012786
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012787 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012788
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012789fi
12790 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000012791
12792# only check for sem_ini if thread support is requested
12793if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012794 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
12795echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012796if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012798else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012799 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000012800cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012801/* confdefs.h. */
12802_ACEOF
12803cat confdefs.h >>conftest.$ac_ext
12804cat >>conftest.$ac_ext <<_ACEOF
12805/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012806
Martin v. Löwiseba40652007-08-30 20:10:57 +000012807/* Override any GCC internal prototype to avoid an error.
12808 Use char because int might match the return type of a GCC
12809 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012810#ifdef __cplusplus
12811extern "C"
12812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012813char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012814int
12815main ()
12816{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822for ac_lib in '' pthread rt posix4; do
12823 if test -z "$ac_lib"; then
12824 ac_res="none required"
12825 else
12826 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000012827 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828 fi
12829 rm -f conftest.$ac_objext conftest$ac_exeext
12830if { (ac_try="$ac_link"
12831case "(($ac_try" in
12832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12833 *) ac_try_echo=$ac_try;;
12834esac
12835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12836 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000012837 ac_status=$?
12838 grep -v '^ *+' conftest.er1 >conftest.err
12839 rm -f conftest.er1
12840 cat conftest.err >&5
12841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012842 (exit $ac_status); } && {
12843 test -z "$ac_c_werror_flag" ||
12844 test ! -s conftest.err
12845 } && test -s conftest$ac_exeext &&
12846 $as_test_x conftest$ac_exeext; then
12847 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000012848else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012849 echo "$as_me: failed program was:" >&5
12850sed 's/^/| /' conftest.$ac_ext >&5
12851
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852
Brett Cannon19fab762007-06-02 03:02:29 +000012853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012854
12855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12856 conftest$ac_exeext
12857 if test "${ac_cv_search_sem_init+set}" = set; then
12858 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000012859fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012860done
12861if test "${ac_cv_search_sem_init+set}" = set; then
12862 :
12863else
12864 ac_cv_search_sem_init=no
12865fi
12866rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012867LIBS=$ac_func_search_save_LIBS
12868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12870echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
12871ac_res=$ac_cv_search_sem_init
12872if test "$ac_res" != no; then
12873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012874
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012875fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012876 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012877 # posix4 on Solaris 2.6
12878 # pthread (first!) on Linux
12879fi
12880
Martin v. Löwis19d17342003-06-14 21:03:05 +000012881# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000012882{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12883echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012884if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12885 echo $ECHO_N "(cached) $ECHO_C" >&6
12886else
12887 ac_check_lib_save_LIBS=$LIBS
12888LIBS="-lintl $LIBS"
12889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012890/* confdefs.h. */
12891_ACEOF
12892cat confdefs.h >>conftest.$ac_ext
12893cat >>conftest.$ac_ext <<_ACEOF
12894/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012895
Martin v. Löwiseba40652007-08-30 20:10:57 +000012896/* Override any GCC internal prototype to avoid an error.
12897 Use char because int might match the return type of a GCC
12898 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012899#ifdef __cplusplus
12900extern "C"
12901#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000012902char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012903int
12904main ()
12905{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012906return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012907 ;
12908 return 0;
12909}
12910_ACEOF
12911rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912if { (ac_try="$ac_link"
12913case "(($ac_try" in
12914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12915 *) ac_try_echo=$ac_try;;
12916esac
12917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12918 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012920 grep -v '^ *+' conftest.er1 >conftest.err
12921 rm -f conftest.er1
12922 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012924 (exit $ac_status); } && {
12925 test -z "$ac_c_werror_flag" ||
12926 test ! -s conftest.err
12927 } && test -s conftest$ac_exeext &&
12928 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012929 ac_cv_lib_intl_textdomain=yes
12930else
12931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012932sed 's/^/| /' conftest.$ac_ext >&5
12933
Martin v. Löwiseba40652007-08-30 20:10:57 +000012934 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012935fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012936
12937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012938 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012939LIBS=$ac_check_lib_save_LIBS
12940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12942echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000012943if test $ac_cv_lib_intl_textdomain = yes; then
12944
12945cat >>confdefs.h <<\_ACEOF
12946#define WITH_LIBINTL 1
12947_ACEOF
12948
12949fi
12950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012951
12952# checks for system dependent C++ extensions support
12953case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000012954 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12955echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012957/* confdefs.h. */
12958_ACEOF
12959cat confdefs.h >>conftest.$ac_ext
12960cat >>conftest.$ac_ext <<_ACEOF
12961/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012962#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012963int
12964main ()
12965{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012966loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012967 ;
12968 return 0;
12969}
12970_ACEOF
12971rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972if { (ac_try="$ac_link"
12973case "(($ac_try" in
12974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12975 *) ac_try_echo=$ac_try;;
12976esac
12977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12978 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012980 grep -v '^ *+' conftest.er1 >conftest.err
12981 rm -f conftest.er1
12982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012984 (exit $ac_status); } && {
12985 test -z "$ac_c_werror_flag" ||
12986 test ! -s conftest.err
12987 } && test -s conftest$ac_exeext &&
12988 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012989
Martin v. Löwis11437992002-04-12 09:54:03 +000012990cat >>confdefs.h <<\_ACEOF
12991#define AIX_GENUINE_CPLUSPLUS 1
12992_ACEOF
12993
Martin v. Löwiseba40652007-08-30 20:10:57 +000012994 { echo "$as_me:$LINENO: result: yes" >&5
12995echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012996else
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012998sed 's/^/| /' conftest.$ac_ext >&5
12999
Martin v. Löwiseba40652007-08-30 20:10:57 +000013000 { echo "$as_me:$LINENO: result: no" >&5
13001echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013003
13004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013005 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013006 *) ;;
13007esac
13008
Guido van Rossum70c7f481998-03-26 18:44:10 +000013009# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013010# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013011{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13012echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013013if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13014 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013015else
Martin v. Löwis11437992002-04-12 09:54:03 +000013016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013017LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013019/* confdefs.h. */
13020_ACEOF
13021cat confdefs.h >>conftest.$ac_ext
13022cat >>conftest.$ac_ext <<_ACEOF
13023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013024
Martin v. Löwiseba40652007-08-30 20:10:57 +000013025/* Override any GCC internal prototype to avoid an error.
13026 Use char because int might match the return type of a GCC
13027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013028#ifdef __cplusplus
13029extern "C"
13030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013031char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013032int
13033main ()
13034{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013035return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 ;
13037 return 0;
13038}
13039_ACEOF
13040rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013041if { (ac_try="$ac_link"
13042case "(($ac_try" in
13043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13044 *) ac_try_echo=$ac_try;;
13045esac
13046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13047 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013049 grep -v '^ *+' conftest.er1 >conftest.err
13050 rm -f conftest.er1
13051 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013053 (exit $ac_status); } && {
13054 test -z "$ac_c_werror_flag" ||
13055 test ! -s conftest.err
13056 } && test -s conftest$ac_exeext &&
13057 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013058 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013059else
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013061sed 's/^/| /' conftest.$ac_ext >&5
13062
Martin v. Löwiseba40652007-08-30 20:10:57 +000013063 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013064fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065
13066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013068LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013069fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013070{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13071echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013072if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013073 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013074fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013075 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013076{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13077echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013078if test "${ac_cv_lib_socket_socket+set}" = set; then
13079 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013080else
Martin v. Löwis11437992002-04-12 09:54:03 +000013081 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013082LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013083cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013084/* confdefs.h. */
13085_ACEOF
13086cat confdefs.h >>conftest.$ac_ext
13087cat >>conftest.$ac_ext <<_ACEOF
13088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013089
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090/* Override any GCC internal prototype to avoid an error.
13091 Use char because int might match the return type of a GCC
13092 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013093#ifdef __cplusplus
13094extern "C"
13095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013096char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013097int
13098main ()
13099{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013100return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013101 ;
13102 return 0;
13103}
13104_ACEOF
13105rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013106if { (ac_try="$ac_link"
13107case "(($ac_try" in
13108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13109 *) ac_try_echo=$ac_try;;
13110esac
13111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13112 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013114 grep -v '^ *+' conftest.er1 >conftest.err
13115 rm -f conftest.er1
13116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013118 (exit $ac_status); } && {
13119 test -z "$ac_c_werror_flag" ||
13120 test ! -s conftest.err
13121 } && test -s conftest$ac_exeext &&
13122 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013124else
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013126sed 's/^/| /' conftest.$ac_ext >&5
13127
Martin v. Löwiseba40652007-08-30 20:10:57 +000013128 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013130
13131rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013132 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013133LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013134fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013135{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13136echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013137if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013138 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013139fi
13140 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013141
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013142case "$ac_sys_system" in
13143BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013144{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13145echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013146if test "${ac_cv_lib_net_socket+set}" = set; then
13147 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013148else
Martin v. Löwis11437992002-04-12 09:54:03 +000013149 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013150LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013152/* confdefs.h. */
13153_ACEOF
13154cat confdefs.h >>conftest.$ac_ext
13155cat >>conftest.$ac_ext <<_ACEOF
13156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013157
Martin v. Löwiseba40652007-08-30 20:10:57 +000013158/* Override any GCC internal prototype to avoid an error.
13159 Use char because int might match the return type of a GCC
13160 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013161#ifdef __cplusplus
13162extern "C"
13163#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013164char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013165int
13166main ()
13167{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013168return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013169 ;
13170 return 0;
13171}
13172_ACEOF
13173rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013174if { (ac_try="$ac_link"
13175case "(($ac_try" in
13176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13177 *) ac_try_echo=$ac_try;;
13178esac
13179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13180 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013182 grep -v '^ *+' conftest.er1 >conftest.err
13183 rm -f conftest.er1
13184 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013186 (exit $ac_status); } && {
13187 test -z "$ac_c_werror_flag" ||
13188 test ! -s conftest.err
13189 } && test -s conftest$ac_exeext &&
13190 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013192else
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013194sed 's/^/| /' conftest.$ac_ext >&5
13195
Martin v. Löwiseba40652007-08-30 20:10:57 +000013196 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013198
13199rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013200 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013201LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013202fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013203{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13204echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013205if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013206 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013207fi
13208 # BeOS
13209;;
13210esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013211
Martin v. Löwiseba40652007-08-30 20:10:57 +000013212{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13213echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Martin v. Löwiseba40652007-08-30 20:10:57 +000013215# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013216if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013217 withval=$with_libs;
13218{ echo "$as_me:$LINENO: result: $withval" >&5
13219echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013220LIBS="$withval $LIBS"
13221
13222else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013223 { echo "$as_me:$LINENO: result: no" >&5
13224echo "${ECHO_T}no" >&6; }
13225fi
13226
Guido van Rossum7f43da71994-08-01 12:15:30 +000013227
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013228# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013229{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13230echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013231
Martin v. Löwiseba40652007-08-30 20:10:57 +000013232# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013233if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013234 withval=$with_system_ffi;
13235fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013236
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013237
Martin v. Löwiseba40652007-08-30 20:10:57 +000013238{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13239echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013240
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013241# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013242
13243
Martin v. Löwiseba40652007-08-30 20:10:57 +000013244{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13245echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013246
Martin v. Löwiseba40652007-08-30 20:10:57 +000013247# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013248if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013249 withval=$with_signal_module;
13250fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013251
13252
13253if test -z "$with_signal_module"
13254then with_signal_module="yes"
13255fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013256{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
13257echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013258
13259if test "${with_signal_module}" = "yes"; then
13260 USE_SIGNAL_MODULE=""
13261 SIGNAL_OBJS=""
13262else
13263 USE_SIGNAL_MODULE="#"
13264 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13265fi
13266
Guido van Rossum3d15bd82001-01-10 18:53:48 +000013267# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000013268
Barry Warsawc0d24d82000-06-29 16:12:00 +000013269USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000013270
Martin v. Löwiseba40652007-08-30 20:10:57 +000013271{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
13272echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Guido van Rossumec2f0731997-01-22 20:54:01 +000013274
Martin v. Löwiseba40652007-08-30 20:10:57 +000013275# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013276if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013277 withval=$with_dec_threads;
13278{ echo "$as_me:$LINENO: result: $withval" >&5
13279echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000013280LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000013281if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000013282 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000013283fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013284else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013285 { echo "$as_me:$LINENO: result: no" >&5
13286echo "${ECHO_T}no" >&6; }
13287fi
13288
Martin v. Löwis11437992002-04-12 09:54:03 +000013289
13290# Templates for things AC_DEFINEd more than once.
13291# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013292
13293
Martin v. Löwis11437992002-04-12 09:54:03 +000013294
13295
13296
13297
13298
Martin v. Löwiseba40652007-08-30 20:10:57 +000013299{ echo "$as_me:$LINENO: checking for --with-threads" >&5
13300echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013301
Martin v. Löwiseba40652007-08-30 20:10:57 +000013302# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000013303if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013304 withval=$with_threads;
13305fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000013306
13307
Barry Warsawc0d24d82000-06-29 16:12:00 +000013308# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000013309
Martin v. Löwiseba40652007-08-30 20:10:57 +000013310# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013311if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013312 withval=$with_thread; with_threads=$with_thread
13313fi
13314
Barry Warsawc0d24d82000-06-29 16:12:00 +000013315
13316if test -z "$with_threads"
13317then with_threads="yes"
13318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319{ echo "$as_me:$LINENO: result: $with_threads" >&5
13320echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000013321
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013322
Barry Warsawc0d24d82000-06-29 16:12:00 +000013323if test "$with_threads" = "no"
13324then
13325 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013326elif test "$ac_cv_pthread_is_default" = yes
13327then
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013329#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013330_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013331
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013332 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013334#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013335_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013336
13337 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000013338 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013339elif test "$ac_cv_kpthread" = "yes"
13340then
13341 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013342 if test "$ac_cv_cxx_thread" = "yes"; then
13343 CXX="$CXX -Kpthread"
13344 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013345 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013346#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013347_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000013348
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013349 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013350 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013351elif test "$ac_cv_kthread" = "yes"
13352then
13353 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013354 if test "$ac_cv_cxx_thread" = "yes"; then
13355 CXX="$CXX -Kthread"
13356 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013357 cat >>confdefs.h <<\_ACEOF
13358#define WITH_THREAD 1
13359_ACEOF
13360
13361 posix_threads=yes
13362 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013363elif test "$ac_cv_pthread" = "yes"
13364then
13365 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000013366 if test "$ac_cv_cxx_thread" = "yes"; then
13367 CXX="$CXX -pthread"
13368 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013369 cat >>confdefs.h <<\_ACEOF
13370#define WITH_THREAD 1
13371_ACEOF
13372
13373 posix_threads=yes
13374 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013375else
13376 if test ! -z "$with_threads" -a -d "$with_threads"
13377 then LDFLAGS="$LDFLAGS -L$with_threads"
13378 fi
13379 if test ! -z "$withval" -a -d "$withval"
13380 then LDFLAGS="$LDFLAGS -L$withval"
13381 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013382
13383 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000013384 # define _POSIX_THREADS in unistd.h. Some apparently don't
13385 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
13387echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013389/* confdefs.h. */
13390_ACEOF
13391cat confdefs.h >>conftest.$ac_ext
13392cat >>conftest.$ac_ext <<_ACEOF
13393/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013394
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013395#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013396#ifdef _POSIX_THREADS
13397yes
13398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
13400_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013401if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013402 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013403 unistd_defines_pthreads=yes
13404else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013405 unistd_defines_pthreads=no
13406fi
13407rm -f conftest*
13408
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
13410echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013413#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013414_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
13418echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013419if test "${ac_cv_header_cthreads_h+set}" = set; then
13420 echo $ECHO_N "(cached) $ECHO_C" >&6
13421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013422{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13423echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013424else
Martin v. Löwis11437992002-04-12 09:54:03 +000013425 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013426{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
13427echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013429/* confdefs.h. */
13430_ACEOF
13431cat confdefs.h >>conftest.$ac_ext
13432cat >>conftest.$ac_ext <<_ACEOF
13433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013434$ac_includes_default
13435#include <cthreads.h>
13436_ACEOF
13437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438if { (ac_try="$ac_compile"
13439case "(($ac_try" in
13440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13441 *) ac_try_echo=$ac_try;;
13442esac
13443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013446 grep -v '^ *+' conftest.er1 >conftest.err
13447 rm -f conftest.er1
13448 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013450 (exit $ac_status); } && {
13451 test -z "$ac_c_werror_flag" ||
13452 test ! -s conftest.err
13453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 ac_header_compiler=yes
13455else
13456 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013457sed 's/^/| /' conftest.$ac_ext >&5
13458
Martin v. Löwiseba40652007-08-30 20:10:57 +000013459 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013461
13462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13463{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13464echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
13466# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013467{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
13468echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013469cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013470/* confdefs.h. */
13471_ACEOF
13472cat confdefs.h >>conftest.$ac_ext
13473cat >>conftest.$ac_ext <<_ACEOF
13474/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013475#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013476_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013477if { (ac_try="$ac_cpp conftest.$ac_ext"
13478case "(($ac_try" in
13479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13480 *) ac_try_echo=$ac_try;;
13481esac
13482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13483 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013484 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013485 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 rm -f conftest.er1
13487 cat conftest.err >&5
13488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013489 (exit $ac_status); } >/dev/null && {
13490 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13491 test ! -s conftest.err
13492 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013493 ac_header_preproc=yes
13494else
13495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013496sed 's/^/| /' conftest.$ac_ext >&5
13497
Martin v. Löwis11437992002-04-12 09:54:03 +000013498 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013500
Martin v. Löwis11437992002-04-12 09:54:03 +000013501rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013502{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13503echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013504
13505# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013506case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13507 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013508 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13509echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013510 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
13511echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
13512 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013513 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013514 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013515 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
13516echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013517 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
13518echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
13519 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
13520echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
13521 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13522echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013523 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
13524echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013525 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
13526echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013527 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013528## ------------------------------------------------ ##
13529## Report this to http://www.python.org/python-bugs ##
13530## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013531_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013532 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013533 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013534esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013535{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
13536echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013537if test "${ac_cv_header_cthreads_h+set}" = set; then
13538 echo $ECHO_N "(cached) $ECHO_C" >&6
13539else
13540 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013542{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
13543echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013544
13545fi
13546if test $ac_cv_header_cthreads_h = yes; then
13547 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013548#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013549_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013550
Martin v. Löwis11437992002-04-12 09:54:03 +000013551 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013552#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013553_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013554
Martin v. Löwis11437992002-04-12 09:54:03 +000013555
13556cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013557#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013558_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013559
13560 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013561 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013562else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013563
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013565 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13566echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013567if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13568 echo $ECHO_N "(cached) $ECHO_C" >&6
13569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013570{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13571echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013572else
Martin v. Löwis11437992002-04-12 09:54:03 +000013573 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013574{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
13575echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013577/* confdefs.h. */
13578_ACEOF
13579cat confdefs.h >>conftest.$ac_ext
13580cat >>conftest.$ac_ext <<_ACEOF
13581/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013582$ac_includes_default
13583#include <mach/cthreads.h>
13584_ACEOF
13585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013586if { (ac_try="$ac_compile"
13587case "(($ac_try" in
13588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13589 *) ac_try_echo=$ac_try;;
13590esac
13591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013594 grep -v '^ *+' conftest.er1 >conftest.err
13595 rm -f conftest.er1
13596 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013598 (exit $ac_status); } && {
13599 test -z "$ac_c_werror_flag" ||
13600 test ! -s conftest.err
13601 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ac_header_compiler=yes
13603else
13604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013605sed 's/^/| /' conftest.$ac_ext >&5
13606
Martin v. Löwiseba40652007-08-30 20:10:57 +000013607 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013609
13610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13611{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13612echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
13614# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013615{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
13616echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013617cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013618/* confdefs.h. */
13619_ACEOF
13620cat confdefs.h >>conftest.$ac_ext
13621cat >>conftest.$ac_ext <<_ACEOF
13622/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013623#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013624_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013625if { (ac_try="$ac_cpp conftest.$ac_ext"
13626case "(($ac_try" in
13627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13628 *) ac_try_echo=$ac_try;;
13629esac
13630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13631 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013632 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013633 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 rm -f conftest.er1
13635 cat conftest.err >&5
13636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013637 (exit $ac_status); } >/dev/null && {
13638 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13639 test ! -s conftest.err
13640 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 ac_header_preproc=yes
13642else
13643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013644sed 's/^/| /' conftest.$ac_ext >&5
13645
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013647fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013648
Martin v. Löwis11437992002-04-12 09:54:03 +000013649rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013650{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13651echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
13653# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013654case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13655 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013656 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13657echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013658 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
13659echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
13660 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013661 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013662 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013663 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
13664echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013665 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
13666echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
13667 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
13668echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
13669 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
13670echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013671 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
13672echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013673 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
13674echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013675 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013676## ------------------------------------------------ ##
13677## Report this to http://www.python.org/python-bugs ##
13678## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013679_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013680 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013681 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013682esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013683{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
13684echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013685if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
13686 echo $ECHO_N "(cached) $ECHO_C" >&6
13687else
13688 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013690{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
13691echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013692
13693fi
13694if test $ac_cv_header_mach_cthreads_h = yes; then
13695 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013696#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013697_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013698
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013700#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013701_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013702
Martin v. Löwis11437992002-04-12 09:54:03 +000013703
13704cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013705#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013706_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013707
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013708 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013709else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013710
Martin v. Löwiseba40652007-08-30 20:10:57 +000013711 { echo "$as_me:$LINENO: checking for --with-pth" >&5
13712echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013713
Martin v. Löwiseba40652007-08-30 20:10:57 +000013714# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013715if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013716 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
13717echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013718 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000013719#define WITH_THREAD 1
13720_ACEOF
13721
13722
13723cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013724#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013725_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013726
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013727 LIBS="-lpth $LIBS"
13728 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000013729else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013730 { echo "$as_me:$LINENO: result: no" >&5
13731echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013732
13733 # Just looking for pthread_create in libpthread is not enough:
13734 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
13735 # So we really have to include pthread.h, and then link.
13736 _libs=$LIBS
13737 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013738 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
13739echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013741/* confdefs.h. */
13742_ACEOF
13743cat confdefs.h >>conftest.$ac_ext
13744cat >>conftest.$ac_ext <<_ACEOF
13745/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013746#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000013747
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013748void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000013749int
13750main ()
13751{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013752
13753pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000013754 ;
13755 return 0;
13756}
13757_ACEOF
13758rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013759if { (ac_try="$ac_link"
13760case "(($ac_try" in
13761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13762 *) ac_try_echo=$ac_try;;
13763esac
13764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13765 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013767 grep -v '^ *+' conftest.er1 >conftest.err
13768 rm -f conftest.er1
13769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013771 (exit $ac_status); } && {
13772 test -z "$ac_c_werror_flag" ||
13773 test ! -s conftest.err
13774 } && test -s conftest$ac_exeext &&
13775 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013776
Martin v. Löwiseba40652007-08-30 20:10:57 +000013777 { echo "$as_me:$LINENO: result: yes" >&5
13778echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013779 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013780#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013781_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000013782
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013783 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013784 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000013785else
Martin v. Löwis11437992002-04-12 09:54:03 +000013786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013787sed 's/^/| /' conftest.$ac_ext >&5
13788
Martin v. Löwis11437992002-04-12 09:54:03 +000013789
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000013790 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000013791 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
13792echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013793if test "${ac_cv_func_pthread_detach+set}" = set; then
13794 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013795else
Martin v. Löwis11437992002-04-12 09:54:03 +000013796 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013797/* confdefs.h. */
13798_ACEOF
13799cat confdefs.h >>conftest.$ac_ext
13800cat >>conftest.$ac_ext <<_ACEOF
13801/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013802/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
13803 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13804#define pthread_detach innocuous_pthread_detach
13805
Guido van Rossumad678af1998-10-02 14:42:15 +000013806/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013807 which can conflict with char pthread_detach (); below.
13808 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013809 <limits.h> exists even on freestanding compilers. */
13810
13811#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013812# include <limits.h>
13813#else
13814# include <assert.h>
13815#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013816
13817#undef pthread_detach
13818
Martin v. Löwiseba40652007-08-30 20:10:57 +000013819/* Override any GCC internal prototype to avoid an error.
13820 Use char because int might match the return type of a GCC
13821 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822#ifdef __cplusplus
13823extern "C"
13824#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013825char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013826/* The GNU C library defines this for functions which it implements
13827 to always fail with ENOSYS. Some functions are actually named
13828 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013829#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000013830choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000013831#endif
13832
Skip Montanaro6dead952003-09-25 14:50:04 +000013833int
13834main ()
13835{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013836return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013837 ;
13838 return 0;
13839}
13840_ACEOF
13841rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013842if { (ac_try="$ac_link"
13843case "(($ac_try" in
13844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13845 *) ac_try_echo=$ac_try;;
13846esac
13847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13848 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013849 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013850 grep -v '^ *+' conftest.er1 >conftest.err
13851 rm -f conftest.er1
13852 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013854 (exit $ac_status); } && {
13855 test -z "$ac_c_werror_flag" ||
13856 test ! -s conftest.err
13857 } && test -s conftest$ac_exeext &&
13858 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013860else
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013862sed 's/^/| /' conftest.$ac_ext >&5
13863
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013866
13867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013868 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013870{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13871echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013872if test $ac_cv_func_pthread_detach = yes; then
13873 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013874#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013875_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013876
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013877 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013878 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013879else
Guido van Rossumad678af1998-10-02 14:42:15 +000013880
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013881 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013882 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13883echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013884if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13885 echo $ECHO_N "(cached) $ECHO_C" >&6
13886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13888echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013889else
13890 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13892echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013893cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013894/* confdefs.h. */
13895_ACEOF
13896cat confdefs.h >>conftest.$ac_ext
13897cat >>conftest.$ac_ext <<_ACEOF
13898/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013899$ac_includes_default
13900#include <atheos/threads.h>
13901_ACEOF
13902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903if { (ac_try="$ac_compile"
13904case "(($ac_try" in
13905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13906 *) ac_try_echo=$ac_try;;
13907esac
13908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013911 grep -v '^ *+' conftest.er1 >conftest.err
13912 rm -f conftest.er1
13913 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013915 (exit $ac_status); } && {
13916 test -z "$ac_c_werror_flag" ||
13917 test ! -s conftest.err
13918 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013919 ac_header_compiler=yes
13920else
13921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013922sed 's/^/| /' conftest.$ac_ext >&5
13923
Martin v. Löwiseba40652007-08-30 20:10:57 +000013924 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013926
13927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13928{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13929echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013930
13931# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000013932{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13933echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013935/* confdefs.h. */
13936_ACEOF
13937cat confdefs.h >>conftest.$ac_ext
13938cat >>conftest.$ac_ext <<_ACEOF
13939/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013940#include <atheos/threads.h>
13941_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942if { (ac_try="$ac_cpp conftest.$ac_ext"
13943case "(($ac_try" in
13944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13945 *) ac_try_echo=$ac_try;;
13946esac
13947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13948 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013949 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013950 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013951 rm -f conftest.er1
13952 cat conftest.err >&5
13953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013954 (exit $ac_status); } >/dev/null && {
13955 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13956 test ! -s conftest.err
13957 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013958 ac_header_preproc=yes
13959else
13960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013961sed 's/^/| /' conftest.$ac_ext >&5
13962
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013963 ac_header_preproc=no
13964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013965
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013966rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13968echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013969
13970# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013971case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13972 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013973 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13974echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013975 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13976echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13977 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013978 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013979 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013980 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13981echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013982 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13983echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13984 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13985echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13986 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13987echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013988 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13989echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013990 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13991echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013993## ------------------------------------------------ ##
13994## Report this to http://www.python.org/python-bugs ##
13995## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013996_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000013997 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013998 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013999esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014000{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14001echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014002if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14003 echo $ECHO_N "(cached) $ECHO_C" >&6
14004else
14005 ac_cv_header_atheos_threads_h=$ac_header_preproc
14006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014007{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14008echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014009
14010fi
14011if test $ac_cv_header_atheos_threads_h = yes; then
14012 cat >>confdefs.h <<\_ACEOF
14013#define WITH_THREAD 1
14014_ACEOF
14015
14016
14017cat >>confdefs.h <<\_ACEOF
14018#define ATHEOS_THREADS 1
14019_ACEOF
14020
14021 THREADOBJ="Python/thread.o"
14022else
14023
Martin v. Löwis11437992002-04-12 09:54:03 +000014024 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014025 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14026echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014027if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14028 echo $ECHO_N "(cached) $ECHO_C" >&6
14029fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14031echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014032else
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014034{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14035echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014037/* confdefs.h. */
14038_ACEOF
14039cat confdefs.h >>conftest.$ac_ext
14040cat >>conftest.$ac_ext <<_ACEOF
14041/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014042$ac_includes_default
14043#include <kernel/OS.h>
14044_ACEOF
14045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014046if { (ac_try="$ac_compile"
14047case "(($ac_try" in
14048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14049 *) ac_try_echo=$ac_try;;
14050esac
14051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014054 grep -v '^ *+' conftest.er1 >conftest.err
14055 rm -f conftest.er1
14056 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014058 (exit $ac_status); } && {
14059 test -z "$ac_c_werror_flag" ||
14060 test ! -s conftest.err
14061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014062 ac_header_compiler=yes
14063else
14064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014065sed 's/^/| /' conftest.$ac_ext >&5
14066
Martin v. Löwiseba40652007-08-30 20:10:57 +000014067 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014069
14070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14071{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14072echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014073
14074# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014075{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14076echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014077cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014078/* confdefs.h. */
14079_ACEOF
14080cat confdefs.h >>conftest.$ac_ext
14081cat >>conftest.$ac_ext <<_ACEOF
14082/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014083#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014084_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085if { (ac_try="$ac_cpp conftest.$ac_ext"
14086case "(($ac_try" in
14087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14088 *) ac_try_echo=$ac_try;;
14089esac
14090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14091 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014093 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014094 rm -f conftest.er1
14095 cat conftest.err >&5
14096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014097 (exit $ac_status); } >/dev/null && {
14098 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14099 test ! -s conftest.err
14100 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 ac_header_preproc=yes
14102else
14103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014104sed 's/^/| /' conftest.$ac_ext >&5
14105
Martin v. Löwis11437992002-04-12 09:54:03 +000014106 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108
Martin v. Löwis11437992002-04-12 09:54:03 +000014109rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014110{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14111echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014112
Martin v. Löwis11437992002-04-12 09:54:03 +000014113# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014114case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14115 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014116 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14117echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014118 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14119echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14120 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014121 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014122 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014123 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14124echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014125 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14126echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14127 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14128echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14129 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14130echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014131 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14132echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014133 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14134echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014135 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014136## ------------------------------------------------ ##
14137## Report this to http://www.python.org/python-bugs ##
14138## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014139_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014140 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014141 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014142esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014143{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14144echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014145if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14146 echo $ECHO_N "(cached) $ECHO_C" >&6
14147else
14148 ac_cv_header_kernel_OS_h=$ac_header_preproc
14149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14151echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014152
14153fi
14154if test $ac_cv_header_kernel_OS_h = yes; then
14155 cat >>confdefs.h <<\_ACEOF
14156#define WITH_THREAD 1
14157_ACEOF
14158
14159
14160cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014161#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014162_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014163
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014164 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014165else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014166
Martin v. Löwiseba40652007-08-30 20:10:57 +000014167 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14168echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014169if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14170 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014171else
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014173LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014175/* confdefs.h. */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Martin v. Löwiseba40652007-08-30 20:10:57 +000014181/* Override any GCC internal prototype to avoid an error.
14182 Use char because int might match the return type of a GCC
14183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014184#ifdef __cplusplus
14185extern "C"
14186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014187char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014188int
14189main ()
14190{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014191return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 ;
14193 return 0;
14194}
14195_ACEOF
14196rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197if { (ac_try="$ac_link"
14198case "(($ac_try" in
14199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14200 *) ac_try_echo=$ac_try;;
14201esac
14202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14203 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014205 grep -v '^ *+' conftest.er1 >conftest.err
14206 rm -f conftest.er1
14207 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014209 (exit $ac_status); } && {
14210 test -z "$ac_c_werror_flag" ||
14211 test ! -s conftest.err
14212 } && test -s conftest$ac_exeext &&
14213 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014214 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014215else
Martin v. Löwis11437992002-04-12 09:54:03 +000014216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014217sed 's/^/| /' conftest.$ac_ext >&5
14218
Martin v. Löwiseba40652007-08-30 20:10:57 +000014219 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221
14222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014223 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014224LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014226{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14227echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014228if test $ac_cv_lib_pthreads_pthread_create = yes; then
14229 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014230#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014231_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014233 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014234 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014235 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014236else
Greg Steinadf63d62000-07-05 10:38:09 +000014237
Martin v. Löwiseba40652007-08-30 20:10:57 +000014238 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14239echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014240if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14241 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014242else
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014244LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014246/* confdefs.h. */
14247_ACEOF
14248cat confdefs.h >>conftest.$ac_ext
14249cat >>conftest.$ac_ext <<_ACEOF
14250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014251
Martin v. Löwiseba40652007-08-30 20:10:57 +000014252/* Override any GCC internal prototype to avoid an error.
14253 Use char because int might match the return type of a GCC
14254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014255#ifdef __cplusplus
14256extern "C"
14257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014258char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014259int
14260main ()
14261{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014262return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014263 ;
14264 return 0;
14265}
14266_ACEOF
14267rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014268if { (ac_try="$ac_link"
14269case "(($ac_try" in
14270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14271 *) ac_try_echo=$ac_try;;
14272esac
14273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014276 grep -v '^ *+' conftest.er1 >conftest.err
14277 rm -f conftest.er1
14278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280 (exit $ac_status); } && {
14281 test -z "$ac_c_werror_flag" ||
14282 test ! -s conftest.err
14283 } && test -s conftest$ac_exeext &&
14284 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014285 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014286else
Martin v. Löwis11437992002-04-12 09:54:03 +000014287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014288sed 's/^/| /' conftest.$ac_ext >&5
14289
Martin v. Löwiseba40652007-08-30 20:10:57 +000014290 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014292
14293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014295LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014297{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14298echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014299if test $ac_cv_lib_c_r_pthread_create = yes; then
14300 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014301#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014302_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014304 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014305 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014306 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014307else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014308
Martin v. Löwiseba40652007-08-30 20:10:57 +000014309 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14310echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014311if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
14312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014313else
Martin v. Löwis11437992002-04-12 09:54:03 +000014314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014315LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014317/* confdefs.h. */
14318_ACEOF
14319cat confdefs.h >>conftest.$ac_ext
14320cat >>conftest.$ac_ext <<_ACEOF
14321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014322
Martin v. Löwiseba40652007-08-30 20:10:57 +000014323/* Override any GCC internal prototype to avoid an error.
14324 Use char because int might match the return type of a GCC
14325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014326#ifdef __cplusplus
14327extern "C"
14328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014329char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014330int
14331main ()
14332{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014334 ;
14335 return 0;
14336}
14337_ACEOF
14338rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014339if { (ac_try="$ac_link"
14340case "(($ac_try" in
14341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14342 *) ac_try_echo=$ac_try;;
14343esac
14344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14345 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014347 grep -v '^ *+' conftest.er1 >conftest.err
14348 rm -f conftest.er1
14349 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014351 (exit $ac_status); } && {
14352 test -z "$ac_c_werror_flag" ||
14353 test ! -s conftest.err
14354 } && test -s conftest$ac_exeext &&
14355 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014356 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014359sed 's/^/| /' conftest.$ac_ext >&5
14360
Martin v. Löwiseba40652007-08-30 20:10:57 +000014361 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014363
14364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014368{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14369echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014370if test $ac_cv_lib_pthread___pthread_create_system = yes; then
14371 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014372#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014373_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014374
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014375 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014376 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014377 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014378else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014379
Martin v. Löwiseba40652007-08-30 20:10:57 +000014380 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14381echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014382if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
14383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014384else
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014386LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014388/* confdefs.h. */
14389_ACEOF
14390cat confdefs.h >>conftest.$ac_ext
14391cat >>conftest.$ac_ext <<_ACEOF
14392/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014393
Martin v. Löwiseba40652007-08-30 20:10:57 +000014394/* Override any GCC internal prototype to avoid an error.
14395 Use char because int might match the return type of a GCC
14396 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014397#ifdef __cplusplus
14398extern "C"
14399#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014400char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014401int
14402main ()
14403{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014404return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ;
14406 return 0;
14407}
14408_ACEOF
14409rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014410if { (ac_try="$ac_link"
14411case "(($ac_try" in
14412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14413 *) ac_try_echo=$ac_try;;
14414esac
14415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14416 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014418 grep -v '^ *+' conftest.er1 >conftest.err
14419 rm -f conftest.er1
14420 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014422 (exit $ac_status); } && {
14423 test -z "$ac_c_werror_flag" ||
14424 test ! -s conftest.err
14425 } && test -s conftest$ac_exeext &&
14426 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000014428else
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014430sed 's/^/| /' conftest.$ac_ext >&5
14431
Martin v. Löwiseba40652007-08-30 20:10:57 +000014432 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000014433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014434
14435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014436 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014437LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000014438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014439{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
14440echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014441if test $ac_cv_lib_cma_pthread_create = yes; then
14442 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014443#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014444_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000014445
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014446 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014447 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014448 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000014449else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000014450
Martin v. Löwis130fb172001-07-19 11:00:41 +000014451 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000014452fi
14453
Guido van Rossum627b2d71993-12-24 10:39:16 +000014454
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014455fi
14456
Guido van Rossum0be3e491997-05-22 20:33:33 +000014457fi
14458
Guido van Rossum49545951997-12-02 19:28:29 +000014459fi
14460
Guido van Rossumb93a8621998-05-07 13:27:32 +000014461fi
14462
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014463
Michael W. Hudson54241132001-12-07 15:38:26 +000014464fi
14465
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014466
14467fi
14468
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014470
14471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014473fi
14474
Martin v. Löwis11437992002-04-12 09:54:03 +000014475fi
14476
14477
14478fi
14479
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014480
Michael W. Hudson54241132001-12-07 15:38:26 +000014481
Martin v. Löwiseba40652007-08-30 20:10:57 +000014482 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
14483echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014484if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
14485 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014486else
Martin v. Löwis11437992002-04-12 09:54:03 +000014487 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014488LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014490/* confdefs.h. */
14491_ACEOF
14492cat confdefs.h >>conftest.$ac_ext
14493cat >>conftest.$ac_ext <<_ACEOF
14494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014495
Martin v. Löwiseba40652007-08-30 20:10:57 +000014496/* Override any GCC internal prototype to avoid an error.
14497 Use char because int might match the return type of a GCC
14498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014499#ifdef __cplusplus
14500extern "C"
14501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014502char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014503int
14504main ()
14505{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014506return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 ;
14508 return 0;
14509}
14510_ACEOF
14511rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014512if { (ac_try="$ac_link"
14513case "(($ac_try" in
14514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14515 *) ac_try_echo=$ac_try;;
14516esac
14517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014520 grep -v '^ *+' conftest.er1 >conftest.err
14521 rm -f conftest.er1
14522 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014524 (exit $ac_status); } && {
14525 test -z "$ac_c_werror_flag" ||
14526 test ! -s conftest.err
14527 } && test -s conftest$ac_exeext &&
14528 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014529 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014532sed 's/^/| /' conftest.$ac_ext >&5
14533
Martin v. Löwiseba40652007-08-30 20:10:57 +000014534 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536
14537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014539LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
14542echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014543if test $ac_cv_lib_mpc_usconfig = yes; then
14544 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014545#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014546_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014547
Martin v. Löwis130fb172001-07-19 11:00:41 +000014548 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014549 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014550 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014551fi
14552
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014553
Neal Norwitza978ab02002-11-02 16:58:05 +000014554 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014555 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
14556echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014557if test "${ac_cv_lib_thread_thr_create+set}" = set; then
14558 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014559else
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014561LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014562cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014563/* confdefs.h. */
14564_ACEOF
14565cat confdefs.h >>conftest.$ac_ext
14566cat >>conftest.$ac_ext <<_ACEOF
14567/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014568
Martin v. Löwiseba40652007-08-30 20:10:57 +000014569/* Override any GCC internal prototype to avoid an error.
14570 Use char because int might match the return type of a GCC
14571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014572#ifdef __cplusplus
14573extern "C"
14574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014575char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014576int
14577main ()
14578{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014579return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014580 ;
14581 return 0;
14582}
14583_ACEOF
14584rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014585if { (ac_try="$ac_link"
14586case "(($ac_try" in
14587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14588 *) ac_try_echo=$ac_try;;
14589esac
14590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14591 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014592 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014593 grep -v '^ *+' conftest.er1 >conftest.err
14594 rm -f conftest.er1
14595 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597 (exit $ac_status); } && {
14598 test -z "$ac_c_werror_flag" ||
14599 test ! -s conftest.err
14600 } && test -s conftest$ac_exeext &&
14601 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014603else
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014605sed 's/^/| /' conftest.$ac_ext >&5
14606
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014609
14610rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014611 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014612LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
14615echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014616if test $ac_cv_lib_thread_thr_create = yes; then
14617 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014618#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014619_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014620
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014621 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014622 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014623 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000014624fi
14625
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000014626 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000014627
Martin v. Löwis130fb172001-07-19 11:00:41 +000014628 if test "$USE_THREAD_MODULE" != "#"
14629 then
14630 # If the above checks didn't disable threads, (at least) OSF1
14631 # needs this '-threads' argument during linking.
14632 case $ac_sys_system in
14633 OSF1) LDLAST=-threads;;
14634 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000014635 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014636fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014637
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014638if test "$posix_threads" = "yes"; then
14639 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014640
14641cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014642#define _POSIX_THREADS 1
14643_ACEOF
14644
14645 fi
14646
14647 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
14648 case $ac_sys_system/$ac_sys_release in
14649 SunOS/5.6)
14650cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014651#define HAVE_PTHREAD_DESTRUCTOR 1
14652_ACEOF
14653
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014654 ;;
14655 SunOS/5.8)
14656cat >>confdefs.h <<\_ACEOF
14657#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14658_ACEOF
14659
14660 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000014661 AIX/5)
14662cat >>confdefs.h <<\_ACEOF
14663#define HAVE_BROKEN_POSIX_SEMAPHORES 1
14664_ACEOF
14665
14666 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014667 esac
14668
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
14670echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014671 if test "${ac_cv_pthread_system_supported+set}" = set; then
14672 echo $ECHO_N "(cached) $ECHO_C" >&6
14673else
14674 if test "$cross_compiling" = yes; then
14675 ac_cv_pthread_system_supported=no
14676else
14677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014678/* confdefs.h. */
14679_ACEOF
14680cat confdefs.h >>conftest.$ac_ext
14681cat >>conftest.$ac_ext <<_ACEOF
14682/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014683#include <pthread.h>
14684 void *foo(void *parm) {
14685 return NULL;
14686 }
14687 main() {
14688 pthread_attr_t attr;
14689 pthread_t id;
14690 if (pthread_attr_init(&attr)) exit(-1);
14691 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
14692 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
14693 exit(0);
14694 }
14695_ACEOF
14696rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014697if { (ac_try="$ac_link"
14698case "(($ac_try" in
14699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14700 *) ac_try_echo=$ac_try;;
14701esac
14702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14703 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014704 ac_status=$?
14705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14706 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014707 { (case "(($ac_try" in
14708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14709 *) ac_try_echo=$ac_try;;
14710esac
14711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14712 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); }; }; then
14716 ac_cv_pthread_system_supported=yes
14717else
14718 echo "$as_me: program exited with status $ac_status" >&5
14719echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014720sed 's/^/| /' conftest.$ac_ext >&5
14721
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014722( exit $ac_status )
14723ac_cv_pthread_system_supported=no
14724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014725rm -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 +000014726fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000014727
Martin v. Löwiseba40652007-08-30 20:10:57 +000014728
14729
Guido van Rossum627b2d71993-12-24 10:39:16 +000014730fi
14731
Martin v. Löwiseba40652007-08-30 20:10:57 +000014732 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
14733echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014734 if test "$ac_cv_pthread_system_supported" = "yes"; then
14735
14736cat >>confdefs.h <<\_ACEOF
14737#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
14738_ACEOF
14739
14740 fi
14741
14742for ac_func in pthread_sigmask
14743do
14744as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000014745{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14746echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14747if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014748 echo $ECHO_N "(cached) $ECHO_C" >&6
14749else
14750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014751/* confdefs.h. */
14752_ACEOF
14753cat confdefs.h >>conftest.$ac_ext
14754cat >>conftest.$ac_ext <<_ACEOF
14755/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014756/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14758#define $ac_func innocuous_$ac_func
14759
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014760/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014761 which can conflict with char $ac_func (); below.
14762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014763 <limits.h> exists even on freestanding compilers. */
14764
14765#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014766# include <limits.h>
14767#else
14768# include <assert.h>
14769#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014770
14771#undef $ac_func
14772
Martin v. Löwiseba40652007-08-30 20:10:57 +000014773/* Override any GCC internal prototype to avoid an error.
14774 Use char because int might match the return type of a GCC
14775 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014776#ifdef __cplusplus
14777extern "C"
14778#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014779char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014780/* The GNU C library defines this for functions which it implements
14781 to always fail with ENOSYS. Some functions are actually named
14782 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014783#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014784choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014785#endif
14786
Skip Montanaro6dead952003-09-25 14:50:04 +000014787int
14788main ()
14789{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014790return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014791 ;
14792 return 0;
14793}
14794_ACEOF
14795rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014796if { (ac_try="$ac_link"
14797case "(($ac_try" in
14798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14799 *) ac_try_echo=$ac_try;;
14800esac
14801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14802 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014804 grep -v '^ *+' conftest.er1 >conftest.err
14805 rm -f conftest.er1
14806 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014808 (exit $ac_status); } && {
14809 test -z "$ac_c_werror_flag" ||
14810 test ! -s conftest.err
14811 } && test -s conftest$ac_exeext &&
14812 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014813 eval "$as_ac_var=yes"
14814else
14815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014816sed 's/^/| /' conftest.$ac_ext >&5
14817
Martin v. Löwiseba40652007-08-30 20:10:57 +000014818 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820
14821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014822 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014824ac_res=`eval echo '${'$as_ac_var'}'`
14825 { echo "$as_me:$LINENO: result: $ac_res" >&5
14826echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014827if test `eval echo '${'$as_ac_var'}'` = yes; then
14828 cat >>confdefs.h <<_ACEOF
14829#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14830_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014831 case $ac_sys_system in
14832 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014833
Jason Tishlerfac083d2003-07-22 15:20:49 +000014834cat >>confdefs.h <<\_ACEOF
14835#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14836_ACEOF
14837
14838 ;;
14839 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014840fi
14841done
14842
14843fi
14844
14845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014846# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014847
14848
Martin v. Löwiseba40652007-08-30 20:10:57 +000014849{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14850echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
14851# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014852if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014853 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014854 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014855 { echo "$as_me:$LINENO: result: no" >&5
14856echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014857 ipv6=no
14858 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014859 *) { echo "$as_me:$LINENO: result: yes" >&5
14860echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014862#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014863_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014864
14865 ipv6=yes
14866 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014868else
Martin v. Löwis11437992002-04-12 09:54:03 +000014869
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014870 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014871 { echo "$as_me:$LINENO: result: no" >&5
14872echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014873 ipv6=no
14874
14875else
Martin v. Löwis11437992002-04-12 09:54:03 +000014876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014877/* confdefs.h. */
14878_ACEOF
14879cat confdefs.h >>conftest.$ac_ext
14880cat >>conftest.$ac_ext <<_ACEOF
14881/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014882 /* AF_INET6 available check */
14883#include <sys/types.h>
14884#include <sys/socket.h>
14885main()
14886{
14887 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14888 exit(1);
14889 else
14890 exit(0);
14891}
14892
Martin v. Löwis11437992002-04-12 09:54:03 +000014893_ACEOF
14894rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014895if { (ac_try="$ac_link"
14896case "(($ac_try" in
14897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14898 *) ac_try_echo=$ac_try;;
14899esac
14900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14901 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 ac_status=$?
14903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14904 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014905 { (case "(($ac_try" in
14906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14907 *) ac_try_echo=$ac_try;;
14908esac
14909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14910 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 ac_status=$?
14912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14913 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014914 { echo "$as_me:$LINENO: result: yes" >&5
14915echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014916 ipv6=yes
14917else
Martin v. Löwis11437992002-04-12 09:54:03 +000014918 echo "$as_me: program exited with status $ac_status" >&5
14919echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014920sed 's/^/| /' conftest.$ac_ext >&5
14921
Martin v. Löwis11437992002-04-12 09:54:03 +000014922( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000014923{ echo "$as_me:$LINENO: result: no" >&5
14924echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014925 ipv6=no
14926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014927rm -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 +000014928fi
14929
Martin v. Löwiseba40652007-08-30 20:10:57 +000014930
14931
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014932if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014933 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14934echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014936/* confdefs.h. */
14937_ACEOF
14938cat confdefs.h >>conftest.$ac_ext
14939cat >>conftest.$ac_ext <<_ACEOF
14940/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014941#include <sys/types.h>
14942#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014943int
14944main ()
14945{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014946struct sockaddr_in6 x;
14947x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 ;
14949 return 0;
14950}
14951_ACEOF
14952rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953if { (ac_try="$ac_compile"
14954case "(($ac_try" in
14955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14956 *) ac_try_echo=$ac_try;;
14957esac
14958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014961 grep -v '^ *+' conftest.er1 >conftest.err
14962 rm -f conftest.er1
14963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965 (exit $ac_status); } && {
14966 test -z "$ac_c_werror_flag" ||
14967 test ! -s conftest.err
14968 } && test -s conftest.$ac_objext; then
14969 { echo "$as_me:$LINENO: result: yes" >&5
14970echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014971 ipv6=yes
14972else
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014974sed 's/^/| /' conftest.$ac_ext >&5
14975
Martin v. Löwiseba40652007-08-30 20:10:57 +000014976 { echo "$as_me:$LINENO: result: no" >&5
14977echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014978 ipv6=no
14979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014980
14981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014982fi
14983
14984if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014986#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014987_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014988
14989fi
14990
Martin v. Löwiseba40652007-08-30 20:10:57 +000014991fi
14992
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014993
14994ipv6type=unknown
14995ipv6lib=none
14996ipv6trylibc=no
14997
14998if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014999 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15000echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015001 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15002 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015003 case $i in
15004 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015006/* confdefs.h. */
15007_ACEOF
15008cat confdefs.h >>conftest.$ac_ext
15009cat >>conftest.$ac_ext <<_ACEOF
15010/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015011
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015012#include <netinet/in.h>
15013#ifdef IPV6_INRIA_VERSION
15014yes
15015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015016_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015018 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015019 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015020fi
15021rm -f conftest*
15022
15023 ;;
15024 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015026/* confdefs.h. */
15027_ACEOF
15028cat confdefs.h >>conftest.$ac_ext
15029cat >>conftest.$ac_ext <<_ACEOF
15030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015032#include <netinet/in.h>
15033#ifdef __KAME__
15034yes
15035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015038 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015039 ipv6type=$i;
15040 ipv6lib=inet6
15041 ipv6libdir=/usr/local/v6/lib
15042 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015043fi
15044rm -f conftest*
15045
15046 ;;
15047 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015049/* confdefs.h. */
15050_ACEOF
15051cat confdefs.h >>conftest.$ac_ext
15052cat >>conftest.$ac_ext <<_ACEOF
15053/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015054
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015055#include <features.h>
15056#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15057yes
15058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015059_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015061 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015062 ipv6type=$i;
15063 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015064fi
15065rm -f conftest*
15066
15067 ;;
15068 linux-inet6)
15069 if test -d /usr/inet6; then
15070 ipv6type=$i
15071 ipv6lib=inet6
15072 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015073 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015074 fi
15075 ;;
15076 solaris)
15077 if test -f /etc/netconfig; then
15078 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15079 ipv6type=$i
15080 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015081 fi
15082 fi
15083 ;;
15084 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015086/* confdefs.h. */
15087_ACEOF
15088cat confdefs.h >>conftest.$ac_ext
15089cat >>conftest.$ac_ext <<_ACEOF
15090/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015091
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015092#include <sys/param.h>
15093#ifdef _TOSHIBA_INET6
15094yes
15095#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015096_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015098 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015099 ipv6type=$i;
15100 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015101 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015102fi
15103rm -f conftest*
15104
15105 ;;
15106 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015108/* confdefs.h. */
15109_ACEOF
15110cat confdefs.h >>conftest.$ac_ext
15111cat >>conftest.$ac_ext <<_ACEOF
15112/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015114#include </usr/local/v6/include/sys/v6config.h>
15115#ifdef __V6D__
15116yes
15117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015118_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015120 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015121 ipv6type=$i;
15122 ipv6lib=v6;
15123 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015124 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015125fi
15126rm -f conftest*
15127
15128 ;;
15129 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015131/* confdefs.h. */
15132_ACEOF
15133cat confdefs.h >>conftest.$ac_ext
15134cat >>conftest.$ac_ext <<_ACEOF
15135/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015137#include <sys/param.h>
15138#ifdef _ZETA_MINAMI_INET6
15139yes
15140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015141_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015143 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015144 ipv6type=$i;
15145 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015146 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015147fi
15148rm -f conftest*
15149
15150 ;;
15151 esac
15152 if test "$ipv6type" != "unknown"; then
15153 break
15154 fi
15155 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015156 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15157echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015158fi
15159
15160if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15161 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15162 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15163 echo "using lib$ipv6lib"
15164 else
15165 if test $ipv6trylibc = "yes"; then
15166 echo "using libc"
15167 else
15168 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15169 echo "You need to fetch lib$ipv6lib.a from appropriate"
15170 echo 'ipv6 kit and compile beforehand.'
15171 exit 1
15172 fi
15173 fi
15174fi
15175
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015176# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15178echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015179
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015181if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015182 withval=$with_doc_strings;
15183fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015184
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015185
15186if test -z "$with_doc_strings"
15187then with_doc_strings="yes"
15188fi
15189if test "$with_doc_strings" != "no"
15190then
15191
15192cat >>confdefs.h <<\_ACEOF
15193#define WITH_DOC_STRINGS 1
15194_ACEOF
15195
15196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15198echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015199
Neil Schemenauera35c6882001-02-27 04:45:05 +000015200# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015201{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15202echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015203
Martin v. Löwiseba40652007-08-30 20:10:57 +000015204# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015205if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015206 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015207if test "$withval" != no
15208then
15209
15210cat >>confdefs.h <<\_ACEOF
15211#define WITH_TSC 1
15212_ACEOF
15213
Martin v. Löwiseba40652007-08-30 20:10:57 +000015214 { echo "$as_me:$LINENO: result: yes" >&5
15215echo "${ECHO_T}yes" >&6; }
15216else { echo "$as_me:$LINENO: result: no" >&5
15217echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015218fi
15219else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015220 { echo "$as_me:$LINENO: result: no" >&5
15221echo "${ECHO_T}no" >&6; }
15222fi
15223
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015224
15225# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015226{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15227echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
Martin v. Löwiseba40652007-08-30 20:10:57 +000015229# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015230if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231 withval=$with_pymalloc;
15232fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015233
Neil Schemenauera35c6882001-02-27 04:45:05 +000015234
Neil Schemenauer16c22972002-03-22 15:34:49 +000015235if test -z "$with_pymalloc"
15236then with_pymalloc="yes"
15237fi
15238if test "$with_pymalloc" != "no"
15239then
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
15241cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015242#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015243_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015244
15245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015246{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15247echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015248
Barry Warsawef82cd72000-06-30 16:21:01 +000015249# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000015250{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15251echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Martin v. Löwiseba40652007-08-30 20:10:57 +000015253# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015254if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015255 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015256if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015257then
15258
15259cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015260#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015261_ACEOF
15262
Martin v. Löwiseba40652007-08-30 20:10:57 +000015263 { echo "$as_me:$LINENO: result: yes" >&5
15264echo "${ECHO_T}yes" >&6; }
15265else { echo "$as_me:$LINENO: result: no" >&5
15266echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015267fi
15268else
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 { echo "$as_me:$LINENO: result: no" >&5
15270echo "${ECHO_T}no" >&6; }
15271fi
15272
Barry Warsawef82cd72000-06-30 16:21:01 +000015273
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015274# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015275
Guido van Rossum98935bf2001-09-05 19:13:16 +000015276DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015277
Guido van Rossume97ee181999-12-20 21:27:22 +000015278# the dlopen() function means we might want to use dynload_shlib.o. some
15279# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015280
Thomas Wouters3a584202000-08-05 23:28:51 +000015281for ac_func in dlopen
15282do
Martin v. Löwis11437992002-04-12 09:54:03 +000015283as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15285echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15286if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015287 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015288else
Martin v. Löwis11437992002-04-12 09:54:03 +000015289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015290/* confdefs.h. */
15291_ACEOF
15292cat confdefs.h >>conftest.$ac_ext
15293cat >>conftest.$ac_ext <<_ACEOF
15294/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015295/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15297#define $ac_func innocuous_$ac_func
15298
Guido van Rossume97ee181999-12-20 21:27:22 +000015299/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015300 which can conflict with char $ac_func (); below.
15301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015302 <limits.h> exists even on freestanding compilers. */
15303
15304#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015305# include <limits.h>
15306#else
15307# include <assert.h>
15308#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015309
15310#undef $ac_func
15311
Martin v. Löwiseba40652007-08-30 20:10:57 +000015312/* Override any GCC internal prototype to avoid an error.
15313 Use char because int might match the return type of a GCC
15314 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315#ifdef __cplusplus
15316extern "C"
15317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015318char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000015319/* The GNU C library defines this for functions which it implements
15320 to always fail with ENOSYS. Some functions are actually named
15321 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000015323choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000015324#endif
15325
Skip Montanaro6dead952003-09-25 14:50:04 +000015326int
15327main ()
15328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015329return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015330 ;
15331 return 0;
15332}
15333_ACEOF
15334rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335if { (ac_try="$ac_link"
15336case "(($ac_try" in
15337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15338 *) ac_try_echo=$ac_try;;
15339esac
15340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15341 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015343 grep -v '^ *+' conftest.er1 >conftest.err
15344 rm -f conftest.er1
15345 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015347 (exit $ac_status); } && {
15348 test -z "$ac_c_werror_flag" ||
15349 test ! -s conftest.err
15350 } && test -s conftest$ac_exeext &&
15351 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015352 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015353else
Martin v. Löwis11437992002-04-12 09:54:03 +000015354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015355sed 's/^/| /' conftest.$ac_ext >&5
15356
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359
15360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015361 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015363ac_res=`eval echo '${'$as_ac_var'}'`
15364 { echo "$as_me:$LINENO: result: $ac_res" >&5
15365echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015366if test `eval echo '${'$as_ac_var'}'` = yes; then
15367 cat >>confdefs.h <<_ACEOF
15368#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15369_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015370
Guido van Rossume97ee181999-12-20 21:27:22 +000015371fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015372done
Guido van Rossume97ee181999-12-20 21:27:22 +000015373
Michael W. Hudson54241132001-12-07 15:38:26 +000015374
Guido van Rossume97ee181999-12-20 21:27:22 +000015375# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
15376# loading of modules.
15377
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
15379echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015380if test -z "$DYNLOADFILE"
15381then
15382 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000015383 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
15384 if test "$ac_cv_func_dlopen" = yes
15385 then DYNLOADFILE="dynload_shlib.o"
15386 else DYNLOADFILE="dynload_aix.o"
15387 fi
15388 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000015389 BeOS*) DYNLOADFILE="dynload_beos.o";;
15390 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000015391 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
15392 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015393 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000015394 *)
15395 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
15396 # out any dynamic loading
15397 if test "$ac_cv_func_dlopen" = yes
15398 then DYNLOADFILE="dynload_shlib.o"
15399 else DYNLOADFILE="dynload_stub.o"
15400 fi
15401 ;;
15402 esac
15403fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015404{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
15405echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000015406if test "$DYNLOADFILE" != "dynload_stub.o"
15407then
Martin v. Löwis11437992002-04-12 09:54:03 +000015408
15409cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015410#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015411_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000015412
15413fi
15414
Neil Schemenauer4e425612001-06-19 15:44:15 +000015415# MACHDEP_OBJS can be set to platform-specific object files needed by Python
15416
Michael W. Hudson54241132001-12-07 15:38:26 +000015417
Martin v. Löwiseba40652007-08-30 20:10:57 +000015418{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
15419echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015420if test -z "$MACHDEP_OBJS"
15421then
Jack Jansene578a632001-08-15 01:27:14 +000015422 MACHDEP_OBJS=$extra_machdep_objs
15423else
15424 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000015425fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
15427echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000015428
Guido van Rossum627b2d71993-12-24 10:39:16 +000015429# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000015430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
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
Martin v. Löwisd6320502004-08-12 13:45:08 +000015501
Martin v. Löwisc3001752005-01-23 09:27:24 +000015502
15503
Neal Norwitz05a45592006-03-20 06:30:08 +000015504
15505
Martin v. Löwis382abef2007-02-19 10:55:19 +000015506
15507
Christian Heimes36281872007-11-30 21:11:28 +000015508
Martin v. Löwisaef18b12008-03-24 13:31:16 +000015509
15510
15511for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
15512 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000015513 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000015514 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000015515 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000015516 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000015517 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000015518 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000015519 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000015520 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000015521 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000015522 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000015523do
Martin v. Löwis11437992002-04-12 09:54:03 +000015524as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015525{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15526echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15527if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015529else
Martin v. Löwis11437992002-04-12 09:54:03 +000015530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015531/* confdefs.h. */
15532_ACEOF
15533cat confdefs.h >>conftest.$ac_ext
15534cat >>conftest.$ac_ext <<_ACEOF
15535/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015536/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15537 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15538#define $ac_func innocuous_$ac_func
15539
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015540/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015541 which can conflict with char $ac_func (); below.
15542 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015543 <limits.h> exists even on freestanding compilers. */
15544
15545#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015546# include <limits.h>
15547#else
15548# include <assert.h>
15549#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015550
15551#undef $ac_func
15552
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553/* Override any GCC internal prototype to avoid an error.
15554 Use char because int might match the return type of a GCC
15555 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015556#ifdef __cplusplus
15557extern "C"
15558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015559char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000015560/* The GNU C library defines this for functions which it implements
15561 to always fail with ENOSYS. Some functions are actually named
15562 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015563#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000015564choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000015565#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015566
Skip Montanaro6dead952003-09-25 14:50:04 +000015567int
15568main ()
15569{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 ;
15572 return 0;
15573}
15574_ACEOF
15575rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015576if { (ac_try="$ac_link"
15577case "(($ac_try" in
15578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15579 *) ac_try_echo=$ac_try;;
15580esac
15581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15582 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015584 grep -v '^ *+' conftest.er1 >conftest.err
15585 rm -f conftest.er1
15586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588 (exit $ac_status); } && {
15589 test -z "$ac_c_werror_flag" ||
15590 test ! -s conftest.err
15591 } && test -s conftest$ac_exeext &&
15592 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015594else
Martin v. Löwis11437992002-04-12 09:54:03 +000015595 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015596sed 's/^/| /' conftest.$ac_ext >&5
15597
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600
15601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015602 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604ac_res=`eval echo '${'$as_ac_var'}'`
15605 { echo "$as_me:$LINENO: result: $ac_res" >&5
15606echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015607if test `eval echo '${'$as_ac_var'}'` = yes; then
15608 cat >>confdefs.h <<_ACEOF
15609#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15610_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015611
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015612fi
15613done
15614
Michael W. Hudson54241132001-12-07 15:38:26 +000015615
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015616# For some functions, having a definition is not sufficient, since
15617# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015618{ echo "$as_me:$LINENO: checking for chroot" >&5
15619echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015621/* confdefs.h. */
15622_ACEOF
15623cat confdefs.h >>conftest.$ac_ext
15624cat >>conftest.$ac_ext <<_ACEOF
15625/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015626#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015627int
15628main ()
15629{
15630void *x=chroot
15631 ;
15632 return 0;
15633}
15634_ACEOF
15635rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015636if { (ac_try="$ac_compile"
15637case "(($ac_try" in
15638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15639 *) ac_try_echo=$ac_try;;
15640esac
15641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15642 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015643 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015644 grep -v '^ *+' conftest.er1 >conftest.err
15645 rm -f conftest.er1
15646 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015648 (exit $ac_status); } && {
15649 test -z "$ac_c_werror_flag" ||
15650 test ! -s conftest.err
15651 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015652
15653cat >>confdefs.h <<\_ACEOF
15654#define HAVE_CHROOT 1
15655_ACEOF
15656
Martin v. Löwiseba40652007-08-30 20:10:57 +000015657 { echo "$as_me:$LINENO: result: yes" >&5
15658echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015659else
15660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015661sed 's/^/| /' conftest.$ac_ext >&5
15662
Martin v. Löwiseba40652007-08-30 20:10:57 +000015663 { echo "$as_me:$LINENO: result: no" >&5
15664echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015665
15666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667
15668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15669{ echo "$as_me:$LINENO: checking for link" >&5
15670echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015671cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015672/* confdefs.h. */
15673_ACEOF
15674cat confdefs.h >>conftest.$ac_ext
15675cat >>conftest.$ac_ext <<_ACEOF
15676/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015677#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015678int
15679main ()
15680{
15681void *x=link
15682 ;
15683 return 0;
15684}
15685_ACEOF
15686rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015687if { (ac_try="$ac_compile"
15688case "(($ac_try" in
15689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15690 *) ac_try_echo=$ac_try;;
15691esac
15692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15693 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015695 grep -v '^ *+' conftest.er1 >conftest.err
15696 rm -f conftest.er1
15697 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015699 (exit $ac_status); } && {
15700 test -z "$ac_c_werror_flag" ||
15701 test ! -s conftest.err
15702 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015703
15704cat >>confdefs.h <<\_ACEOF
15705#define HAVE_LINK 1
15706_ACEOF
15707
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708 { echo "$as_me:$LINENO: result: yes" >&5
15709echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015710else
15711 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015712sed 's/^/| /' conftest.$ac_ext >&5
15713
Martin v. Löwiseba40652007-08-30 20:10:57 +000015714 { echo "$as_me:$LINENO: result: no" >&5
15715echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015716
15717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015718
15719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15720{ echo "$as_me:$LINENO: checking for symlink" >&5
15721echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015722cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015723/* confdefs.h. */
15724_ACEOF
15725cat confdefs.h >>conftest.$ac_ext
15726cat >>conftest.$ac_ext <<_ACEOF
15727/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015728#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015729int
15730main ()
15731{
15732void *x=symlink
15733 ;
15734 return 0;
15735}
15736_ACEOF
15737rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015738if { (ac_try="$ac_compile"
15739case "(($ac_try" in
15740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15741 *) ac_try_echo=$ac_try;;
15742esac
15743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015746 grep -v '^ *+' conftest.er1 >conftest.err
15747 rm -f conftest.er1
15748 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750 (exit $ac_status); } && {
15751 test -z "$ac_c_werror_flag" ||
15752 test ! -s conftest.err
15753 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015754
15755cat >>confdefs.h <<\_ACEOF
15756#define HAVE_SYMLINK 1
15757_ACEOF
15758
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759 { echo "$as_me:$LINENO: result: yes" >&5
15760echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015761else
15762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015763sed 's/^/| /' conftest.$ac_ext >&5
15764
Martin v. Löwiseba40652007-08-30 20:10:57 +000015765 { echo "$as_me:$LINENO: result: no" >&5
15766echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015767
15768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015769
15770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15771{ echo "$as_me:$LINENO: checking for fchdir" >&5
15772echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015774/* confdefs.h. */
15775_ACEOF
15776cat confdefs.h >>conftest.$ac_ext
15777cat >>conftest.$ac_ext <<_ACEOF
15778/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015779#include <unistd.h>
15780int
15781main ()
15782{
15783void *x=fchdir
15784 ;
15785 return 0;
15786}
15787_ACEOF
15788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015789if { (ac_try="$ac_compile"
15790case "(($ac_try" in
15791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15792 *) ac_try_echo=$ac_try;;
15793esac
15794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015797 grep -v '^ *+' conftest.er1 >conftest.err
15798 rm -f conftest.er1
15799 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015801 (exit $ac_status); } && {
15802 test -z "$ac_c_werror_flag" ||
15803 test ! -s conftest.err
15804 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015805
15806cat >>confdefs.h <<\_ACEOF
15807#define HAVE_FCHDIR 1
15808_ACEOF
15809
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810 { echo "$as_me:$LINENO: result: yes" >&5
15811echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015812else
15813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015814sed 's/^/| /' conftest.$ac_ext >&5
15815
Martin v. Löwiseba40652007-08-30 20:10:57 +000015816 { echo "$as_me:$LINENO: result: no" >&5
15817echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015818
15819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015820
15821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15822{ echo "$as_me:$LINENO: checking for fsync" >&5
15823echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015825/* confdefs.h. */
15826_ACEOF
15827cat confdefs.h >>conftest.$ac_ext
15828cat >>conftest.$ac_ext <<_ACEOF
15829/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015830#include <unistd.h>
15831int
15832main ()
15833{
15834void *x=fsync
15835 ;
15836 return 0;
15837}
15838_ACEOF
15839rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015840if { (ac_try="$ac_compile"
15841case "(($ac_try" in
15842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15843 *) ac_try_echo=$ac_try;;
15844esac
15845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15846 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015848 grep -v '^ *+' conftest.er1 >conftest.err
15849 rm -f conftest.er1
15850 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015852 (exit $ac_status); } && {
15853 test -z "$ac_c_werror_flag" ||
15854 test ! -s conftest.err
15855 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015856
15857cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015858#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015859_ACEOF
15860
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861 { echo "$as_me:$LINENO: result: yes" >&5
15862echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015863else
15864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015865sed 's/^/| /' conftest.$ac_ext >&5
15866
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867 { echo "$as_me:$LINENO: result: no" >&5
15868echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015869
15870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015871
15872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15873{ echo "$as_me:$LINENO: checking for fdatasync" >&5
15874echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015876/* confdefs.h. */
15877_ACEOF
15878cat confdefs.h >>conftest.$ac_ext
15879cat >>conftest.$ac_ext <<_ACEOF
15880/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015881#include <unistd.h>
15882int
15883main ()
15884{
15885void *x=fdatasync
15886 ;
15887 return 0;
15888}
15889_ACEOF
15890rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015891if { (ac_try="$ac_compile"
15892case "(($ac_try" in
15893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15894 *) ac_try_echo=$ac_try;;
15895esac
15896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015899 grep -v '^ *+' conftest.er1 >conftest.err
15900 rm -f conftest.er1
15901 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015903 (exit $ac_status); } && {
15904 test -z "$ac_c_werror_flag" ||
15905 test ! -s conftest.err
15906 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015907
15908cat >>confdefs.h <<\_ACEOF
15909#define HAVE_FDATASYNC 1
15910_ACEOF
15911
Martin v. Löwiseba40652007-08-30 20:10:57 +000015912 { echo "$as_me:$LINENO: result: yes" >&5
15913echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015914else
15915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015916sed 's/^/| /' conftest.$ac_ext >&5
15917
Martin v. Löwiseba40652007-08-30 20:10:57 +000015918 { echo "$as_me:$LINENO: result: no" >&5
15919echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015920
15921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015922
15923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015924{ echo "$as_me:$LINENO: checking for epoll" >&5
15925echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
15926cat >conftest.$ac_ext <<_ACEOF
15927/* confdefs.h. */
15928_ACEOF
15929cat confdefs.h >>conftest.$ac_ext
15930cat >>conftest.$ac_ext <<_ACEOF
15931/* end confdefs.h. */
15932#include <sys/epoll.h>
15933int
15934main ()
15935{
15936void *x=epoll_create
15937 ;
15938 return 0;
15939}
15940_ACEOF
15941rm -f conftest.$ac_objext
15942if { (ac_try="$ac_compile"
15943case "(($ac_try" in
15944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15945 *) ac_try_echo=$ac_try;;
15946esac
15947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15948 (eval "$ac_compile") 2>conftest.er1
15949 ac_status=$?
15950 grep -v '^ *+' conftest.er1 >conftest.err
15951 rm -f conftest.er1
15952 cat conftest.err >&5
15953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954 (exit $ac_status); } && {
15955 test -z "$ac_c_werror_flag" ||
15956 test ! -s conftest.err
15957 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015958
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000015959cat >>confdefs.h <<\_ACEOF
15960#define HAVE_EPOLL 1
15961_ACEOF
15962
15963 { echo "$as_me:$LINENO: result: yes" >&5
15964echo "${ECHO_T}yes" >&6; }
15965else
15966 echo "$as_me: failed program was:" >&5
15967sed 's/^/| /' conftest.$ac_ext >&5
15968
15969 { echo "$as_me:$LINENO: result: no" >&5
15970echo "${ECHO_T}no" >&6; }
15971
15972fi
15973
15974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15975{ echo "$as_me:$LINENO: checking for kqueue" >&5
15976echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
15977cat >conftest.$ac_ext <<_ACEOF
15978/* confdefs.h. */
15979_ACEOF
15980cat confdefs.h >>conftest.$ac_ext
15981cat >>conftest.$ac_ext <<_ACEOF
15982/* end confdefs.h. */
15983
15984#include <sys/types.h>
15985#include <sys/event.h>
15986
15987int
15988main ()
15989{
15990int x=kqueue()
15991 ;
15992 return 0;
15993}
15994_ACEOF
15995rm -f conftest.$ac_objext
15996if { (ac_try="$ac_compile"
15997case "(($ac_try" in
15998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15999 *) ac_try_echo=$ac_try;;
16000esac
16001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16002 (eval "$ac_compile") 2>conftest.er1
16003 ac_status=$?
16004 grep -v '^ *+' conftest.er1 >conftest.err
16005 rm -f conftest.er1
16006 cat conftest.err >&5
16007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16008 (exit $ac_status); } && {
16009 test -z "$ac_c_werror_flag" ||
16010 test ! -s conftest.err
16011 } && test -s conftest.$ac_objext; then
16012
16013cat >>confdefs.h <<\_ACEOF
16014#define HAVE_KQUEUE 1
16015_ACEOF
16016
16017 { echo "$as_me:$LINENO: result: yes" >&5
16018echo "${ECHO_T}yes" >&6; }
16019else
16020 echo "$as_me: failed program was:" >&5
16021sed 's/^/| /' conftest.$ac_ext >&5
16022
16023 { echo "$as_me:$LINENO: result: no" >&5
16024echo "${ECHO_T}no" >&6; }
16025
16026fi
16027
16028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016029# On some systems (eg. FreeBSD 5), we would find a definition of the
16030# functions ctermid_r, setgroups in the library, but no prototype
16031# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16032# address to avoid compiler warnings and potential miscompilations
16033# because of the missing prototypes.
16034
Martin v. Löwiseba40652007-08-30 20:10:57 +000016035{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16036echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016037cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016038/* confdefs.h. */
16039_ACEOF
16040cat confdefs.h >>conftest.$ac_ext
16041cat >>conftest.$ac_ext <<_ACEOF
16042/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016043
16044#include "confdefs.h"
16045#include <stdio.h>
16046
Martin v. Löwisd5843682002-11-21 20:41:28 +000016047int
16048main ()
16049{
16050void* p = ctermid_r
16051 ;
16052 return 0;
16053}
16054_ACEOF
16055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016056if { (ac_try="$ac_compile"
16057case "(($ac_try" in
16058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16059 *) ac_try_echo=$ac_try;;
16060esac
16061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016064 grep -v '^ *+' conftest.er1 >conftest.err
16065 rm -f conftest.er1
16066 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016068 (exit $ac_status); } && {
16069 test -z "$ac_c_werror_flag" ||
16070 test ! -s conftest.err
16071 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016072
16073cat >>confdefs.h <<\_ACEOF
16074#define HAVE_CTERMID_R 1
16075_ACEOF
16076
Martin v. Löwiseba40652007-08-30 20:10:57 +000016077 { echo "$as_me:$LINENO: result: yes" >&5
16078echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016079else
16080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016081sed 's/^/| /' conftest.$ac_ext >&5
16082
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083 { echo "$as_me:$LINENO: result: no" >&5
16084echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016085
16086fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016087
Martin v. Löwiseba40652007-08-30 20:10:57 +000016088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16089
16090{ echo "$as_me:$LINENO: checking for flock" >&5
16091echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016092cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016093/* confdefs.h. */
16094_ACEOF
16095cat confdefs.h >>conftest.$ac_ext
16096cat >>conftest.$ac_ext <<_ACEOF
16097/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016098
16099#include "confdefs.h"
16100#include <sys/file.h>
16101
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016102int
16103main ()
16104{
16105void* p = flock
16106 ;
16107 return 0;
16108}
16109_ACEOF
16110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016111if { (ac_try="$ac_compile"
16112case "(($ac_try" in
16113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16114 *) ac_try_echo=$ac_try;;
16115esac
16116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016119 grep -v '^ *+' conftest.er1 >conftest.err
16120 rm -f conftest.er1
16121 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123 (exit $ac_status); } && {
16124 test -z "$ac_c_werror_flag" ||
16125 test ! -s conftest.err
16126 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016127
16128cat >>confdefs.h <<\_ACEOF
16129#define HAVE_FLOCK 1
16130_ACEOF
16131
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132 { echo "$as_me:$LINENO: result: yes" >&5
16133echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016134else
16135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016136sed 's/^/| /' conftest.$ac_ext >&5
16137
Martin v. Löwiseba40652007-08-30 20:10:57 +000016138 { echo "$as_me:$LINENO: result: no" >&5
16139echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016140
16141fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016142
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16144
16145{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16146echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016148/* confdefs.h. */
16149_ACEOF
16150cat confdefs.h >>conftest.$ac_ext
16151cat >>conftest.$ac_ext <<_ACEOF
16152/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016153
16154#include "confdefs.h"
16155#include <unistd.h>
16156
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016157int
16158main ()
16159{
16160void* p = getpagesize
16161 ;
16162 return 0;
16163}
16164_ACEOF
16165rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166if { (ac_try="$ac_compile"
16167case "(($ac_try" in
16168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16169 *) ac_try_echo=$ac_try;;
16170esac
16171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16172 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016174 grep -v '^ *+' conftest.er1 >conftest.err
16175 rm -f conftest.er1
16176 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178 (exit $ac_status); } && {
16179 test -z "$ac_c_werror_flag" ||
16180 test ! -s conftest.err
16181 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016182
16183cat >>confdefs.h <<\_ACEOF
16184#define HAVE_GETPAGESIZE 1
16185_ACEOF
16186
Martin v. Löwiseba40652007-08-30 20:10:57 +000016187 { echo "$as_me:$LINENO: result: yes" >&5
16188echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016189else
16190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016191sed 's/^/| /' conftest.$ac_ext >&5
16192
Martin v. Löwiseba40652007-08-30 20:10:57 +000016193 { echo "$as_me:$LINENO: result: no" >&5
16194echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016195
16196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016197
16198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016199
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016200for ac_prog in true
16201do
16202 # Extract the first word of "$ac_prog", so it can be a program name with args.
16203set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000016204{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16205echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016206if test "${ac_cv_prog_TRUE+set}" = set; then
16207 echo $ECHO_N "(cached) $ECHO_C" >&6
16208else
16209 if test -n "$TRUE"; then
16210 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16211else
16212as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16213for as_dir in $PATH
16214do
16215 IFS=$as_save_IFS
16216 test -z "$as_dir" && as_dir=.
16217 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000016218 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 +000016219 ac_cv_prog_TRUE="$ac_prog"
16220 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16221 break 2
16222 fi
16223done
16224done
Martin v. Löwiseba40652007-08-30 20:10:57 +000016225IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016226
16227fi
16228fi
16229TRUE=$ac_cv_prog_TRUE
16230if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016231 { echo "$as_me:$LINENO: result: $TRUE" >&5
16232echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016233else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016234 { echo "$as_me:$LINENO: result: no" >&5
16235echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016236fi
16237
Martin v. Löwiseba40652007-08-30 20:10:57 +000016238
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016239 test -n "$TRUE" && break
16240done
16241test -n "$TRUE" || TRUE="/bin/true"
16242
16243
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16245echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016246if test "${ac_cv_lib_c_inet_aton+set}" = set; then
16247 echo $ECHO_N "(cached) $ECHO_C" >&6
16248else
16249 ac_check_lib_save_LIBS=$LIBS
16250LIBS="-lc $LIBS"
16251cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016252/* confdefs.h. */
16253_ACEOF
16254cat confdefs.h >>conftest.$ac_ext
16255cat >>conftest.$ac_ext <<_ACEOF
16256/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016257
Martin v. Löwiseba40652007-08-30 20:10:57 +000016258/* Override any GCC internal prototype to avoid an error.
16259 Use char because int might match the return type of a GCC
16260 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016261#ifdef __cplusplus
16262extern "C"
16263#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016264char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016265int
16266main ()
16267{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016268return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016269 ;
16270 return 0;
16271}
16272_ACEOF
16273rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016274if { (ac_try="$ac_link"
16275case "(($ac_try" in
16276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16277 *) ac_try_echo=$ac_try;;
16278esac
16279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16280 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016282 grep -v '^ *+' conftest.er1 >conftest.err
16283 rm -f conftest.er1
16284 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286 (exit $ac_status); } && {
16287 test -z "$ac_c_werror_flag" ||
16288 test ! -s conftest.err
16289 } && test -s conftest$ac_exeext &&
16290 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016291 ac_cv_lib_c_inet_aton=yes
16292else
16293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016294sed 's/^/| /' conftest.$ac_ext >&5
16295
Martin v. Löwiseba40652007-08-30 20:10:57 +000016296 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016297fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016298
16299rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016300 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016301LIBS=$ac_check_lib_save_LIBS
16302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016303{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
16304echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016305if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016306 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016307else
16308
Martin v. Löwiseba40652007-08-30 20:10:57 +000016309{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
16310echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016311if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
16312 echo $ECHO_N "(cached) $ECHO_C" >&6
16313else
16314 ac_check_lib_save_LIBS=$LIBS
16315LIBS="-lresolv $LIBS"
16316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016317/* confdefs.h. */
16318_ACEOF
16319cat confdefs.h >>conftest.$ac_ext
16320cat >>conftest.$ac_ext <<_ACEOF
16321/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016322
Martin v. Löwiseba40652007-08-30 20:10:57 +000016323/* Override any GCC internal prototype to avoid an error.
16324 Use char because int might match the return type of a GCC
16325 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016326#ifdef __cplusplus
16327extern "C"
16328#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016329char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016330int
16331main ()
16332{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016333return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016334 ;
16335 return 0;
16336}
16337_ACEOF
16338rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016339if { (ac_try="$ac_link"
16340case "(($ac_try" in
16341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16342 *) ac_try_echo=$ac_try;;
16343esac
16344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16345 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016347 grep -v '^ *+' conftest.er1 >conftest.err
16348 rm -f conftest.er1
16349 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351 (exit $ac_status); } && {
16352 test -z "$ac_c_werror_flag" ||
16353 test ! -s conftest.err
16354 } && test -s conftest$ac_exeext &&
16355 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016356 ac_cv_lib_resolv_inet_aton=yes
16357else
16358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016359sed 's/^/| /' conftest.$ac_ext >&5
16360
Martin v. Löwiseba40652007-08-30 20:10:57 +000016361 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016363
16364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016366LIBS=$ac_check_lib_save_LIBS
16367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016368{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
16369echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016370if test $ac_cv_lib_resolv_inet_aton = yes; then
16371 cat >>confdefs.h <<_ACEOF
16372#define HAVE_LIBRESOLV 1
16373_ACEOF
16374
16375 LIBS="-lresolv $LIBS"
16376
16377fi
16378
16379
16380fi
16381
16382
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016383# On Tru64, chflags seems to be present, but calling it will
16384# exit Python
16385{ echo "$as_me:$LINENO: checking for chflags" >&5
16386echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
16387if test "$cross_compiling" = yes; then
16388 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16389See \`config.log' for more details." >&5
16390echo "$as_me: error: cannot run test program while cross compiling
16391See \`config.log' for more details." >&2;}
16392 { (exit 1); exit 1; }; }
16393else
16394 cat >conftest.$ac_ext <<_ACEOF
16395/* confdefs.h. */
16396_ACEOF
16397cat confdefs.h >>conftest.$ac_ext
16398cat >>conftest.$ac_ext <<_ACEOF
16399/* end confdefs.h. */
16400
16401#include <sys/stat.h>
16402#include <unistd.h>
16403int main(int argc, char*argv[])
16404{
16405 if(chflags(argv[0], 0) != 0)
16406 return 1;
16407 return 0;
16408}
16409
16410_ACEOF
16411rm -f conftest$ac_exeext
16412if { (ac_try="$ac_link"
16413case "(($ac_try" in
16414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16415 *) ac_try_echo=$ac_try;;
16416esac
16417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16418 (eval "$ac_link") 2>&5
16419 ac_status=$?
16420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16422 { (case "(($ac_try" in
16423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16424 *) ac_try_echo=$ac_try;;
16425esac
16426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16427 (eval "$ac_try") 2>&5
16428 ac_status=$?
16429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430 (exit $ac_status); }; }; then
16431
16432cat >>confdefs.h <<\_ACEOF
16433#define HAVE_CHFLAGS 1
16434_ACEOF
16435
16436 { echo "$as_me:$LINENO: result: yes" >&5
16437echo "${ECHO_T}yes" >&6; }
16438else
16439 echo "$as_me: program exited with status $ac_status" >&5
16440echo "$as_me: failed program was:" >&5
16441sed 's/^/| /' conftest.$ac_ext >&5
16442
16443( exit $ac_status )
16444{ echo "$as_me:$LINENO: result: no" >&5
16445echo "${ECHO_T}no" >&6; }
16446
16447fi
16448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16449fi
16450
16451
16452
16453{ echo "$as_me:$LINENO: checking for lchflags" >&5
16454echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
16455if test "$cross_compiling" = yes; then
16456 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16457See \`config.log' for more details." >&5
16458echo "$as_me: error: cannot run test program while cross compiling
16459See \`config.log' for more details." >&2;}
16460 { (exit 1); exit 1; }; }
16461else
16462 cat >conftest.$ac_ext <<_ACEOF
16463/* confdefs.h. */
16464_ACEOF
16465cat confdefs.h >>conftest.$ac_ext
16466cat >>conftest.$ac_ext <<_ACEOF
16467/* end confdefs.h. */
16468
16469#include <sys/stat.h>
16470#include <unistd.h>
16471int main(int argc, char*argv[])
16472{
16473 if(lchflags(argv[0], 0) != 0)
16474 return 1;
16475 return 0;
16476}
16477
16478_ACEOF
16479rm -f conftest$ac_exeext
16480if { (ac_try="$ac_link"
16481case "(($ac_try" in
16482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16483 *) ac_try_echo=$ac_try;;
16484esac
16485eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16486 (eval "$ac_link") 2>&5
16487 ac_status=$?
16488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16489 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16490 { (case "(($ac_try" in
16491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16492 *) ac_try_echo=$ac_try;;
16493esac
16494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16495 (eval "$ac_try") 2>&5
16496 ac_status=$?
16497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16498 (exit $ac_status); }; }; then
16499
16500cat >>confdefs.h <<\_ACEOF
16501#define HAVE_LCHFLAGS 1
16502_ACEOF
16503
16504 { echo "$as_me:$LINENO: result: yes" >&5
16505echo "${ECHO_T}yes" >&6; }
16506else
16507 echo "$as_me: program exited with status $ac_status" >&5
16508echo "$as_me: failed program was:" >&5
16509sed 's/^/| /' conftest.$ac_ext >&5
16510
16511( exit $ac_status )
16512{ echo "$as_me:$LINENO: result: no" >&5
16513echo "${ECHO_T}no" >&6; }
16514
16515fi
16516rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16517fi
16518
16519
16520
Ronald Oussorenf8752642006-07-06 10:13:35 +000016521case $ac_sys_system/$ac_sys_release in
16522Darwin/*)
16523 _CUR_CFLAGS="${CFLAGS}"
16524 _CUR_LDFLAGS="${LDFLAGS}"
16525 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
16526 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
16527 ;;
16528esac
16529
Martin v. Löwiseba40652007-08-30 20:10:57 +000016530{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
16531echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016532if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
16533 echo $ECHO_N "(cached) $ECHO_C" >&6
16534else
16535 ac_check_lib_save_LIBS=$LIBS
16536LIBS="-lz $LIBS"
16537cat >conftest.$ac_ext <<_ACEOF
16538/* confdefs.h. */
16539_ACEOF
16540cat confdefs.h >>conftest.$ac_ext
16541cat >>conftest.$ac_ext <<_ACEOF
16542/* end confdefs.h. */
16543
Martin v. Löwiseba40652007-08-30 20:10:57 +000016544/* Override any GCC internal prototype to avoid an error.
16545 Use char because int might match the return type of a GCC
16546 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016547#ifdef __cplusplus
16548extern "C"
16549#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016550char inflateCopy ();
16551int
16552main ()
16553{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016554return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016555 ;
16556 return 0;
16557}
16558_ACEOF
16559rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016560if { (ac_try="$ac_link"
16561case "(($ac_try" in
16562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16563 *) ac_try_echo=$ac_try;;
16564esac
16565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16566 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016567 ac_status=$?
16568 grep -v '^ *+' conftest.er1 >conftest.err
16569 rm -f conftest.er1
16570 cat conftest.err >&5
16571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016572 (exit $ac_status); } && {
16573 test -z "$ac_c_werror_flag" ||
16574 test ! -s conftest.err
16575 } && test -s conftest$ac_exeext &&
16576 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016577 ac_cv_lib_z_inflateCopy=yes
16578else
16579 echo "$as_me: failed program was:" >&5
16580sed 's/^/| /' conftest.$ac_ext >&5
16581
Martin v. Löwiseba40652007-08-30 20:10:57 +000016582 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016583fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016584
16585rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016586 conftest$ac_exeext conftest.$ac_ext
16587LIBS=$ac_check_lib_save_LIBS
16588fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
16590echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000016591if test $ac_cv_lib_z_inflateCopy = yes; then
16592
16593cat >>confdefs.h <<\_ACEOF
16594#define HAVE_ZLIB_COPY 1
16595_ACEOF
16596
16597fi
16598
16599
Ronald Oussorenf8752642006-07-06 10:13:35 +000016600case $ac_sys_system/$ac_sys_release in
16601Darwin/*)
16602 CFLAGS="${_CUR_CFLAGS}"
16603 LDFLAGS="${_CUR_LDFLAGS}"
16604 ;;
16605esac
16606
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607{ echo "$as_me:$LINENO: checking for hstrerror" >&5
16608echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016610/* confdefs.h. */
16611_ACEOF
16612cat confdefs.h >>conftest.$ac_ext
16613cat >>conftest.$ac_ext <<_ACEOF
16614/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016615
16616#include "confdefs.h"
16617#include <netdb.h>
16618
Martin v. Löwise9416172003-05-03 10:12:45 +000016619int
16620main ()
16621{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016622void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016623 ;
16624 return 0;
16625}
16626_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016627rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016628if { (ac_try="$ac_link"
16629case "(($ac_try" in
16630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16631 *) ac_try_echo=$ac_try;;
16632esac
16633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16634 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016636 grep -v '^ *+' conftest.er1 >conftest.err
16637 rm -f conftest.er1
16638 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016640 (exit $ac_status); } && {
16641 test -z "$ac_c_werror_flag" ||
16642 test ! -s conftest.err
16643 } && test -s conftest$ac_exeext &&
16644 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016645
16646cat >>confdefs.h <<\_ACEOF
16647#define HAVE_HSTRERROR 1
16648_ACEOF
16649
Martin v. Löwiseba40652007-08-30 20:10:57 +000016650 { echo "$as_me:$LINENO: result: yes" >&5
16651echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016652else
16653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016654sed 's/^/| /' conftest.$ac_ext >&5
16655
Martin v. Löwiseba40652007-08-30 20:10:57 +000016656 { echo "$as_me:$LINENO: result: no" >&5
16657echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016658
16659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016660
16661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016662 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016663
Martin v. Löwiseba40652007-08-30 20:10:57 +000016664{ echo "$as_me:$LINENO: checking for inet_aton" >&5
16665echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016666cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016667/* confdefs.h. */
16668_ACEOF
16669cat confdefs.h >>conftest.$ac_ext
16670cat >>conftest.$ac_ext <<_ACEOF
16671/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016672
16673#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000016674#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016675#include <sys/socket.h>
16676#include <netinet/in.h>
16677#include <arpa/inet.h>
16678
Martin v. Löwise9416172003-05-03 10:12:45 +000016679int
16680main ()
16681{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016682void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000016683 ;
16684 return 0;
16685}
16686_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016687rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016688if { (ac_try="$ac_link"
16689case "(($ac_try" in
16690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16691 *) ac_try_echo=$ac_try;;
16692esac
16693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16694 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016696 grep -v '^ *+' conftest.er1 >conftest.err
16697 rm -f conftest.er1
16698 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016700 (exit $ac_status); } && {
16701 test -z "$ac_c_werror_flag" ||
16702 test ! -s conftest.err
16703 } && test -s conftest$ac_exeext &&
16704 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016705
16706cat >>confdefs.h <<\_ACEOF
16707#define HAVE_INET_ATON 1
16708_ACEOF
16709
Martin v. Löwiseba40652007-08-30 20:10:57 +000016710 { echo "$as_me:$LINENO: result: yes" >&5
16711echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016712else
16713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016714sed 's/^/| /' conftest.$ac_ext >&5
16715
Martin v. Löwiseba40652007-08-30 20:10:57 +000016716 { echo "$as_me:$LINENO: result: no" >&5
16717echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016718
16719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016720
16721rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016722 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016723
Martin v. Löwiseba40652007-08-30 20:10:57 +000016724{ echo "$as_me:$LINENO: checking for inet_pton" >&5
16725echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016726cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016727/* confdefs.h. */
16728_ACEOF
16729cat confdefs.h >>conftest.$ac_ext
16730cat >>conftest.$ac_ext <<_ACEOF
16731/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000016732
16733#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016734#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000016735#include <sys/socket.h>
16736#include <netinet/in.h>
16737#include <arpa/inet.h>
16738
Martin v. Löwise9416172003-05-03 10:12:45 +000016739int
16740main ()
16741{
16742void* p = inet_pton
16743 ;
16744 return 0;
16745}
16746_ACEOF
16747rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016748if { (ac_try="$ac_compile"
16749case "(($ac_try" in
16750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16751 *) ac_try_echo=$ac_try;;
16752esac
16753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16754 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000016755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016756 grep -v '^ *+' conftest.er1 >conftest.err
16757 rm -f conftest.er1
16758 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000016759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016760 (exit $ac_status); } && {
16761 test -z "$ac_c_werror_flag" ||
16762 test ! -s conftest.err
16763 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000016764
16765cat >>confdefs.h <<\_ACEOF
16766#define HAVE_INET_PTON 1
16767_ACEOF
16768
Martin v. Löwiseba40652007-08-30 20:10:57 +000016769 { echo "$as_me:$LINENO: result: yes" >&5
16770echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016771else
16772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016773sed 's/^/| /' conftest.$ac_ext >&5
16774
Martin v. Löwiseba40652007-08-30 20:10:57 +000016775 { echo "$as_me:$LINENO: result: no" >&5
16776echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000016777
16778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016779
16780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000016781
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016782# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000016783{ echo "$as_me:$LINENO: checking for setgroups" >&5
16784echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016785cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016786/* confdefs.h. */
16787_ACEOF
16788cat confdefs.h >>conftest.$ac_ext
16789cat >>conftest.$ac_ext <<_ACEOF
16790/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016791
16792#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000016793#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000016794#ifdef HAVE_GRP_H
16795#include <grp.h>
16796#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000016797
Martin v. Löwisd5843682002-11-21 20:41:28 +000016798int
16799main ()
16800{
16801void* p = setgroups
16802 ;
16803 return 0;
16804}
16805_ACEOF
16806rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016807if { (ac_try="$ac_compile"
16808case "(($ac_try" in
16809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16810 *) ac_try_echo=$ac_try;;
16811esac
16812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016815 grep -v '^ *+' conftest.er1 >conftest.err
16816 rm -f conftest.er1
16817 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819 (exit $ac_status); } && {
16820 test -z "$ac_c_werror_flag" ||
16821 test ! -s conftest.err
16822 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016823
16824cat >>confdefs.h <<\_ACEOF
16825#define HAVE_SETGROUPS 1
16826_ACEOF
16827
Martin v. Löwiseba40652007-08-30 20:10:57 +000016828 { echo "$as_me:$LINENO: result: yes" >&5
16829echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016830else
16831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016832sed 's/^/| /' conftest.$ac_ext >&5
16833
Martin v. Löwiseba40652007-08-30 20:10:57 +000016834 { echo "$as_me:$LINENO: result: no" >&5
16835echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016836
16837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016838
16839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016840
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016841# check for openpty and forkpty
16842
Martin v. Löwis11437992002-04-12 09:54:03 +000016843
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016844for ac_func in openpty
16845do
Martin v. Löwis11437992002-04-12 09:54:03 +000016846as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016847{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16848echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16849if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016851else
Martin v. Löwis11437992002-04-12 09:54:03 +000016852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016853/* confdefs.h. */
16854_ACEOF
16855cat confdefs.h >>conftest.$ac_ext
16856cat >>conftest.$ac_ext <<_ACEOF
16857/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016858/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16859 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16860#define $ac_func innocuous_$ac_func
16861
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016862/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016863 which can conflict with char $ac_func (); below.
16864 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016865 <limits.h> exists even on freestanding compilers. */
16866
16867#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016868# include <limits.h>
16869#else
16870# include <assert.h>
16871#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016872
16873#undef $ac_func
16874
Martin v. Löwiseba40652007-08-30 20:10:57 +000016875/* Override any GCC internal prototype to avoid an error.
16876 Use char because int might match the return type of a GCC
16877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016878#ifdef __cplusplus
16879extern "C"
16880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016881char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016882/* The GNU C library defines this for functions which it implements
16883 to always fail with ENOSYS. Some functions are actually named
16884 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016885#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016886choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016887#endif
16888
Skip Montanaro6dead952003-09-25 14:50:04 +000016889int
16890main ()
16891{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016892return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016893 ;
16894 return 0;
16895}
16896_ACEOF
16897rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016898if { (ac_try="$ac_link"
16899case "(($ac_try" in
16900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16901 *) ac_try_echo=$ac_try;;
16902esac
16903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16904 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016906 grep -v '^ *+' conftest.er1 >conftest.err
16907 rm -f conftest.er1
16908 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016910 (exit $ac_status); } && {
16911 test -z "$ac_c_werror_flag" ||
16912 test ! -s conftest.err
16913 } && test -s conftest$ac_exeext &&
16914 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016916else
Martin v. Löwis11437992002-04-12 09:54:03 +000016917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016918sed 's/^/| /' conftest.$ac_ext >&5
16919
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016922
16923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016924 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016925fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016926ac_res=`eval echo '${'$as_ac_var'}'`
16927 { echo "$as_me:$LINENO: result: $ac_res" >&5
16928echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016929if test `eval echo '${'$as_ac_var'}'` = yes; then
16930 cat >>confdefs.h <<_ACEOF
16931#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16932_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016933
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016934else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016935 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
16936echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016937if test "${ac_cv_lib_util_openpty+set}" = set; then
16938 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016939else
Martin v. Löwis11437992002-04-12 09:54:03 +000016940 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016941LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016948
Martin v. Löwiseba40652007-08-30 20:10:57 +000016949/* Override any GCC internal prototype to avoid an error.
16950 Use char because int might match the return type of a GCC
16951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016952#ifdef __cplusplus
16953extern "C"
16954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016955char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016956int
16957main ()
16958{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016959return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 ;
16961 return 0;
16962}
16963_ACEOF
16964rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016965if { (ac_try="$ac_link"
16966case "(($ac_try" in
16967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16968 *) ac_try_echo=$ac_try;;
16969esac
16970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16971 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016972 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016973 grep -v '^ *+' conftest.er1 >conftest.err
16974 rm -f conftest.er1
16975 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977 (exit $ac_status); } && {
16978 test -z "$ac_c_werror_flag" ||
16979 test ! -s conftest.err
16980 } && test -s conftest$ac_exeext &&
16981 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016982 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016983else
Martin v. Löwis11437992002-04-12 09:54:03 +000016984 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016985sed 's/^/| /' conftest.$ac_ext >&5
16986
Martin v. Löwiseba40652007-08-30 20:10:57 +000016987 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016989
16990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016991 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016992LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016994{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16995echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016996if test $ac_cv_lib_util_openpty = yes; then
16997 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016998#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016999_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017000 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017001else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017002 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17003echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017004if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17005 echo $ECHO_N "(cached) $ECHO_C" >&6
17006else
17007 ac_check_lib_save_LIBS=$LIBS
17008LIBS="-lbsd $LIBS"
17009cat >conftest.$ac_ext <<_ACEOF
17010/* confdefs.h. */
17011_ACEOF
17012cat confdefs.h >>conftest.$ac_ext
17013cat >>conftest.$ac_ext <<_ACEOF
17014/* end confdefs.h. */
17015
Martin v. Löwiseba40652007-08-30 20:10:57 +000017016/* Override any GCC internal prototype to avoid an error.
17017 Use char because int might match the return type of a GCC
17018 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017019#ifdef __cplusplus
17020extern "C"
17021#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017022char openpty ();
17023int
17024main ()
17025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017026return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017027 ;
17028 return 0;
17029}
17030_ACEOF
17031rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017032if { (ac_try="$ac_link"
17033case "(($ac_try" in
17034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17035 *) ac_try_echo=$ac_try;;
17036esac
17037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017039 ac_status=$?
17040 grep -v '^ *+' conftest.er1 >conftest.err
17041 rm -f conftest.er1
17042 cat conftest.err >&5
17043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017044 (exit $ac_status); } && {
17045 test -z "$ac_c_werror_flag" ||
17046 test ! -s conftest.err
17047 } && test -s conftest$ac_exeext &&
17048 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017049 ac_cv_lib_bsd_openpty=yes
17050else
17051 echo "$as_me: failed program was:" >&5
17052sed 's/^/| /' conftest.$ac_ext >&5
17053
Martin v. Löwiseba40652007-08-30 20:10:57 +000017054 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017056
17057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017058 conftest$ac_exeext conftest.$ac_ext
17059LIBS=$ac_check_lib_save_LIBS
17060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017061{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17062echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017063if test $ac_cv_lib_bsd_openpty = yes; then
17064 cat >>confdefs.h <<\_ACEOF
17065#define HAVE_OPENPTY 1
17066_ACEOF
17067 LIBS="$LIBS -lbsd"
17068fi
17069
17070
17071fi
17072
Fred Drake8cef4cf2000-06-28 16:40:38 +000017073
17074fi
17075done
17076
Martin v. Löwis11437992002-04-12 09:54:03 +000017077
Fred Drake8cef4cf2000-06-28 16:40:38 +000017078for ac_func in forkpty
17079do
Martin v. Löwis11437992002-04-12 09:54:03 +000017080as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017081{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17082echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17083if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017085else
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017087/* confdefs.h. */
17088_ACEOF
17089cat confdefs.h >>conftest.$ac_ext
17090cat >>conftest.$ac_ext <<_ACEOF
17091/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017092/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17093 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17094#define $ac_func innocuous_$ac_func
17095
Fred Drake8cef4cf2000-06-28 16:40:38 +000017096/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017097 which can conflict with char $ac_func (); below.
17098 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017099 <limits.h> exists even on freestanding compilers. */
17100
17101#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017102# include <limits.h>
17103#else
17104# include <assert.h>
17105#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017106
17107#undef $ac_func
17108
Martin v. Löwiseba40652007-08-30 20:10:57 +000017109/* Override any GCC internal prototype to avoid an error.
17110 Use char because int might match the return type of a GCC
17111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017112#ifdef __cplusplus
17113extern "C"
17114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017115char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017116/* The GNU C library defines this for functions which it implements
17117 to always fail with ENOSYS. Some functions are actually named
17118 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017119#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017120choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017121#endif
17122
Skip Montanaro6dead952003-09-25 14:50:04 +000017123int
17124main ()
17125{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017127 ;
17128 return 0;
17129}
17130_ACEOF
17131rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017132if { (ac_try="$ac_link"
17133case "(($ac_try" in
17134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17135 *) ac_try_echo=$ac_try;;
17136esac
17137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17138 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140 grep -v '^ *+' conftest.er1 >conftest.err
17141 rm -f conftest.er1
17142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017144 (exit $ac_status); } && {
17145 test -z "$ac_c_werror_flag" ||
17146 test ! -s conftest.err
17147 } && test -s conftest$ac_exeext &&
17148 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017149 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017150else
Martin v. Löwis11437992002-04-12 09:54:03 +000017151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017152sed 's/^/| /' conftest.$ac_ext >&5
17153
Martin v. Löwiseba40652007-08-30 20:10:57 +000017154 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017156
17157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017158 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017160ac_res=`eval echo '${'$as_ac_var'}'`
17161 { echo "$as_me:$LINENO: result: $ac_res" >&5
17162echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017163if test `eval echo '${'$as_ac_var'}'` = yes; then
17164 cat >>confdefs.h <<_ACEOF
17165#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17166_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017167
Fred Drake8cef4cf2000-06-28 16:40:38 +000017168else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017169 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17170echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017171if test "${ac_cv_lib_util_forkpty+set}" = set; then
17172 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017173else
Martin v. Löwis11437992002-04-12 09:54:03 +000017174 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017175LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017177/* confdefs.h. */
17178_ACEOF
17179cat confdefs.h >>conftest.$ac_ext
17180cat >>conftest.$ac_ext <<_ACEOF
17181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017182
Martin v. Löwiseba40652007-08-30 20:10:57 +000017183/* Override any GCC internal prototype to avoid an error.
17184 Use char because int might match the return type of a GCC
17185 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017186#ifdef __cplusplus
17187extern "C"
17188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017189char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017190int
17191main ()
17192{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017193return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 ;
17195 return 0;
17196}
17197_ACEOF
17198rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017199if { (ac_try="$ac_link"
17200case "(($ac_try" in
17201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17202 *) ac_try_echo=$ac_try;;
17203esac
17204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17205 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017207 grep -v '^ *+' conftest.er1 >conftest.err
17208 rm -f conftest.er1
17209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017211 (exit $ac_status); } && {
17212 test -z "$ac_c_werror_flag" ||
17213 test ! -s conftest.err
17214 } && test -s conftest$ac_exeext &&
17215 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017216 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017217else
Martin v. Löwis11437992002-04-12 09:54:03 +000017218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017219sed 's/^/| /' conftest.$ac_ext >&5
17220
Martin v. Löwiseba40652007-08-30 20:10:57 +000017221 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017223
17224rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017226LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017228{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
17229echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017230if test $ac_cv_lib_util_forkpty = yes; then
17231 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017232#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017233_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017234 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017235else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017236 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
17237echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017238if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
17239 echo $ECHO_N "(cached) $ECHO_C" >&6
17240else
17241 ac_check_lib_save_LIBS=$LIBS
17242LIBS="-lbsd $LIBS"
17243cat >conftest.$ac_ext <<_ACEOF
17244/* confdefs.h. */
17245_ACEOF
17246cat confdefs.h >>conftest.$ac_ext
17247cat >>conftest.$ac_ext <<_ACEOF
17248/* end confdefs.h. */
17249
Martin v. Löwiseba40652007-08-30 20:10:57 +000017250/* Override any GCC internal prototype to avoid an error.
17251 Use char because int might match the return type of a GCC
17252 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017253#ifdef __cplusplus
17254extern "C"
17255#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017256char forkpty ();
17257int
17258main ()
17259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017260return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017261 ;
17262 return 0;
17263}
17264_ACEOF
17265rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017266if { (ac_try="$ac_link"
17267case "(($ac_try" in
17268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17269 *) ac_try_echo=$ac_try;;
17270esac
17271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17272 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017273 ac_status=$?
17274 grep -v '^ *+' conftest.er1 >conftest.err
17275 rm -f conftest.er1
17276 cat conftest.err >&5
17277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017278 (exit $ac_status); } && {
17279 test -z "$ac_c_werror_flag" ||
17280 test ! -s conftest.err
17281 } && test -s conftest$ac_exeext &&
17282 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017283 ac_cv_lib_bsd_forkpty=yes
17284else
17285 echo "$as_me: failed program was:" >&5
17286sed 's/^/| /' conftest.$ac_ext >&5
17287
Martin v. Löwiseba40652007-08-30 20:10:57 +000017288 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017290
17291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017292 conftest$ac_exeext conftest.$ac_ext
17293LIBS=$ac_check_lib_save_LIBS
17294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
17296echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017297if test $ac_cv_lib_bsd_forkpty = yes; then
17298 cat >>confdefs.h <<\_ACEOF
17299#define HAVE_FORKPTY 1
17300_ACEOF
17301 LIBS="$LIBS -lbsd"
17302fi
17303
17304
17305fi
17306
Fred Drake8cef4cf2000-06-28 16:40:38 +000017307
17308fi
17309done
17310
Jack Jansendd19cf82001-12-06 22:36:17 +000017311
Brett Cannonaa5778d2008-03-18 04:09:00 +000017312# Stuff for expat.
17313
17314for ac_func in memmove
17315do
17316as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17317{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17318echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17319if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17320 echo $ECHO_N "(cached) $ECHO_C" >&6
17321else
17322 cat >conftest.$ac_ext <<_ACEOF
17323/* confdefs.h. */
17324_ACEOF
17325cat confdefs.h >>conftest.$ac_ext
17326cat >>conftest.$ac_ext <<_ACEOF
17327/* end confdefs.h. */
17328/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17329 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17330#define $ac_func innocuous_$ac_func
17331
17332/* System header to define __stub macros and hopefully few prototypes,
17333 which can conflict with char $ac_func (); below.
17334 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17335 <limits.h> exists even on freestanding compilers. */
17336
17337#ifdef __STDC__
17338# include <limits.h>
17339#else
17340# include <assert.h>
17341#endif
17342
17343#undef $ac_func
17344
17345/* Override any GCC internal prototype to avoid an error.
17346 Use char because int might match the return type of a GCC
17347 builtin and then its argument prototype would still apply. */
17348#ifdef __cplusplus
17349extern "C"
17350#endif
17351char $ac_func ();
17352/* The GNU C library defines this for functions which it implements
17353 to always fail with ENOSYS. Some functions are actually named
17354 something starting with __ and the normal name is an alias. */
17355#if defined __stub_$ac_func || defined __stub___$ac_func
17356choke me
17357#endif
17358
17359int
17360main ()
17361{
17362return $ac_func ();
17363 ;
17364 return 0;
17365}
17366_ACEOF
17367rm -f conftest.$ac_objext conftest$ac_exeext
17368if { (ac_try="$ac_link"
17369case "(($ac_try" in
17370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17371 *) ac_try_echo=$ac_try;;
17372esac
17373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17374 (eval "$ac_link") 2>conftest.er1
17375 ac_status=$?
17376 grep -v '^ *+' conftest.er1 >conftest.err
17377 rm -f conftest.er1
17378 cat conftest.err >&5
17379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17380 (exit $ac_status); } && {
17381 test -z "$ac_c_werror_flag" ||
17382 test ! -s conftest.err
17383 } && test -s conftest$ac_exeext &&
17384 $as_test_x conftest$ac_exeext; then
17385 eval "$as_ac_var=yes"
17386else
17387 echo "$as_me: failed program was:" >&5
17388sed 's/^/| /' conftest.$ac_ext >&5
17389
17390 eval "$as_ac_var=no"
17391fi
17392
17393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17394 conftest$ac_exeext conftest.$ac_ext
17395fi
17396ac_res=`eval echo '${'$as_ac_var'}'`
17397 { echo "$as_me:$LINENO: result: $ac_res" >&5
17398echo "${ECHO_T}$ac_res" >&6; }
17399if test `eval echo '${'$as_ac_var'}'` = yes; then
17400 cat >>confdefs.h <<_ACEOF
17401#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17402_ACEOF
17403
17404fi
17405done
17406
17407
Michael W. Hudson54241132001-12-07 15:38:26 +000017408# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017409
17410
17411
17412
17413
17414
Fred Drake8cef4cf2000-06-28 16:40:38 +000017415for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
17416do
Martin v. Löwis11437992002-04-12 09:54:03 +000017417as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017418{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17419echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17420if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017422else
Martin v. Löwis11437992002-04-12 09:54:03 +000017423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017424/* confdefs.h. */
17425_ACEOF
17426cat confdefs.h >>conftest.$ac_ext
17427cat >>conftest.$ac_ext <<_ACEOF
17428/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017429/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17430 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17431#define $ac_func innocuous_$ac_func
17432
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017433/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017434 which can conflict with char $ac_func (); below.
17435 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017436 <limits.h> exists even on freestanding compilers. */
17437
17438#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017439# include <limits.h>
17440#else
17441# include <assert.h>
17442#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017443
17444#undef $ac_func
17445
Martin v. Löwiseba40652007-08-30 20:10:57 +000017446/* Override any GCC internal prototype to avoid an error.
17447 Use char because int might match the return type of a GCC
17448 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017449#ifdef __cplusplus
17450extern "C"
17451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017452char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017453/* The GNU C library defines this for functions which it implements
17454 to always fail with ENOSYS. Some functions are actually named
17455 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017456#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017457choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000017458#endif
17459
Skip Montanaro6dead952003-09-25 14:50:04 +000017460int
17461main ()
17462{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017463return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017464 ;
17465 return 0;
17466}
17467_ACEOF
17468rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017469if { (ac_try="$ac_link"
17470case "(($ac_try" in
17471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17472 *) ac_try_echo=$ac_try;;
17473esac
17474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17475 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017477 grep -v '^ *+' conftest.er1 >conftest.err
17478 rm -f conftest.er1
17479 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017481 (exit $ac_status); } && {
17482 test -z "$ac_c_werror_flag" ||
17483 test ! -s conftest.err
17484 } && test -s conftest$ac_exeext &&
17485 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017486 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017487else
Martin v. Löwis11437992002-04-12 09:54:03 +000017488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017489sed 's/^/| /' conftest.$ac_ext >&5
17490
Martin v. Löwiseba40652007-08-30 20:10:57 +000017491 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017493
17494rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017495 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017497ac_res=`eval echo '${'$as_ac_var'}'`
17498 { echo "$as_me:$LINENO: result: $ac_res" >&5
17499echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017500if test `eval echo '${'$as_ac_var'}'` = yes; then
17501 cat >>confdefs.h <<_ACEOF
17502#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17503_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000017504
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017505fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017506done
17507
Michael W. Hudson54241132001-12-07 15:38:26 +000017508
Martin v. Löwis11437992002-04-12 09:54:03 +000017509
17510
17511
Brett Cannonaa5778d2008-03-18 04:09:00 +000017512for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000017513do
Martin v. Löwis11437992002-04-12 09:54:03 +000017514as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017515{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17516echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17517if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017519else
Martin v. Löwis11437992002-04-12 09:54:03 +000017520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017521/* confdefs.h. */
17522_ACEOF
17523cat confdefs.h >>conftest.$ac_ext
17524cat >>conftest.$ac_ext <<_ACEOF
17525/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017526/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17527 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17528#define $ac_func innocuous_$ac_func
17529
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017530/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017531 which can conflict with char $ac_func (); below.
17532 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017533 <limits.h> exists even on freestanding compilers. */
17534
17535#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017536# include <limits.h>
17537#else
17538# include <assert.h>
17539#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017540
17541#undef $ac_func
17542
Martin v. Löwiseba40652007-08-30 20:10:57 +000017543/* Override any GCC internal prototype to avoid an error.
17544 Use char because int might match the return type of a GCC
17545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017546#ifdef __cplusplus
17547extern "C"
17548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017549char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017550/* The GNU C library defines this for functions which it implements
17551 to always fail with ENOSYS. Some functions are actually named
17552 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017553#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017554choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017555#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017556
Skip Montanaro6dead952003-09-25 14:50:04 +000017557int
17558main ()
17559{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017560return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017561 ;
17562 return 0;
17563}
17564_ACEOF
17565rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017566if { (ac_try="$ac_link"
17567case "(($ac_try" in
17568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17569 *) ac_try_echo=$ac_try;;
17570esac
17571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17572 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017574 grep -v '^ *+' conftest.er1 >conftest.err
17575 rm -f conftest.er1
17576 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017578 (exit $ac_status); } && {
17579 test -z "$ac_c_werror_flag" ||
17580 test ! -s conftest.err
17581 } && test -s conftest$ac_exeext &&
17582 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017583 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017584else
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017586sed 's/^/| /' conftest.$ac_ext >&5
17587
Martin v. Löwiseba40652007-08-30 20:10:57 +000017588 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000017589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017590
17591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017592 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000017593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017594ac_res=`eval echo '${'$as_ac_var'}'`
17595 { echo "$as_me:$LINENO: result: $ac_res" >&5
17596echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017597if test `eval echo '${'$as_ac_var'}'` = yes; then
17598 cat >>confdefs.h <<_ACEOF
17599#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17600_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000017601
Martin v. Löwis1142de32002-03-29 16:28:31 +000017602else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017603 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000017604 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000017605 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
17606 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000017607esac
17608
Martin v. Löwis1142de32002-03-29 16:28:31 +000017609fi
17610done
17611
17612
Martin v. Löwis11437992002-04-12 09:54:03 +000017613
Martin v. Löwis1142de32002-03-29 16:28:31 +000017614for ac_func in getpgrp
17615do
Martin v. Löwis11437992002-04-12 09:54:03 +000017616as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017617{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17618echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17619if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017620 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000017621else
Martin v. Löwis11437992002-04-12 09:54:03 +000017622 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017623/* confdefs.h. */
17624_ACEOF
17625cat confdefs.h >>conftest.$ac_ext
17626cat >>conftest.$ac_ext <<_ACEOF
17627/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017628/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17629 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17630#define $ac_func innocuous_$ac_func
17631
Martin v. Löwis1142de32002-03-29 16:28:31 +000017632/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017633 which can conflict with char $ac_func (); below.
17634 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017635 <limits.h> exists even on freestanding compilers. */
17636
17637#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017638# include <limits.h>
17639#else
17640# include <assert.h>
17641#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017642
17643#undef $ac_func
17644
Martin v. Löwiseba40652007-08-30 20:10:57 +000017645/* Override any GCC internal prototype to avoid an error.
17646 Use char because int might match the return type of a GCC
17647 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017648#ifdef __cplusplus
17649extern "C"
17650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017651char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000017652/* The GNU C library defines this for functions which it implements
17653 to always fail with ENOSYS. Some functions are actually named
17654 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017655#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000017656choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000017657#endif
17658
Skip Montanaro6dead952003-09-25 14:50:04 +000017659int
17660main ()
17661{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017662return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017663 ;
17664 return 0;
17665}
17666_ACEOF
17667rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017668if { (ac_try="$ac_link"
17669case "(($ac_try" in
17670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17671 *) ac_try_echo=$ac_try;;
17672esac
17673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17674 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017676 grep -v '^ *+' conftest.er1 >conftest.err
17677 rm -f conftest.er1
17678 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017680 (exit $ac_status); } && {
17681 test -z "$ac_c_werror_flag" ||
17682 test ! -s conftest.err
17683 } && test -s conftest$ac_exeext &&
17684 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017685 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017686else
Martin v. Löwis11437992002-04-12 09:54:03 +000017687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017688sed 's/^/| /' conftest.$ac_ext >&5
17689
Martin v. Löwiseba40652007-08-30 20:10:57 +000017690 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017692
17693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017694 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017696ac_res=`eval echo '${'$as_ac_var'}'`
17697 { echo "$as_me:$LINENO: result: $ac_res" >&5
17698echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017699if test `eval echo '${'$as_ac_var'}'` = yes; then
17700 cat >>confdefs.h <<_ACEOF
17701#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17702_ACEOF
17703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017704/* confdefs.h. */
17705_ACEOF
17706cat confdefs.h >>conftest.$ac_ext
17707cat >>conftest.$ac_ext <<_ACEOF
17708/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017709#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017710int
17711main ()
17712{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017713getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017714 ;
17715 return 0;
17716}
17717_ACEOF
17718rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017719if { (ac_try="$ac_compile"
17720case "(($ac_try" in
17721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17722 *) ac_try_echo=$ac_try;;
17723esac
17724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017727 grep -v '^ *+' conftest.er1 >conftest.err
17728 rm -f conftest.er1
17729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017731 (exit $ac_status); } && {
17732 test -z "$ac_c_werror_flag" ||
17733 test ! -s conftest.err
17734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017735
17736cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017737#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017738_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017739
Martin v. Löwis11437992002-04-12 09:54:03 +000017740
Guido van Rossumf78abae1997-01-21 22:02:36 +000017741else
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017743sed 's/^/| /' conftest.$ac_ext >&5
17744
Martin v. Löwiseba40652007-08-30 20:10:57 +000017745
Guido van Rossum627b2d71993-12-24 10:39:16 +000017746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017747
17748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017749
Guido van Rossum627b2d71993-12-24 10:39:16 +000017750fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017751done
Guido van Rossum627b2d71993-12-24 10:39:16 +000017752
Jack Jansen150753c2003-03-29 22:07:47 +000017753
17754for ac_func in setpgrp
17755do
17756as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017757{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17758echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17759if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017760 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017761else
Martin v. Löwis11437992002-04-12 09:54:03 +000017762 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017763/* confdefs.h. */
17764_ACEOF
17765cat confdefs.h >>conftest.$ac_ext
17766cat >>conftest.$ac_ext <<_ACEOF
17767/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017768/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17769 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17770#define $ac_func innocuous_$ac_func
17771
Jack Jansen150753c2003-03-29 22:07:47 +000017772/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017773 which can conflict with char $ac_func (); below.
17774 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017775 <limits.h> exists even on freestanding compilers. */
17776
17777#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017778# include <limits.h>
17779#else
17780# include <assert.h>
17781#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017782
17783#undef $ac_func
17784
Martin v. Löwiseba40652007-08-30 20:10:57 +000017785/* Override any GCC internal prototype to avoid an error.
17786 Use char because int might match the return type of a GCC
17787 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000017788#ifdef __cplusplus
17789extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000017790#endif
Jack Jansen150753c2003-03-29 22:07:47 +000017791char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000017792/* The GNU C library defines this for functions which it implements
17793 to always fail with ENOSYS. Some functions are actually named
17794 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017795#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000017796choke me
Jack Jansen150753c2003-03-29 22:07:47 +000017797#endif
17798
Skip Montanaro6dead952003-09-25 14:50:04 +000017799int
17800main ()
17801{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017802return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017803 ;
17804 return 0;
17805}
17806_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017807rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017808if { (ac_try="$ac_link"
17809case "(($ac_try" in
17810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17811 *) ac_try_echo=$ac_try;;
17812esac
17813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17814 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017816 grep -v '^ *+' conftest.er1 >conftest.err
17817 rm -f conftest.er1
17818 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017820 (exit $ac_status); } && {
17821 test -z "$ac_c_werror_flag" ||
17822 test ! -s conftest.err
17823 } && test -s conftest$ac_exeext &&
17824 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000017825 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017826else
Jack Jansen150753c2003-03-29 22:07:47 +000017827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017828sed 's/^/| /' conftest.$ac_ext >&5
17829
Martin v. Löwiseba40652007-08-30 20:10:57 +000017830 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017831fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017832
17833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017834 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017835fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017836ac_res=`eval echo '${'$as_ac_var'}'`
17837 { echo "$as_me:$LINENO: result: $ac_res" >&5
17838echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000017839if test `eval echo '${'$as_ac_var'}'` = yes; then
17840 cat >>confdefs.h <<_ACEOF
17841#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17842_ACEOF
17843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017844/* confdefs.h. */
17845_ACEOF
17846cat confdefs.h >>conftest.$ac_ext
17847cat >>conftest.$ac_ext <<_ACEOF
17848/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000017849#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000017850int
17851main ()
17852{
17853setpgrp(0,0);
17854 ;
17855 return 0;
17856}
17857_ACEOF
17858rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017859if { (ac_try="$ac_compile"
17860case "(($ac_try" in
17861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17862 *) ac_try_echo=$ac_try;;
17863esac
17864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17865 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000017866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017867 grep -v '^ *+' conftest.er1 >conftest.err
17868 rm -f conftest.er1
17869 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000017870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017871 (exit $ac_status); } && {
17872 test -z "$ac_c_werror_flag" ||
17873 test ! -s conftest.err
17874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017875
17876cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000017877#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017878_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017879
Jack Jansen150753c2003-03-29 22:07:47 +000017880
17881else
17882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017883sed 's/^/| /' conftest.$ac_ext >&5
17884
Martin v. Löwiseba40652007-08-30 20:10:57 +000017885
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017887
17888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000017889
17890fi
17891done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000017892
Martin v. Löwis11437992002-04-12 09:54:03 +000017893
Thomas Wouters3a584202000-08-05 23:28:51 +000017894for ac_func in gettimeofday
17895do
Martin v. Löwis11437992002-04-12 09:54:03 +000017896as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017897{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17898echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17899if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017901else
Martin v. Löwis11437992002-04-12 09:54:03 +000017902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017903/* confdefs.h. */
17904_ACEOF
17905cat confdefs.h >>conftest.$ac_ext
17906cat >>conftest.$ac_ext <<_ACEOF
17907/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017908/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17909 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17910#define $ac_func innocuous_$ac_func
17911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017912/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017913 which can conflict with char $ac_func (); below.
17914 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017915 <limits.h> exists even on freestanding compilers. */
17916
17917#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017918# include <limits.h>
17919#else
17920# include <assert.h>
17921#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017922
17923#undef $ac_func
17924
Martin v. Löwiseba40652007-08-30 20:10:57 +000017925/* Override any GCC internal prototype to avoid an error.
17926 Use char because int might match the return type of a GCC
17927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017928#ifdef __cplusplus
17929extern "C"
17930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017931char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017932/* The GNU C library defines this for functions which it implements
17933 to always fail with ENOSYS. Some functions are actually named
17934 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017935#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017936choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017937#endif
17938
Skip Montanaro6dead952003-09-25 14:50:04 +000017939int
17940main ()
17941{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017942return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017943 ;
17944 return 0;
17945}
17946_ACEOF
17947rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017948if { (ac_try="$ac_link"
17949case "(($ac_try" in
17950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17951 *) ac_try_echo=$ac_try;;
17952esac
17953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17954 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017956 grep -v '^ *+' conftest.er1 >conftest.err
17957 rm -f conftest.er1
17958 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017960 (exit $ac_status); } && {
17961 test -z "$ac_c_werror_flag" ||
17962 test ! -s conftest.err
17963 } && test -s conftest$ac_exeext &&
17964 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017965 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017966else
Martin v. Löwis11437992002-04-12 09:54:03 +000017967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017968sed 's/^/| /' conftest.$ac_ext >&5
17969
Martin v. Löwiseba40652007-08-30 20:10:57 +000017970 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017972
17973rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017974 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017976ac_res=`eval echo '${'$as_ac_var'}'`
17977 { echo "$as_me:$LINENO: result: $ac_res" >&5
17978echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017979if test `eval echo '${'$as_ac_var'}'` = yes; then
17980 cat >>confdefs.h <<_ACEOF
17981#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17982_ACEOF
17983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017984/* confdefs.h. */
17985_ACEOF
17986cat confdefs.h >>conftest.$ac_ext
17987cat >>conftest.$ac_ext <<_ACEOF
17988/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017989#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017990int
17991main ()
17992{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017993gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017994 ;
17995 return 0;
17996}
17997_ACEOF
17998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017999if { (ac_try="$ac_compile"
18000case "(($ac_try" in
18001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18002 *) ac_try_echo=$ac_try;;
18003esac
18004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018007 grep -v '^ *+' conftest.er1 >conftest.err
18008 rm -f conftest.er1
18009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018011 (exit $ac_status); } && {
18012 test -z "$ac_c_werror_flag" ||
18013 test ! -s conftest.err
18014 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018015 :
18016else
Martin v. Löwis11437992002-04-12 09:54:03 +000018017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018018sed 's/^/| /' conftest.$ac_ext >&5
18019
Martin v. Löwis11437992002-04-12 09:54:03 +000018020
18021cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018022#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018023_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018024
Martin v. Löwis11437992002-04-12 09:54:03 +000018025
Guido van Rossum627b2d71993-12-24 10:39:16 +000018026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018027
18028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018029
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018030fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018031done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018032
Michael W. Hudson54241132001-12-07 15:38:26 +000018033
Martin v. Löwiseba40652007-08-30 20:10:57 +000018034{ echo "$as_me:$LINENO: checking for major" >&5
18035echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018037/* confdefs.h. */
18038_ACEOF
18039cat confdefs.h >>conftest.$ac_ext
18040cat >>conftest.$ac_ext <<_ACEOF
18041/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018042
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018043#if defined(MAJOR_IN_MKDEV)
18044#include <sys/mkdev.h>
18045#elif defined(MAJOR_IN_SYSMACROS)
18046#include <sys/sysmacros.h>
18047#else
18048#include <sys/types.h>
18049#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018050
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018051int
18052main ()
18053{
18054
18055 makedev(major(0),minor(0));
18056
18057 ;
18058 return 0;
18059}
18060_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018061rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018062if { (ac_try="$ac_link"
18063case "(($ac_try" in
18064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18065 *) ac_try_echo=$ac_try;;
18066esac
18067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018070 grep -v '^ *+' conftest.er1 >conftest.err
18071 rm -f conftest.er1
18072 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018074 (exit $ac_status); } && {
18075 test -z "$ac_c_werror_flag" ||
18076 test ! -s conftest.err
18077 } && test -s conftest$ac_exeext &&
18078 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018079
18080
18081cat >>confdefs.h <<\_ACEOF
18082#define HAVE_DEVICE_MACROS 1
18083_ACEOF
18084
Martin v. Löwiseba40652007-08-30 20:10:57 +000018085 { echo "$as_me:$LINENO: result: yes" >&5
18086echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018087
18088else
18089 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018090sed 's/^/| /' conftest.$ac_ext >&5
18091
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018092
Martin v. Löwiseba40652007-08-30 20:10:57 +000018093 { echo "$as_me:$LINENO: result: no" >&5
18094echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018095
18096fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018097
18098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018099 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018100
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018101# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018102# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018103{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18104echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018105cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018106/* confdefs.h. */
18107_ACEOF
18108cat confdefs.h >>conftest.$ac_ext
18109cat >>conftest.$ac_ext <<_ACEOF
18110/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018111
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018112#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018113#include <sys/socket.h>
18114#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018115#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018116
Martin v. Löwis11437992002-04-12 09:54:03 +000018117int
18118main ()
18119{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018120
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018121getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018122
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 ;
18124 return 0;
18125}
18126_ACEOF
18127rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018128if { (ac_try="$ac_link"
18129case "(($ac_try" in
18130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18131 *) ac_try_echo=$ac_try;;
18132esac
18133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18134 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018136 grep -v '^ *+' conftest.er1 >conftest.err
18137 rm -f conftest.er1
18138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018140 (exit $ac_status); } && {
18141 test -z "$ac_c_werror_flag" ||
18142 test ! -s conftest.err
18143 } && test -s conftest$ac_exeext &&
18144 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018145
Martin v. Löwiseba40652007-08-30 20:10:57 +000018146{ echo "$as_me:$LINENO: result: yes" >&5
18147echo "${ECHO_T}yes" >&6; }
18148{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18149echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018150if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151 { echo "$as_me:$LINENO: result: buggy" >&5
18152echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018153buggygetaddrinfo=yes
18154else
Martin v. Löwis11437992002-04-12 09:54:03 +000018155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018156/* confdefs.h. */
18157_ACEOF
18158cat confdefs.h >>conftest.$ac_ext
18159cat >>conftest.$ac_ext <<_ACEOF
18160/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018161
18162#include <sys/types.h>
18163#include <netdb.h>
18164#include <string.h>
18165#include <sys/socket.h>
18166#include <netinet/in.h>
18167
18168main()
18169{
18170 int passive, gaierr, inet4 = 0, inet6 = 0;
18171 struct addrinfo hints, *ai, *aitop;
18172 char straddr[INET6_ADDRSTRLEN], strport[16];
18173
18174 for (passive = 0; passive <= 1; passive++) {
18175 memset(&hints, 0, sizeof(hints));
18176 hints.ai_family = AF_UNSPEC;
18177 hints.ai_flags = passive ? AI_PASSIVE : 0;
18178 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018179 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018180 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18181 (void)gai_strerror(gaierr);
18182 goto bad;
18183 }
18184 for (ai = aitop; ai; ai = ai->ai_next) {
18185 if (ai->ai_addr == NULL ||
18186 ai->ai_addrlen == 0 ||
18187 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18188 straddr, sizeof(straddr), strport, sizeof(strport),
18189 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18190 goto bad;
18191 }
18192 switch (ai->ai_family) {
18193 case AF_INET:
18194 if (strcmp(strport, "54321") != 0) {
18195 goto bad;
18196 }
18197 if (passive) {
18198 if (strcmp(straddr, "0.0.0.0") != 0) {
18199 goto bad;
18200 }
18201 } else {
18202 if (strcmp(straddr, "127.0.0.1") != 0) {
18203 goto bad;
18204 }
18205 }
18206 inet4++;
18207 break;
18208 case AF_INET6:
18209 if (strcmp(strport, "54321") != 0) {
18210 goto bad;
18211 }
18212 if (passive) {
18213 if (strcmp(straddr, "::") != 0) {
18214 goto bad;
18215 }
18216 } else {
18217 if (strcmp(straddr, "::1") != 0) {
18218 goto bad;
18219 }
18220 }
18221 inet6++;
18222 break;
18223 case AF_UNSPEC:
18224 goto bad;
18225 break;
18226 default:
18227 /* another family support? */
18228 break;
18229 }
18230 }
18231 }
18232
18233 if (!(inet4 == 0 || inet4 == 2))
18234 goto bad;
18235 if (!(inet6 == 0 || inet6 == 2))
18236 goto bad;
18237
18238 if (aitop)
18239 freeaddrinfo(aitop);
18240 exit(0);
18241
18242 bad:
18243 if (aitop)
18244 freeaddrinfo(aitop);
18245 exit(1);
18246}
18247
Martin v. Löwis11437992002-04-12 09:54:03 +000018248_ACEOF
18249rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018250if { (ac_try="$ac_link"
18251case "(($ac_try" in
18252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18253 *) ac_try_echo=$ac_try;;
18254esac
18255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18256 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018257 ac_status=$?
18258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18259 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260 { (case "(($ac_try" in
18261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18262 *) ac_try_echo=$ac_try;;
18263esac
18264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18265 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018266 ac_status=$?
18267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18268 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018269 { echo "$as_me:$LINENO: result: good" >&5
18270echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018271buggygetaddrinfo=no
18272else
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 echo "$as_me: program exited with status $ac_status" >&5
18274echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018275sed 's/^/| /' conftest.$ac_ext >&5
18276
Martin v. Löwis11437992002-04-12 09:54:03 +000018277( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278{ echo "$as_me:$LINENO: result: buggy" >&5
18279echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018280buggygetaddrinfo=yes
18281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018282rm -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 +000018283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018284
18285
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018286else
Martin v. Löwis11437992002-04-12 09:54:03 +000018287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018288sed 's/^/| /' conftest.$ac_ext >&5
18289
Martin v. Löwis11437992002-04-12 09:54:03 +000018290
Martin v. Löwiseba40652007-08-30 20:10:57 +000018291{ echo "$as_me:$LINENO: result: no" >&5
18292echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018293buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018294
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018296
18297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018299
18300if test "$buggygetaddrinfo" = "yes"; then
18301 if test "$ipv6" = "yes"; then
18302 echo 'Fatal: You must get working getaddrinfo() function.'
18303 echo ' or you can specify "--disable-ipv6"'.
18304 exit 1
18305 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018306else
Martin v. Löwis11437992002-04-12 09:54:03 +000018307
18308cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018309#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018310_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018311
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018313
Jack Jansen9a66b6d2001-08-08 13:56:14 +000018314for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018315do
Martin v. Löwis11437992002-04-12 09:54:03 +000018316as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018317{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18318echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18319if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018320 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018321else
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018323/* confdefs.h. */
18324_ACEOF
18325cat confdefs.h >>conftest.$ac_ext
18326cat >>conftest.$ac_ext <<_ACEOF
18327/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018328/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18329 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18330#define $ac_func innocuous_$ac_func
18331
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018332/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018333 which can conflict with char $ac_func (); below.
18334 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018335 <limits.h> exists even on freestanding compilers. */
18336
18337#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018338# include <limits.h>
18339#else
18340# include <assert.h>
18341#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018342
18343#undef $ac_func
18344
Martin v. Löwiseba40652007-08-30 20:10:57 +000018345/* Override any GCC internal prototype to avoid an error.
18346 Use char because int might match the return type of a GCC
18347 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018348#ifdef __cplusplus
18349extern "C"
18350#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018351char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018352/* The GNU C library defines this for functions which it implements
18353 to always fail with ENOSYS. Some functions are actually named
18354 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018355#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018356choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018357#endif
18358
Skip Montanaro6dead952003-09-25 14:50:04 +000018359int
18360main ()
18361{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018362return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018363 ;
18364 return 0;
18365}
18366_ACEOF
18367rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018368if { (ac_try="$ac_link"
18369case "(($ac_try" in
18370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18371 *) ac_try_echo=$ac_try;;
18372esac
18373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18374 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018375 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018376 grep -v '^ *+' conftest.er1 >conftest.err
18377 rm -f conftest.er1
18378 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018380 (exit $ac_status); } && {
18381 test -z "$ac_c_werror_flag" ||
18382 test ! -s conftest.err
18383 } && test -s conftest$ac_exeext &&
18384 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018385 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018386else
Martin v. Löwis11437992002-04-12 09:54:03 +000018387 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018388sed 's/^/| /' conftest.$ac_ext >&5
18389
Martin v. Löwiseba40652007-08-30 20:10:57 +000018390 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018392
18393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018394 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018395fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018396ac_res=`eval echo '${'$as_ac_var'}'`
18397 { echo "$as_me:$LINENO: result: $ac_res" >&5
18398echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018399if test `eval echo '${'$as_ac_var'}'` = yes; then
18400 cat >>confdefs.h <<_ACEOF
18401#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18402_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018403
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018404fi
18405done
18406
Michael W. Hudson54241132001-12-07 15:38:26 +000018407
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018408# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000018409{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
18410echo $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 +000018411if test "${ac_cv_header_time+set}" = set; then
18412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018413else
Martin v. Löwis11437992002-04-12 09:54:03 +000018414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018415/* confdefs.h. */
18416_ACEOF
18417cat confdefs.h >>conftest.$ac_ext
18418cat >>conftest.$ac_ext <<_ACEOF
18419/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018420#include <sys/types.h>
18421#include <sys/time.h>
18422#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018423
Martin v. Löwis11437992002-04-12 09:54:03 +000018424int
18425main ()
18426{
18427if ((struct tm *) 0)
18428return 0;
18429 ;
18430 return 0;
18431}
18432_ACEOF
18433rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018434if { (ac_try="$ac_compile"
18435case "(($ac_try" in
18436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18437 *) ac_try_echo=$ac_try;;
18438esac
18439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18440 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018442 grep -v '^ *+' conftest.er1 >conftest.err
18443 rm -f conftest.er1
18444 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018446 (exit $ac_status); } && {
18447 test -z "$ac_c_werror_flag" ||
18448 test ! -s conftest.err
18449 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018450 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018451else
Martin v. Löwis11437992002-04-12 09:54:03 +000018452 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018453sed 's/^/| /' conftest.$ac_ext >&5
18454
Martin v. Löwiseba40652007-08-30 20:10:57 +000018455 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018457
18458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018459fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018460{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
18461echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018462if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018463
18464cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018465#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018466_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018467
18468fi
18469
Martin v. Löwiseba40652007-08-30 20:10:57 +000018470{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
18471echo $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 +000018472if test "${ac_cv_struct_tm+set}" = set; then
18473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018474else
Martin v. Löwis11437992002-04-12 09:54:03 +000018475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018476/* confdefs.h. */
18477_ACEOF
18478cat confdefs.h >>conftest.$ac_ext
18479cat >>conftest.$ac_ext <<_ACEOF
18480/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018481#include <sys/types.h>
18482#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018483
Martin v. Löwis11437992002-04-12 09:54:03 +000018484int
18485main ()
18486{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018487struct tm tm;
18488 int *p = &tm.tm_sec;
18489 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 ;
18491 return 0;
18492}
18493_ACEOF
18494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018495if { (ac_try="$ac_compile"
18496case "(($ac_try" in
18497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18498 *) ac_try_echo=$ac_try;;
18499esac
18500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018503 grep -v '^ *+' conftest.er1 >conftest.err
18504 rm -f conftest.er1
18505 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018507 (exit $ac_status); } && {
18508 test -z "$ac_c_werror_flag" ||
18509 test ! -s conftest.err
18510 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018511 ac_cv_struct_tm=time.h
18512else
Martin v. Löwis11437992002-04-12 09:54:03 +000018513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018514sed 's/^/| /' conftest.$ac_ext >&5
18515
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518
18519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018520fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018521{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
18522echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018523if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018524
18525cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018526#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018527_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018528
18529fi
18530
Martin v. Löwiseba40652007-08-30 20:10:57 +000018531{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
18532echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018533if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
18534 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018535else
Martin v. Löwis11437992002-04-12 09:54:03 +000018536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018537/* confdefs.h. */
18538_ACEOF
18539cat confdefs.h >>conftest.$ac_ext
18540cat >>conftest.$ac_ext <<_ACEOF
18541/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018542#include <sys/types.h>
18543#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000018544
18545
Martin v. Löwis11437992002-04-12 09:54:03 +000018546int
18547main ()
18548{
18549static struct tm ac_aggr;
18550if (ac_aggr.tm_zone)
18551return 0;
18552 ;
18553 return 0;
18554}
18555_ACEOF
18556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018557if { (ac_try="$ac_compile"
18558case "(($ac_try" in
18559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18560 *) ac_try_echo=$ac_try;;
18561esac
18562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018565 grep -v '^ *+' conftest.er1 >conftest.err
18566 rm -f conftest.er1
18567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018569 (exit $ac_status); } && {
18570 test -z "$ac_c_werror_flag" ||
18571 test ! -s conftest.err
18572 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018573 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018574else
Martin v. Löwis11437992002-04-12 09:54:03 +000018575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018576sed 's/^/| /' conftest.$ac_ext >&5
18577
Martin v. Löwiseba40652007-08-30 20:10:57 +000018578 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018579/* confdefs.h. */
18580_ACEOF
18581cat confdefs.h >>conftest.$ac_ext
18582cat >>conftest.$ac_ext <<_ACEOF
18583/* end confdefs.h. */
18584#include <sys/types.h>
18585#include <$ac_cv_struct_tm>
18586
18587
18588int
18589main ()
18590{
18591static struct tm ac_aggr;
18592if (sizeof ac_aggr.tm_zone)
18593return 0;
18594 ;
18595 return 0;
18596}
18597_ACEOF
18598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018599if { (ac_try="$ac_compile"
18600case "(($ac_try" in
18601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18602 *) ac_try_echo=$ac_try;;
18603esac
18604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18605 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018607 grep -v '^ *+' conftest.er1 >conftest.err
18608 rm -f conftest.er1
18609 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018611 (exit $ac_status); } && {
18612 test -z "$ac_c_werror_flag" ||
18613 test ! -s conftest.err
18614 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018615 ac_cv_member_struct_tm_tm_zone=yes
18616else
18617 echo "$as_me: failed program was:" >&5
18618sed 's/^/| /' conftest.$ac_ext >&5
18619
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018622
18623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018624fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018625
18626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018628{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
18629echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018630if test $ac_cv_member_struct_tm_tm_zone = yes; then
18631
18632cat >>confdefs.h <<_ACEOF
18633#define HAVE_STRUCT_TM_TM_ZONE 1
18634_ACEOF
18635
18636
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018637fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018638
Martin v. Löwis11437992002-04-12 09:54:03 +000018639if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
18640
18641cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018642#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018644
18645else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018646 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
18647echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
18648if test "${ac_cv_have_decl_tzname+set}" = set; then
18649 echo $ECHO_N "(cached) $ECHO_C" >&6
18650else
18651 cat >conftest.$ac_ext <<_ACEOF
18652/* confdefs.h. */
18653_ACEOF
18654cat confdefs.h >>conftest.$ac_ext
18655cat >>conftest.$ac_ext <<_ACEOF
18656/* end confdefs.h. */
18657#include <time.h>
18658
18659int
18660main ()
18661{
18662#ifndef tzname
18663 (void) tzname;
18664#endif
18665
18666 ;
18667 return 0;
18668}
18669_ACEOF
18670rm -f conftest.$ac_objext
18671if { (ac_try="$ac_compile"
18672case "(($ac_try" in
18673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18674 *) ac_try_echo=$ac_try;;
18675esac
18676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18677 (eval "$ac_compile") 2>conftest.er1
18678 ac_status=$?
18679 grep -v '^ *+' conftest.er1 >conftest.err
18680 rm -f conftest.er1
18681 cat conftest.err >&5
18682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18683 (exit $ac_status); } && {
18684 test -z "$ac_c_werror_flag" ||
18685 test ! -s conftest.err
18686 } && test -s conftest.$ac_objext; then
18687 ac_cv_have_decl_tzname=yes
18688else
18689 echo "$as_me: failed program was:" >&5
18690sed 's/^/| /' conftest.$ac_ext >&5
18691
18692 ac_cv_have_decl_tzname=no
18693fi
18694
18695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18696fi
18697{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
18698echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
18699if test $ac_cv_have_decl_tzname = yes; then
18700
18701cat >>confdefs.h <<_ACEOF
18702#define HAVE_DECL_TZNAME 1
18703_ACEOF
18704
18705
18706else
18707 cat >>confdefs.h <<_ACEOF
18708#define HAVE_DECL_TZNAME 0
18709_ACEOF
18710
18711
18712fi
18713
18714
18715 { echo "$as_me:$LINENO: checking for tzname" >&5
18716echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018717if test "${ac_cv_var_tzname+set}" = set; then
18718 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018719else
Martin v. Löwis11437992002-04-12 09:54:03 +000018720 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018721/* confdefs.h. */
18722_ACEOF
18723cat confdefs.h >>conftest.$ac_ext
18724cat >>conftest.$ac_ext <<_ACEOF
18725/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018726#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000018727#if !HAVE_DECL_TZNAME
18728extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000018729#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018730
Martin v. Löwis11437992002-04-12 09:54:03 +000018731int
18732main ()
18733{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018734return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000018735 ;
18736 return 0;
18737}
18738_ACEOF
18739rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018740if { (ac_try="$ac_link"
18741case "(($ac_try" in
18742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18743 *) ac_try_echo=$ac_try;;
18744esac
18745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18746 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018748 grep -v '^ *+' conftest.er1 >conftest.err
18749 rm -f conftest.er1
18750 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018752 (exit $ac_status); } && {
18753 test -z "$ac_c_werror_flag" ||
18754 test ! -s conftest.err
18755 } && test -s conftest$ac_exeext &&
18756 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018757 ac_cv_var_tzname=yes
18758else
Martin v. Löwis11437992002-04-12 09:54:03 +000018759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018760sed 's/^/| /' conftest.$ac_ext >&5
18761
Martin v. Löwiseba40652007-08-30 20:10:57 +000018762 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000018763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018764
18765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018766 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000018767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018768{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
18769echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018770 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018771
18772cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018773#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018774_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018775
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018776 fi
18777fi
18778
Martin v. Löwiseba40652007-08-30 20:10:57 +000018779{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
18780echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018781if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
18782 echo $ECHO_N "(cached) $ECHO_C" >&6
18783else
18784 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018785/* confdefs.h. */
18786_ACEOF
18787cat confdefs.h >>conftest.$ac_ext
18788cat >>conftest.$ac_ext <<_ACEOF
18789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018791int
18792main ()
18793{
18794static struct stat ac_aggr;
18795if (ac_aggr.st_rdev)
18796return 0;
18797 ;
18798 return 0;
18799}
18800_ACEOF
18801rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018802if { (ac_try="$ac_compile"
18803case "(($ac_try" in
18804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18805 *) ac_try_echo=$ac_try;;
18806esac
18807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18808 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018810 grep -v '^ *+' conftest.er1 >conftest.err
18811 rm -f conftest.er1
18812 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018814 (exit $ac_status); } && {
18815 test -z "$ac_c_werror_flag" ||
18816 test ! -s conftest.err
18817 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018818 ac_cv_member_struct_stat_st_rdev=yes
18819else
18820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018821sed 's/^/| /' conftest.$ac_ext >&5
18822
Martin v. Löwiseba40652007-08-30 20:10:57 +000018823 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018824/* confdefs.h. */
18825_ACEOF
18826cat confdefs.h >>conftest.$ac_ext
18827cat >>conftest.$ac_ext <<_ACEOF
18828/* end confdefs.h. */
18829$ac_includes_default
18830int
18831main ()
18832{
18833static struct stat ac_aggr;
18834if (sizeof ac_aggr.st_rdev)
18835return 0;
18836 ;
18837 return 0;
18838}
18839_ACEOF
18840rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018841if { (ac_try="$ac_compile"
18842case "(($ac_try" in
18843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18844 *) ac_try_echo=$ac_try;;
18845esac
18846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18847 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018849 grep -v '^ *+' conftest.er1 >conftest.err
18850 rm -f conftest.er1
18851 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018853 (exit $ac_status); } && {
18854 test -z "$ac_c_werror_flag" ||
18855 test ! -s conftest.err
18856 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018857 ac_cv_member_struct_stat_st_rdev=yes
18858else
18859 echo "$as_me: failed program was:" >&5
18860sed 's/^/| /' conftest.$ac_ext >&5
18861
Martin v. Löwiseba40652007-08-30 20:10:57 +000018862 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018864
18865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018866fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018867
18868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018869fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018870{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
18871echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018872if test $ac_cv_member_struct_stat_st_rdev = yes; then
18873
18874cat >>confdefs.h <<_ACEOF
18875#define HAVE_STRUCT_STAT_ST_RDEV 1
18876_ACEOF
18877
18878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018879fi
18880
Martin v. Löwiseba40652007-08-30 20:10:57 +000018881{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
18882echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018883if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
18884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018885else
Martin v. Löwis11437992002-04-12 09:54:03 +000018886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018887/* confdefs.h. */
18888_ACEOF
18889cat confdefs.h >>conftest.$ac_ext
18890cat >>conftest.$ac_ext <<_ACEOF
18891/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018892$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018893int
18894main ()
18895{
18896static struct stat ac_aggr;
18897if (ac_aggr.st_blksize)
18898return 0;
18899 ;
18900 return 0;
18901}
18902_ACEOF
18903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018904if { (ac_try="$ac_compile"
18905case "(($ac_try" in
18906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18907 *) ac_try_echo=$ac_try;;
18908esac
18909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018912 grep -v '^ *+' conftest.er1 >conftest.err
18913 rm -f conftest.er1
18914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018916 (exit $ac_status); } && {
18917 test -z "$ac_c_werror_flag" ||
18918 test ! -s conftest.err
18919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018921else
Martin v. Löwis11437992002-04-12 09:54:03 +000018922 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018923sed 's/^/| /' conftest.$ac_ext >&5
18924
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018926/* confdefs.h. */
18927_ACEOF
18928cat confdefs.h >>conftest.$ac_ext
18929cat >>conftest.$ac_ext <<_ACEOF
18930/* end confdefs.h. */
18931$ac_includes_default
18932int
18933main ()
18934{
18935static struct stat ac_aggr;
18936if (sizeof ac_aggr.st_blksize)
18937return 0;
18938 ;
18939 return 0;
18940}
18941_ACEOF
18942rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943if { (ac_try="$ac_compile"
18944case "(($ac_try" in
18945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18946 *) ac_try_echo=$ac_try;;
18947esac
18948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18949 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018951 grep -v '^ *+' conftest.er1 >conftest.err
18952 rm -f conftest.er1
18953 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018955 (exit $ac_status); } && {
18956 test -z "$ac_c_werror_flag" ||
18957 test ! -s conftest.err
18958 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018959 ac_cv_member_struct_stat_st_blksize=yes
18960else
18961 echo "$as_me: failed program was:" >&5
18962sed 's/^/| /' conftest.$ac_ext >&5
18963
Martin v. Löwiseba40652007-08-30 20:10:57 +000018964 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018966
18967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018969
18970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018971fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018972{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
18973echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018974if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018975
Martin v. Löwis11437992002-04-12 09:54:03 +000018976cat >>confdefs.h <<_ACEOF
18977#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
18978_ACEOF
18979
18980
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018981fi
18982
Martin v. Löwiseba40652007-08-30 20:10:57 +000018983{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
18984echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018985if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
18986 echo $ECHO_N "(cached) $ECHO_C" >&6
18987else
18988 cat >conftest.$ac_ext <<_ACEOF
18989/* confdefs.h. */
18990_ACEOF
18991cat confdefs.h >>conftest.$ac_ext
18992cat >>conftest.$ac_ext <<_ACEOF
18993/* end confdefs.h. */
18994$ac_includes_default
18995int
18996main ()
18997{
18998static struct stat ac_aggr;
18999if (ac_aggr.st_flags)
19000return 0;
19001 ;
19002 return 0;
19003}
19004_ACEOF
19005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019006if { (ac_try="$ac_compile"
19007case "(($ac_try" in
19008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19009 *) ac_try_echo=$ac_try;;
19010esac
19011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19012 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019013 ac_status=$?
19014 grep -v '^ *+' conftest.er1 >conftest.err
19015 rm -f conftest.er1
19016 cat conftest.err >&5
19017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019018 (exit $ac_status); } && {
19019 test -z "$ac_c_werror_flag" ||
19020 test ! -s conftest.err
19021 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019022 ac_cv_member_struct_stat_st_flags=yes
19023else
19024 echo "$as_me: failed program was:" >&5
19025sed 's/^/| /' conftest.$ac_ext >&5
19026
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019028/* confdefs.h. */
19029_ACEOF
19030cat confdefs.h >>conftest.$ac_ext
19031cat >>conftest.$ac_ext <<_ACEOF
19032/* end confdefs.h. */
19033$ac_includes_default
19034int
19035main ()
19036{
19037static struct stat ac_aggr;
19038if (sizeof ac_aggr.st_flags)
19039return 0;
19040 ;
19041 return 0;
19042}
19043_ACEOF
19044rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019045if { (ac_try="$ac_compile"
19046case "(($ac_try" in
19047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19048 *) ac_try_echo=$ac_try;;
19049esac
19050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19051 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019052 ac_status=$?
19053 grep -v '^ *+' conftest.er1 >conftest.err
19054 rm -f conftest.er1
19055 cat conftest.err >&5
19056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019057 (exit $ac_status); } && {
19058 test -z "$ac_c_werror_flag" ||
19059 test ! -s conftest.err
19060 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019061 ac_cv_member_struct_stat_st_flags=yes
19062else
19063 echo "$as_me: failed program was:" >&5
19064sed 's/^/| /' conftest.$ac_ext >&5
19065
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019068
19069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019070fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019071
19072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019074{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19075echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019076if test $ac_cv_member_struct_stat_st_flags = yes; then
19077
19078cat >>confdefs.h <<_ACEOF
19079#define HAVE_STRUCT_STAT_ST_FLAGS 1
19080_ACEOF
19081
19082
19083fi
19084
Martin v. Löwiseba40652007-08-30 20:10:57 +000019085{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19086echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019087if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19088 echo $ECHO_N "(cached) $ECHO_C" >&6
19089else
19090 cat >conftest.$ac_ext <<_ACEOF
19091/* confdefs.h. */
19092_ACEOF
19093cat confdefs.h >>conftest.$ac_ext
19094cat >>conftest.$ac_ext <<_ACEOF
19095/* end confdefs.h. */
19096$ac_includes_default
19097int
19098main ()
19099{
19100static struct stat ac_aggr;
19101if (ac_aggr.st_gen)
19102return 0;
19103 ;
19104 return 0;
19105}
19106_ACEOF
19107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019108if { (ac_try="$ac_compile"
19109case "(($ac_try" in
19110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19111 *) ac_try_echo=$ac_try;;
19112esac
19113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19114 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019115 ac_status=$?
19116 grep -v '^ *+' conftest.er1 >conftest.err
19117 rm -f conftest.er1
19118 cat conftest.err >&5
19119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019120 (exit $ac_status); } && {
19121 test -z "$ac_c_werror_flag" ||
19122 test ! -s conftest.err
19123 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019124 ac_cv_member_struct_stat_st_gen=yes
19125else
19126 echo "$as_me: failed program was:" >&5
19127sed 's/^/| /' conftest.$ac_ext >&5
19128
Martin v. Löwiseba40652007-08-30 20:10:57 +000019129 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019130/* confdefs.h. */
19131_ACEOF
19132cat confdefs.h >>conftest.$ac_ext
19133cat >>conftest.$ac_ext <<_ACEOF
19134/* end confdefs.h. */
19135$ac_includes_default
19136int
19137main ()
19138{
19139static struct stat ac_aggr;
19140if (sizeof ac_aggr.st_gen)
19141return 0;
19142 ;
19143 return 0;
19144}
19145_ACEOF
19146rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019147if { (ac_try="$ac_compile"
19148case "(($ac_try" in
19149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19150 *) ac_try_echo=$ac_try;;
19151esac
19152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019154 ac_status=$?
19155 grep -v '^ *+' conftest.er1 >conftest.err
19156 rm -f conftest.er1
19157 cat conftest.err >&5
19158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019159 (exit $ac_status); } && {
19160 test -z "$ac_c_werror_flag" ||
19161 test ! -s conftest.err
19162 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019163 ac_cv_member_struct_stat_st_gen=yes
19164else
19165 echo "$as_me: failed program was:" >&5
19166sed 's/^/| /' conftest.$ac_ext >&5
19167
Martin v. Löwiseba40652007-08-30 20:10:57 +000019168 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019170
19171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019173
19174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019176{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19177echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019178if test $ac_cv_member_struct_stat_st_gen = yes; then
19179
19180cat >>confdefs.h <<_ACEOF
19181#define HAVE_STRUCT_STAT_ST_GEN 1
19182_ACEOF
19183
19184
19185fi
19186
Martin v. Löwiseba40652007-08-30 20:10:57 +000019187{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19188echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019189if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19190 echo $ECHO_N "(cached) $ECHO_C" >&6
19191else
19192 cat >conftest.$ac_ext <<_ACEOF
19193/* confdefs.h. */
19194_ACEOF
19195cat confdefs.h >>conftest.$ac_ext
19196cat >>conftest.$ac_ext <<_ACEOF
19197/* end confdefs.h. */
19198$ac_includes_default
19199int
19200main ()
19201{
19202static struct stat ac_aggr;
19203if (ac_aggr.st_birthtime)
19204return 0;
19205 ;
19206 return 0;
19207}
19208_ACEOF
19209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019210if { (ac_try="$ac_compile"
19211case "(($ac_try" in
19212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19213 *) ac_try_echo=$ac_try;;
19214esac
19215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019217 ac_status=$?
19218 grep -v '^ *+' conftest.er1 >conftest.err
19219 rm -f conftest.er1
19220 cat conftest.err >&5
19221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019222 (exit $ac_status); } && {
19223 test -z "$ac_c_werror_flag" ||
19224 test ! -s conftest.err
19225 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019226 ac_cv_member_struct_stat_st_birthtime=yes
19227else
19228 echo "$as_me: failed program was:" >&5
19229sed 's/^/| /' conftest.$ac_ext >&5
19230
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019232/* confdefs.h. */
19233_ACEOF
19234cat confdefs.h >>conftest.$ac_ext
19235cat >>conftest.$ac_ext <<_ACEOF
19236/* end confdefs.h. */
19237$ac_includes_default
19238int
19239main ()
19240{
19241static struct stat ac_aggr;
19242if (sizeof ac_aggr.st_birthtime)
19243return 0;
19244 ;
19245 return 0;
19246}
19247_ACEOF
19248rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019249if { (ac_try="$ac_compile"
19250case "(($ac_try" in
19251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19252 *) ac_try_echo=$ac_try;;
19253esac
19254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19255 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019256 ac_status=$?
19257 grep -v '^ *+' conftest.er1 >conftest.err
19258 rm -f conftest.er1
19259 cat conftest.err >&5
19260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019261 (exit $ac_status); } && {
19262 test -z "$ac_c_werror_flag" ||
19263 test ! -s conftest.err
19264 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019265 ac_cv_member_struct_stat_st_birthtime=yes
19266else
19267 echo "$as_me: failed program was:" >&5
19268sed 's/^/| /' conftest.$ac_ext >&5
19269
Martin v. Löwiseba40652007-08-30 20:10:57 +000019270 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019272
19273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019274fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019275
19276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019278{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
19279echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019280if test $ac_cv_member_struct_stat_st_birthtime = yes; then
19281
19282cat >>confdefs.h <<_ACEOF
19283#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
19284_ACEOF
19285
19286
19287fi
19288
Martin v. Löwiseba40652007-08-30 20:10:57 +000019289{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
19290echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019291if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
19292 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019293else
Martin v. Löwis11437992002-04-12 09:54:03 +000019294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019295/* confdefs.h. */
19296_ACEOF
19297cat confdefs.h >>conftest.$ac_ext
19298cat >>conftest.$ac_ext <<_ACEOF
19299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019300$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019301int
19302main ()
19303{
19304static struct stat ac_aggr;
19305if (ac_aggr.st_blocks)
19306return 0;
19307 ;
19308 return 0;
19309}
19310_ACEOF
19311rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019312if { (ac_try="$ac_compile"
19313case "(($ac_try" in
19314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19315 *) ac_try_echo=$ac_try;;
19316esac
19317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19318 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019320 grep -v '^ *+' conftest.er1 >conftest.err
19321 rm -f conftest.er1
19322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019324 (exit $ac_status); } && {
19325 test -z "$ac_c_werror_flag" ||
19326 test ! -s conftest.err
19327 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019329else
Martin v. Löwis11437992002-04-12 09:54:03 +000019330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019331sed 's/^/| /' conftest.$ac_ext >&5
19332
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019334/* confdefs.h. */
19335_ACEOF
19336cat confdefs.h >>conftest.$ac_ext
19337cat >>conftest.$ac_ext <<_ACEOF
19338/* end confdefs.h. */
19339$ac_includes_default
19340int
19341main ()
19342{
19343static struct stat ac_aggr;
19344if (sizeof ac_aggr.st_blocks)
19345return 0;
19346 ;
19347 return 0;
19348}
19349_ACEOF
19350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019351if { (ac_try="$ac_compile"
19352case "(($ac_try" in
19353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19354 *) ac_try_echo=$ac_try;;
19355esac
19356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19357 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019359 grep -v '^ *+' conftest.er1 >conftest.err
19360 rm -f conftest.er1
19361 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019363 (exit $ac_status); } && {
19364 test -z "$ac_c_werror_flag" ||
19365 test ! -s conftest.err
19366 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019367 ac_cv_member_struct_stat_st_blocks=yes
19368else
19369 echo "$as_me: failed program was:" >&5
19370sed 's/^/| /' conftest.$ac_ext >&5
19371
Martin v. Löwiseba40652007-08-30 20:10:57 +000019372 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019374
19375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019376fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019377
19378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019379fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019380{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
19381echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019382if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019383
Martin v. Löwis11437992002-04-12 09:54:03 +000019384cat >>confdefs.h <<_ACEOF
19385#define HAVE_STRUCT_STAT_ST_BLOCKS 1
19386_ACEOF
19387
19388
19389cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019390#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019391_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019392
19393else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019394 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019395 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019396 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
19397 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019398esac
19399
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019400fi
19401
Michael W. Hudson54241132001-12-07 15:38:26 +000019402
Martin v. Löwis11437992002-04-12 09:54:03 +000019403
Martin v. Löwiseba40652007-08-30 20:10:57 +000019404{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
19405echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019406if test "${ac_cv_header_time_altzone+set}" = set; then
19407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019408else
Martin v. Löwis11437992002-04-12 09:54:03 +000019409 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019410/* confdefs.h. */
19411_ACEOF
19412cat confdefs.h >>conftest.$ac_ext
19413cat >>conftest.$ac_ext <<_ACEOF
19414/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019415#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019416int
19417main ()
19418{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019419return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000019420 ;
19421 return 0;
19422}
19423_ACEOF
19424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019425if { (ac_try="$ac_compile"
19426case "(($ac_try" in
19427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19428 *) ac_try_echo=$ac_try;;
19429esac
19430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019433 grep -v '^ *+' conftest.er1 >conftest.err
19434 rm -f conftest.er1
19435 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019437 (exit $ac_status); } && {
19438 test -z "$ac_c_werror_flag" ||
19439 test ! -s conftest.err
19440 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019441 ac_cv_header_time_altzone=yes
19442else
Martin v. Löwis11437992002-04-12 09:54:03 +000019443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019444sed 's/^/| /' conftest.$ac_ext >&5
19445
Martin v. Löwiseba40652007-08-30 20:10:57 +000019446 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019447fi
19448
Martin v. Löwiseba40652007-08-30 20:10:57 +000019449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19450fi
19451
19452{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
19453echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019454if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019455
19456cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019457#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019458_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019459
19460fi
19461
Guido van Rossumda88dad1995-01-26 00:46:29 +000019462was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019463{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
19464echo $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 +000019465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019466/* confdefs.h. */
19467_ACEOF
19468cat confdefs.h >>conftest.$ac_ext
19469cat >>conftest.$ac_ext <<_ACEOF
19470/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019471
19472#include <sys/types.h>
19473#include <sys/select.h>
19474#include <sys/time.h>
19475
Martin v. Löwis11437992002-04-12 09:54:03 +000019476int
19477main ()
19478{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019479;
Martin v. Löwis11437992002-04-12 09:54:03 +000019480 ;
19481 return 0;
19482}
19483_ACEOF
19484rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019485if { (ac_try="$ac_compile"
19486case "(($ac_try" in
19487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19488 *) ac_try_echo=$ac_try;;
19489esac
19490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019493 grep -v '^ *+' conftest.er1 >conftest.err
19494 rm -f conftest.er1
19495 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019497 (exit $ac_status); } && {
19498 test -z "$ac_c_werror_flag" ||
19499 test ! -s conftest.err
19500 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019501
19502
19503cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019504#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019505_ACEOF
19506
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019507 was_it_defined=yes
19508
Guido van Rossumf78abae1997-01-21 22:02:36 +000019509else
Martin v. Löwis11437992002-04-12 09:54:03 +000019510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019511sed 's/^/| /' conftest.$ac_ext >&5
19512
Brett Cannon19fab762007-06-02 03:02:29 +000019513
Martin v. Löwiseba40652007-08-30 20:10:57 +000019514fi
19515
19516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19517{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
19518echo "${ECHO_T}$was_it_defined" >&6; }
19519
19520{ echo "$as_me:$LINENO: checking for addrinfo" >&5
19521echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019522if test "${ac_cv_struct_addrinfo+set}" = set; then
19523 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019524else
Martin v. Löwis11437992002-04-12 09:54:03 +000019525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019526/* confdefs.h. */
19527_ACEOF
19528cat confdefs.h >>conftest.$ac_ext
19529cat >>conftest.$ac_ext <<_ACEOF
19530/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019531
19532# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019533int
19534main ()
19535{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019536struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000019537 ;
19538 return 0;
19539}
19540_ACEOF
19541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019542if { (ac_try="$ac_compile"
19543case "(($ac_try" in
19544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19545 *) ac_try_echo=$ac_try;;
19546esac
19547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019550 grep -v '^ *+' conftest.er1 >conftest.err
19551 rm -f conftest.er1
19552 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019554 (exit $ac_status); } && {
19555 test -z "$ac_c_werror_flag" ||
19556 test ! -s conftest.err
19557 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019558 ac_cv_struct_addrinfo=yes
19559else
Martin v. Löwis11437992002-04-12 09:54:03 +000019560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019561sed 's/^/| /' conftest.$ac_ext >&5
19562
Martin v. Löwiseba40652007-08-30 20:10:57 +000019563 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019564fi
19565
Martin v. Löwiseba40652007-08-30 20:10:57 +000019566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19567fi
19568
19569{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
19570echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019571if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019572
19573cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019574#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019575_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019576
19577fi
19578
Martin v. Löwiseba40652007-08-30 20:10:57 +000019579{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
19580echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019581if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
19582 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019583else
Martin v. Löwis11437992002-04-12 09:54:03 +000019584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019585/* confdefs.h. */
19586_ACEOF
19587cat confdefs.h >>conftest.$ac_ext
19588cat >>conftest.$ac_ext <<_ACEOF
19589/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019590
19591# include <sys/types.h>
19592# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019593int
19594main ()
19595{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019596struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000019597 ;
19598 return 0;
19599}
19600_ACEOF
19601rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019602if { (ac_try="$ac_compile"
19603case "(($ac_try" in
19604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19605 *) ac_try_echo=$ac_try;;
19606esac
19607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019610 grep -v '^ *+' conftest.er1 >conftest.err
19611 rm -f conftest.er1
19612 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019614 (exit $ac_status); } && {
19615 test -z "$ac_c_werror_flag" ||
19616 test ! -s conftest.err
19617 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019618 ac_cv_struct_sockaddr_storage=yes
19619else
Martin v. Löwis11437992002-04-12 09:54:03 +000019620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019621sed 's/^/| /' conftest.$ac_ext >&5
19622
Martin v. Löwiseba40652007-08-30 20:10:57 +000019623 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019624fi
19625
Martin v. Löwiseba40652007-08-30 20:10:57 +000019626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19627fi
19628
19629{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
19630echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019631if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019632
19633cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019634#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019635_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019636
19637fi
19638
Guido van Rossum627b2d71993-12-24 10:39:16 +000019639# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000019640
Michael W. Hudson54241132001-12-07 15:38:26 +000019641
Martin v. Löwiseba40652007-08-30 20:10:57 +000019642{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
19643echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019644if test "${ac_cv_c_char_unsigned+set}" = set; then
19645 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000019646else
Martin v. Löwis11437992002-04-12 09:54:03 +000019647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019648/* confdefs.h. */
19649_ACEOF
19650cat confdefs.h >>conftest.$ac_ext
19651cat >>conftest.$ac_ext <<_ACEOF
19652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019653$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019654int
19655main ()
19656{
19657static int test_array [1 - 2 * !(((char) -1) < 0)];
19658test_array [0] = 0
19659
19660 ;
19661 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000019662}
Martin v. Löwis11437992002-04-12 09:54:03 +000019663_ACEOF
19664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019665if { (ac_try="$ac_compile"
19666case "(($ac_try" in
19667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19668 *) ac_try_echo=$ac_try;;
19669esac
19670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019673 grep -v '^ *+' conftest.er1 >conftest.err
19674 rm -f conftest.er1
19675 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019677 (exit $ac_status); } && {
19678 test -z "$ac_c_werror_flag" ||
19679 test ! -s conftest.err
19680 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019681 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019682else
19683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019684sed 's/^/| /' conftest.$ac_ext >&5
19685
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019688
19689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019691{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
19692echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019693if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019694 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019695#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019696_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019697
19698fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000019699
Martin v. Löwiseba40652007-08-30 20:10:57 +000019700{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
19701echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019702if test "${ac_cv_c_const+set}" = set; then
19703 echo $ECHO_N "(cached) $ECHO_C" >&6
19704else
19705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019706/* confdefs.h. */
19707_ACEOF
19708cat confdefs.h >>conftest.$ac_ext
19709cat >>conftest.$ac_ext <<_ACEOF
19710/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019711
Martin v. Löwis11437992002-04-12 09:54:03 +000019712int
19713main ()
19714{
19715/* FIXME: Include the comments suggested by Paul. */
19716#ifndef __cplusplus
19717 /* Ultrix mips cc rejects this. */
19718 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000019719 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000019720 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019721 char const *const *pcpcc;
19722 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019723 /* NEC SVR4.0.2 mips cc rejects this. */
19724 struct point {int x, y;};
19725 static struct point const zero = {0,0};
19726 /* AIX XL C 1.02.0.0 rejects this.
19727 It does not let you subtract one const X* pointer from another in
19728 an arm of an if-expression whose if-part is not a constant
19729 expression */
19730 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000019731 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019732 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019733 ++pcpcc;
19734 ppc = (char**) pcpcc;
19735 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000019736 { /* SCO 3.2v4 cc rejects this. */
19737 char *t;
19738 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019739
Martin v. Löwis11437992002-04-12 09:54:03 +000019740 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019741 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019742 }
19743 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
19744 int x[] = {25, 17};
19745 const int *foo = &x[0];
19746 ++foo;
19747 }
19748 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19749 typedef const int *iptr;
19750 iptr p = 0;
19751 ++p;
19752 }
19753 { /* AIX XL C 1.02.0.0 rejects this saying
19754 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19755 struct s { int j; const int *ap[3]; };
19756 struct s *b; b->j = 5;
19757 }
19758 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19759 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019760 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019761 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019762 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000019763#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000019764
Martin v. Löwis11437992002-04-12 09:54:03 +000019765 ;
19766 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000019767}
Martin v. Löwis11437992002-04-12 09:54:03 +000019768_ACEOF
19769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019770if { (ac_try="$ac_compile"
19771case "(($ac_try" in
19772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19773 *) ac_try_echo=$ac_try;;
19774esac
19775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19776 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019777 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019778 grep -v '^ *+' conftest.er1 >conftest.err
19779 rm -f conftest.er1
19780 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019782 (exit $ac_status); } && {
19783 test -z "$ac_c_werror_flag" ||
19784 test ! -s conftest.err
19785 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019786 ac_cv_c_const=yes
19787else
Martin v. Löwis11437992002-04-12 09:54:03 +000019788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019789sed 's/^/| /' conftest.$ac_ext >&5
19790
Martin v. Löwiseba40652007-08-30 20:10:57 +000019791 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019793
19794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019796{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
19797echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019798if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019799
19800cat >>confdefs.h <<\_ACEOF
19801#define const
19802_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019803
19804fi
19805
Michael W. Hudson54241132001-12-07 15:38:26 +000019806
Guido van Rossumda88dad1995-01-26 00:46:29 +000019807works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019808{ echo "$as_me:$LINENO: checking for working volatile" >&5
19809echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019811/* confdefs.h. */
19812_ACEOF
19813cat confdefs.h >>conftest.$ac_ext
19814cat >>conftest.$ac_ext <<_ACEOF
19815/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019816
Martin v. Löwis11437992002-04-12 09:54:03 +000019817int
19818main ()
19819{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019820volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019821 ;
19822 return 0;
19823}
19824_ACEOF
19825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019826if { (ac_try="$ac_compile"
19827case "(($ac_try" in
19828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19829 *) ac_try_echo=$ac_try;;
19830esac
19831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19832 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019834 grep -v '^ *+' conftest.er1 >conftest.err
19835 rm -f conftest.er1
19836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019838 (exit $ac_status); } && {
19839 test -z "$ac_c_werror_flag" ||
19840 test ! -s conftest.err
19841 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019842 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019843else
Martin v. Löwis11437992002-04-12 09:54:03 +000019844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019845sed 's/^/| /' conftest.$ac_ext >&5
19846
Martin v. Löwis11437992002-04-12 09:54:03 +000019847
19848cat >>confdefs.h <<\_ACEOF
19849#define volatile
19850_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019851
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019852
Guido van Rossum627b2d71993-12-24 10:39:16 +000019853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854
19855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19856{ echo "$as_me:$LINENO: result: $works" >&5
19857echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019858
Guido van Rossumda88dad1995-01-26 00:46:29 +000019859works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019860{ echo "$as_me:$LINENO: checking for working signed char" >&5
19861echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019863/* confdefs.h. */
19864_ACEOF
19865cat confdefs.h >>conftest.$ac_ext
19866cat >>conftest.$ac_ext <<_ACEOF
19867/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019868
Martin v. Löwis11437992002-04-12 09:54:03 +000019869int
19870main ()
19871{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019872signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000019873 ;
19874 return 0;
19875}
19876_ACEOF
19877rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019878if { (ac_try="$ac_compile"
19879case "(($ac_try" in
19880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19881 *) ac_try_echo=$ac_try;;
19882esac
19883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19884 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019885 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019886 grep -v '^ *+' conftest.er1 >conftest.err
19887 rm -f conftest.er1
19888 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019890 (exit $ac_status); } && {
19891 test -z "$ac_c_werror_flag" ||
19892 test ! -s conftest.err
19893 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000019894 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000019895else
Martin v. Löwis11437992002-04-12 09:54:03 +000019896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019897sed 's/^/| /' conftest.$ac_ext >&5
19898
Martin v. Löwis11437992002-04-12 09:54:03 +000019899
19900cat >>confdefs.h <<\_ACEOF
19901#define signed
19902_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019903
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019904
Guido van Rossum7f43da71994-08-01 12:15:30 +000019905fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019906
19907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19908{ echo "$as_me:$LINENO: result: $works" >&5
19909echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019910
Guido van Rossumda88dad1995-01-26 00:46:29 +000019911have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019912{ echo "$as_me:$LINENO: checking for prototypes" >&5
19913echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019914cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019915/* confdefs.h. */
19916_ACEOF
19917cat confdefs.h >>conftest.$ac_ext
19918cat >>conftest.$ac_ext <<_ACEOF
19919/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019920int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019921int
19922main ()
19923{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019924return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000019925 ;
19926 return 0;
19927}
19928_ACEOF
19929rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019930if { (ac_try="$ac_compile"
19931case "(($ac_try" in
19932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19933 *) ac_try_echo=$ac_try;;
19934esac
19935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19936 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019937 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019938 grep -v '^ *+' conftest.er1 >conftest.err
19939 rm -f conftest.er1
19940 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019942 (exit $ac_status); } && {
19943 test -z "$ac_c_werror_flag" ||
19944 test ! -s conftest.err
19945 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019946
19947
19948cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019949#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019950_ACEOF
19951
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019952 have_prototypes=yes
19953
Guido van Rossumf78abae1997-01-21 22:02:36 +000019954else
Martin v. Löwis11437992002-04-12 09:54:03 +000019955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019956sed 's/^/| /' conftest.$ac_ext >&5
19957
Martin v. Löwiseba40652007-08-30 20:10:57 +000019958
Guido van Rossum7f43da71994-08-01 12:15:30 +000019959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019960
19961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19962{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
19963echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019964
Guido van Rossumda88dad1995-01-26 00:46:29 +000019965works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000019966{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19967echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019969/* confdefs.h. */
19970_ACEOF
19971cat confdefs.h >>conftest.$ac_ext
19972cat >>conftest.$ac_ext <<_ACEOF
19973/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019974
19975#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019976int foo(int x, ...) {
19977 va_list va;
19978 va_start(va, x);
19979 va_arg(va, int);
19980 va_arg(va, char *);
19981 va_arg(va, double);
19982 return 0;
19983}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019984
Martin v. Löwis11437992002-04-12 09:54:03 +000019985int
19986main ()
19987{
Guido van Rossum90eea071996-08-30 20:58:57 +000019988return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019989 ;
19990 return 0;
19991}
19992_ACEOF
19993rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019994if { (ac_try="$ac_compile"
19995case "(($ac_try" in
19996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19997 *) ac_try_echo=$ac_try;;
19998esac
19999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020002 grep -v '^ *+' conftest.er1 >conftest.err
20003 rm -f conftest.er1
20004 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020006 (exit $ac_status); } && {
20007 test -z "$ac_c_werror_flag" ||
20008 test ! -s conftest.err
20009 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020010
20011
20012cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020013#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020014_ACEOF
20015
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020016 works=yes
20017
Guido van Rossumf78abae1997-01-21 22:02:36 +000020018else
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020020sed 's/^/| /' conftest.$ac_ext >&5
20021
Martin v. Löwiseba40652007-08-30 20:10:57 +000020022
Guido van Rossum627b2d71993-12-24 10:39:16 +000020023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020024
20025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20026{ echo "$as_me:$LINENO: result: $works" >&5
20027echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020028
Martin v. Löwisd6320502004-08-12 13:45:08 +000020029# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020030{ echo "$as_me:$LINENO: checking for socketpair" >&5
20031echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020032cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020033/* confdefs.h. */
20034_ACEOF
20035cat confdefs.h >>conftest.$ac_ext
20036cat >>conftest.$ac_ext <<_ACEOF
20037/* end confdefs.h. */
20038
20039#include <sys/types.h>
20040#include <sys/socket.h>
20041
20042int
20043main ()
20044{
20045void *x=socketpair
20046 ;
20047 return 0;
20048}
20049_ACEOF
20050rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020051if { (ac_try="$ac_compile"
20052case "(($ac_try" in
20053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20054 *) ac_try_echo=$ac_try;;
20055esac
20056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020059 grep -v '^ *+' conftest.er1 >conftest.err
20060 rm -f conftest.er1
20061 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020063 (exit $ac_status); } && {
20064 test -z "$ac_c_werror_flag" ||
20065 test ! -s conftest.err
20066 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020067
20068cat >>confdefs.h <<\_ACEOF
20069#define HAVE_SOCKETPAIR 1
20070_ACEOF
20071
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072 { echo "$as_me:$LINENO: result: yes" >&5
20073echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020074else
20075 echo "$as_me: failed program was:" >&5
20076sed 's/^/| /' conftest.$ac_ext >&5
20077
Martin v. Löwiseba40652007-08-30 20:10:57 +000020078 { echo "$as_me:$LINENO: result: no" >&5
20079echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020080
20081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020082
20083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020084
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020085# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020086{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20087echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020088cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020089/* confdefs.h. */
20090_ACEOF
20091cat confdefs.h >>conftest.$ac_ext
20092cat >>conftest.$ac_ext <<_ACEOF
20093/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020094#include <sys/types.h>
20095#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020096int
20097main ()
20098{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020099struct sockaddr x;
20100x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020101 ;
20102 return 0;
20103}
20104_ACEOF
20105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020106if { (ac_try="$ac_compile"
20107case "(($ac_try" in
20108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20109 *) ac_try_echo=$ac_try;;
20110esac
20111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020114 grep -v '^ *+' conftest.er1 >conftest.err
20115 rm -f conftest.er1
20116 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020118 (exit $ac_status); } && {
20119 test -z "$ac_c_werror_flag" ||
20120 test ! -s conftest.err
20121 } && test -s conftest.$ac_objext; then
20122 { echo "$as_me:$LINENO: result: yes" >&5
20123echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020124
20125cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020126#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020127_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020128
20129else
Martin v. Löwis11437992002-04-12 09:54:03 +000020130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020131sed 's/^/| /' conftest.$ac_ext >&5
20132
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133 { echo "$as_me:$LINENO: result: no" >&5
20134echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020135fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020136
20137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020138
Guido van Rossumda88dad1995-01-26 00:46:29 +000020139va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020140{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20141echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020143/* confdefs.h. */
20144_ACEOF
20145cat confdefs.h >>conftest.$ac_ext
20146cat >>conftest.$ac_ext <<_ACEOF
20147/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020148
20149#ifdef HAVE_STDARG_PROTOTYPES
20150#include <stdarg.h>
20151#else
20152#include <varargs.h>
20153#endif
20154
Martin v. Löwis11437992002-04-12 09:54:03 +000020155int
20156main ()
20157{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020158va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020159 ;
20160 return 0;
20161}
20162_ACEOF
20163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020164if { (ac_try="$ac_compile"
20165case "(($ac_try" in
20166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20167 *) ac_try_echo=$ac_try;;
20168esac
20169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020172 grep -v '^ *+' conftest.er1 >conftest.err
20173 rm -f conftest.er1
20174 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020176 (exit $ac_status); } && {
20177 test -z "$ac_c_werror_flag" ||
20178 test ! -s conftest.err
20179 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020180 :
20181else
Martin v. Löwis11437992002-04-12 09:54:03 +000020182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020183sed 's/^/| /' conftest.$ac_ext >&5
20184
Martin v. Löwis11437992002-04-12 09:54:03 +000020185
20186
20187cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020188#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020189_ACEOF
20190
Guido van Rossumda88dad1995-01-26 00:46:29 +000020191 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020192
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020194
20195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20196{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20197echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020198
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020199# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020200
20201
20202
Martin v. Löwiseba40652007-08-30 20:10:57 +000020203{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
20204echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020205if test "${ac_cv_func_gethostbyname_r+set}" = set; then
20206 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020207else
Martin v. Löwis11437992002-04-12 09:54:03 +000020208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020209/* confdefs.h. */
20210_ACEOF
20211cat confdefs.h >>conftest.$ac_ext
20212cat >>conftest.$ac_ext <<_ACEOF
20213/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020214/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
20215 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20216#define gethostbyname_r innocuous_gethostbyname_r
20217
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020218/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020219 which can conflict with char gethostbyname_r (); below.
20220 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020221 <limits.h> exists even on freestanding compilers. */
20222
20223#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020224# include <limits.h>
20225#else
20226# include <assert.h>
20227#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020228
20229#undef gethostbyname_r
20230
Martin v. Löwiseba40652007-08-30 20:10:57 +000020231/* Override any GCC internal prototype to avoid an error.
20232 Use char because int might match the return type of a GCC
20233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020234#ifdef __cplusplus
20235extern "C"
20236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020237char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020238/* The GNU C library defines this for functions which it implements
20239 to always fail with ENOSYS. Some functions are actually named
20240 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020241#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020242choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020243#endif
20244
Skip Montanaro6dead952003-09-25 14:50:04 +000020245int
20246main ()
20247{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020248return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020249 ;
20250 return 0;
20251}
20252_ACEOF
20253rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254if { (ac_try="$ac_link"
20255case "(($ac_try" in
20256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20257 *) ac_try_echo=$ac_try;;
20258esac
20259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20260 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020262 grep -v '^ *+' conftest.er1 >conftest.err
20263 rm -f conftest.er1
20264 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020266 (exit $ac_status); } && {
20267 test -z "$ac_c_werror_flag" ||
20268 test ! -s conftest.err
20269 } && test -s conftest$ac_exeext &&
20270 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020271 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020272else
Martin v. Löwis11437992002-04-12 09:54:03 +000020273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020274sed 's/^/| /' conftest.$ac_ext >&5
20275
Martin v. Löwiseba40652007-08-30 20:10:57 +000020276 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020277fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020278
20279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020280 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020282{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
20283echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020284if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020285
Martin v. Löwis11437992002-04-12 09:54:03 +000020286 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020287#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020288_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020289
Martin v. Löwiseba40652007-08-30 20:10:57 +000020290 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
20291echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020292 OLD_CFLAGS=$CFLAGS
20293 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020295/* confdefs.h. */
20296_ACEOF
20297cat confdefs.h >>conftest.$ac_ext
20298cat >>conftest.$ac_ext <<_ACEOF
20299/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020300
20301# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020302
Martin v. Löwis11437992002-04-12 09:54:03 +000020303int
20304main ()
20305{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020306
20307 char *name;
20308 struct hostent *he, *res;
20309 char buffer[2048];
20310 int buflen = 2048;
20311 int h_errnop;
20312
20313 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020314
20315 ;
20316 return 0;
20317}
20318_ACEOF
20319rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020320if { (ac_try="$ac_compile"
20321case "(($ac_try" in
20322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20323 *) ac_try_echo=$ac_try;;
20324esac
20325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020328 grep -v '^ *+' conftest.er1 >conftest.err
20329 rm -f conftest.er1
20330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020332 (exit $ac_status); } && {
20333 test -z "$ac_c_werror_flag" ||
20334 test ! -s conftest.err
20335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020336
20337 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020338#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020339_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020340
Martin v. Löwis11437992002-04-12 09:54:03 +000020341
20342cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020343#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020344_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020345
Martin v. Löwiseba40652007-08-30 20:10:57 +000020346 { echo "$as_me:$LINENO: result: yes" >&5
20347echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020348
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020349else
Martin v. Löwis11437992002-04-12 09:54:03 +000020350 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020351sed 's/^/| /' conftest.$ac_ext >&5
20352
Martin v. Löwis11437992002-04-12 09:54:03 +000020353
Martin v. Löwiseba40652007-08-30 20:10:57 +000020354 { echo "$as_me:$LINENO: result: no" >&5
20355echo "${ECHO_T}no" >&6; }
20356 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
20357echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020359/* confdefs.h. */
20360_ACEOF
20361cat confdefs.h >>conftest.$ac_ext
20362cat >>conftest.$ac_ext <<_ACEOF
20363/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020364
20365# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020366
Martin v. Löwis11437992002-04-12 09:54:03 +000020367int
20368main ()
20369{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020370
20371 char *name;
20372 struct hostent *he;
20373 char buffer[2048];
20374 int buflen = 2048;
20375 int h_errnop;
20376
20377 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000020378
20379 ;
20380 return 0;
20381}
20382_ACEOF
20383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020384if { (ac_try="$ac_compile"
20385case "(($ac_try" in
20386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20387 *) ac_try_echo=$ac_try;;
20388esac
20389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020392 grep -v '^ *+' conftest.er1 >conftest.err
20393 rm -f conftest.er1
20394 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020396 (exit $ac_status); } && {
20397 test -z "$ac_c_werror_flag" ||
20398 test ! -s conftest.err
20399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020400
20401 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020402#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020403_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020404
Martin v. Löwis11437992002-04-12 09:54:03 +000020405
20406cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020407#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020408_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020409
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410 { echo "$as_me:$LINENO: result: yes" >&5
20411echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020413else
Martin v. Löwis11437992002-04-12 09:54:03 +000020414 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020415sed 's/^/| /' conftest.$ac_ext >&5
20416
Martin v. Löwis11437992002-04-12 09:54:03 +000020417
Martin v. Löwiseba40652007-08-30 20:10:57 +000020418 { echo "$as_me:$LINENO: result: no" >&5
20419echo "${ECHO_T}no" >&6; }
20420 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
20421echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020423/* confdefs.h. */
20424_ACEOF
20425cat confdefs.h >>conftest.$ac_ext
20426cat >>conftest.$ac_ext <<_ACEOF
20427/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020428
20429# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020430
Martin v. Löwis11437992002-04-12 09:54:03 +000020431int
20432main ()
20433{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020434
20435 char *name;
20436 struct hostent *he;
20437 struct hostent_data data;
20438
20439 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000020440
20441 ;
20442 return 0;
20443}
20444_ACEOF
20445rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020446if { (ac_try="$ac_compile"
20447case "(($ac_try" in
20448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20449 *) ac_try_echo=$ac_try;;
20450esac
20451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20452 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020454 grep -v '^ *+' conftest.er1 >conftest.err
20455 rm -f conftest.er1
20456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020458 (exit $ac_status); } && {
20459 test -z "$ac_c_werror_flag" ||
20460 test ! -s conftest.err
20461 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020462
20463 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020464#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020465_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000020466
Martin v. Löwis11437992002-04-12 09:54:03 +000020467
20468cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020469#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020470_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020471
Martin v. Löwiseba40652007-08-30 20:10:57 +000020472 { echo "$as_me:$LINENO: result: yes" >&5
20473echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020474
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020475else
Martin v. Löwis11437992002-04-12 09:54:03 +000020476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020477sed 's/^/| /' conftest.$ac_ext >&5
20478
Martin v. Löwis11437992002-04-12 09:54:03 +000020479
Martin v. Löwiseba40652007-08-30 20:10:57 +000020480 { echo "$as_me:$LINENO: result: no" >&5
20481echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020484
20485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020486
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020488
20489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020490
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020492
20493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020494 CFLAGS=$OLD_CFLAGS
20495
20496else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020497
Martin v. Löwis11437992002-04-12 09:54:03 +000020498
20499for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000020500do
Martin v. Löwis11437992002-04-12 09:54:03 +000020501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020502{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20504if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020506else
Martin v. Löwis11437992002-04-12 09:54:03 +000020507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020508/* confdefs.h. */
20509_ACEOF
20510cat confdefs.h >>conftest.$ac_ext
20511cat >>conftest.$ac_ext <<_ACEOF
20512/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020513/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20515#define $ac_func innocuous_$ac_func
20516
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020517/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020518 which can conflict with char $ac_func (); below.
20519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020520 <limits.h> exists even on freestanding compilers. */
20521
20522#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020523# include <limits.h>
20524#else
20525# include <assert.h>
20526#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020527
20528#undef $ac_func
20529
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530/* Override any GCC internal prototype to avoid an error.
20531 Use char because int might match the return type of a GCC
20532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020533#ifdef __cplusplus
20534extern "C"
20535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020536char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020537/* The GNU C library defines this for functions which it implements
20538 to always fail with ENOSYS. Some functions are actually named
20539 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020540#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020541choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020542#endif
20543
Skip Montanaro6dead952003-09-25 14:50:04 +000020544int
20545main ()
20546{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020547return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020548 ;
20549 return 0;
20550}
20551_ACEOF
20552rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020553if { (ac_try="$ac_link"
20554case "(($ac_try" in
20555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556 *) ac_try_echo=$ac_try;;
20557esac
20558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020561 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1
20563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020565 (exit $ac_status); } && {
20566 test -z "$ac_c_werror_flag" ||
20567 test ! -s conftest.err
20568 } && test -s conftest$ac_exeext &&
20569 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020570 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020571else
Martin v. Löwis11437992002-04-12 09:54:03 +000020572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020573sed 's/^/| /' conftest.$ac_ext >&5
20574
Martin v. Löwiseba40652007-08-30 20:10:57 +000020575 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020577
20578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020579 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020581ac_res=`eval echo '${'$as_ac_var'}'`
20582 { echo "$as_me:$LINENO: result: $ac_res" >&5
20583echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020584if test `eval echo '${'$as_ac_var'}'` = yes; then
20585 cat >>confdefs.h <<_ACEOF
20586#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20587_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020589fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020590done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020591
Michael W. Hudson54241132001-12-07 15:38:26 +000020592
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020593fi
20594
Michael W. Hudson54241132001-12-07 15:38:26 +000020595
20596
20597
20598
20599
20600
Guido van Rossum627b2d71993-12-24 10:39:16 +000020601# checks for system services
20602# (none yet)
20603
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020604# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
20606echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020607if test "${ac_cv_func___fpu_control+set}" = set; then
20608 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020609else
Martin v. Löwis11437992002-04-12 09:54:03 +000020610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020611/* confdefs.h. */
20612_ACEOF
20613cat confdefs.h >>conftest.$ac_ext
20614cat >>conftest.$ac_ext <<_ACEOF
20615/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020616/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
20617 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20618#define __fpu_control innocuous___fpu_control
20619
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020620/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020621 which can conflict with char __fpu_control (); below.
20622 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020623 <limits.h> exists even on freestanding compilers. */
20624
20625#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020626# include <limits.h>
20627#else
20628# include <assert.h>
20629#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020630
20631#undef __fpu_control
20632
Martin v. Löwiseba40652007-08-30 20:10:57 +000020633/* Override any GCC internal prototype to avoid an error.
20634 Use char because int might match the return type of a GCC
20635 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020636#ifdef __cplusplus
20637extern "C"
20638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020639char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020640/* The GNU C library defines this for functions which it implements
20641 to always fail with ENOSYS. Some functions are actually named
20642 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020643#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020644choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020645#endif
20646
Skip Montanaro6dead952003-09-25 14:50:04 +000020647int
20648main ()
20649{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020650return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020651 ;
20652 return 0;
20653}
20654_ACEOF
20655rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020656if { (ac_try="$ac_link"
20657case "(($ac_try" in
20658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20659 *) ac_try_echo=$ac_try;;
20660esac
20661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20662 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020664 grep -v '^ *+' conftest.er1 >conftest.err
20665 rm -f conftest.er1
20666 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020668 (exit $ac_status); } && {
20669 test -z "$ac_c_werror_flag" ||
20670 test ! -s conftest.err
20671 } && test -s conftest$ac_exeext &&
20672 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020673 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020674else
Martin v. Löwis11437992002-04-12 09:54:03 +000020675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020676sed 's/^/| /' conftest.$ac_ext >&5
20677
Martin v. Löwiseba40652007-08-30 20:10:57 +000020678 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020679fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020680
20681rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020682 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020684{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
20685echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020686if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020687 :
20688else
Martin v. Löwis11437992002-04-12 09:54:03 +000020689
Martin v. Löwiseba40652007-08-30 20:10:57 +000020690{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
20691echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020692if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
20693 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020694else
Martin v. Löwis11437992002-04-12 09:54:03 +000020695 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020696LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020697cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020698/* confdefs.h. */
20699_ACEOF
20700cat confdefs.h >>conftest.$ac_ext
20701cat >>conftest.$ac_ext <<_ACEOF
20702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020703
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704/* Override any GCC internal prototype to avoid an error.
20705 Use char because int might match the return type of a GCC
20706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020707#ifdef __cplusplus
20708extern "C"
20709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020710char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020711int
20712main ()
20713{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020714return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020715 ;
20716 return 0;
20717}
20718_ACEOF
20719rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720if { (ac_try="$ac_link"
20721case "(($ac_try" in
20722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20723 *) ac_try_echo=$ac_try;;
20724esac
20725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20726 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020728 grep -v '^ *+' conftest.er1 >conftest.err
20729 rm -f conftest.er1
20730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732 (exit $ac_status); } && {
20733 test -z "$ac_c_werror_flag" ||
20734 test ! -s conftest.err
20735 } && test -s conftest$ac_exeext &&
20736 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020737 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020738else
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020740sed 's/^/| /' conftest.$ac_ext >&5
20741
Martin v. Löwiseba40652007-08-30 20:10:57 +000020742 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744
20745rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020746 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020747LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
20750echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020751if test $ac_cv_lib_ieee___fpu_control = yes; then
20752 cat >>confdefs.h <<_ACEOF
20753#define HAVE_LIBIEEE 1
20754_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020755
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020756 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020757
Guido van Rossum627b2d71993-12-24 10:39:16 +000020758fi
20759
Michael W. Hudson54241132001-12-07 15:38:26 +000020760
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000020761fi
20762
Michael W. Hudson54241132001-12-07 15:38:26 +000020763
Guido van Rossum7f253911997-05-09 02:42:48 +000020764# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000020765{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
20766echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020767
Martin v. Löwiseba40652007-08-30 20:10:57 +000020768# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000020769if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020770 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000020771if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000020772then
20773
20774cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000020775#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020776_ACEOF
20777
Martin v. Löwiseba40652007-08-30 20:10:57 +000020778 { echo "$as_me:$LINENO: result: yes" >&5
20779echo "${ECHO_T}yes" >&6; }
20780else { echo "$as_me:$LINENO: result: no" >&5
20781echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020782fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020783else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020784 { echo "$as_me:$LINENO: result: no" >&5
20785echo "${ECHO_T}no" >&6; }
20786fi
20787
Guido van Rossum7f253911997-05-09 02:42:48 +000020788
Guido van Rossum7f43da71994-08-01 12:15:30 +000020789# check for --with-libm=...
20790
Guido van Rossum563e7081996-09-10 18:20:48 +000020791case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000020792Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000020793BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000020794*) LIBM=-lm
20795esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000020796{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
20797echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020798
Martin v. Löwiseba40652007-08-30 20:10:57 +000020799# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020800if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020801 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000020802if test "$withval" = no
20803then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020804 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
20805echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020806elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020807then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
20809echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020810else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
20811echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
20812 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020813fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020814else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
20816echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
20817fi
20818
Guido van Rossum7f43da71994-08-01 12:15:30 +000020819
20820# check for --with-libc=...
20821
Martin v. Löwiseba40652007-08-30 20:10:57 +000020822{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
20823echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020824
Martin v. Löwiseba40652007-08-30 20:10:57 +000020825# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020826if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000020828if test "$withval" = no
20829then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000020830 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
20831echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000020832elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000020833then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000020834 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
20835echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020836else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
20837echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
20838 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020839fi
Guido van Rossum7f253911997-05-09 02:42:48 +000020840else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020841 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
20842echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
20843fi
20844
Guido van Rossum7f43da71994-08-01 12:15:30 +000020845
Christian Heimes0a8143f2007-12-18 23:22:54 +000020846# ************************************
20847# * Check for mathematical functions *
20848# ************************************
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020849LIBS_SAVE=$LIBS
20850LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000020851
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020852for ac_func in hypot
20853do
Martin v. Löwis11437992002-04-12 09:54:03 +000020854as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000020855{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20856echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20857if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020859else
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020861/* confdefs.h. */
20862_ACEOF
20863cat confdefs.h >>conftest.$ac_ext
20864cat >>conftest.$ac_ext <<_ACEOF
20865/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020866/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20867 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20868#define $ac_func innocuous_$ac_func
20869
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020870/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020871 which can conflict with char $ac_func (); below.
20872 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020873 <limits.h> exists even on freestanding compilers. */
20874
20875#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020876# include <limits.h>
20877#else
20878# include <assert.h>
20879#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020880
20881#undef $ac_func
20882
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883/* Override any GCC internal prototype to avoid an error.
20884 Use char because int might match the return type of a GCC
20885 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020886#ifdef __cplusplus
20887extern "C"
20888#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020889char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020890/* The GNU C library defines this for functions which it implements
20891 to always fail with ENOSYS. Some functions are actually named
20892 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020893#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020894choke me
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020895#endif
20896
Skip Montanaro6dead952003-09-25 14:50:04 +000020897int
20898main ()
20899{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020900return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020901 ;
20902 return 0;
20903}
20904_ACEOF
20905rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906if { (ac_try="$ac_link"
20907case "(($ac_try" in
20908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20909 *) ac_try_echo=$ac_try;;
20910esac
20911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20912 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020914 grep -v '^ *+' conftest.er1 >conftest.err
20915 rm -f conftest.er1
20916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020918 (exit $ac_status); } && {
20919 test -z "$ac_c_werror_flag" ||
20920 test ! -s conftest.err
20921 } && test -s conftest$ac_exeext &&
20922 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020923 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020924else
Martin v. Löwis11437992002-04-12 09:54:03 +000020925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020926sed 's/^/| /' conftest.$ac_ext >&5
20927
Martin v. Löwiseba40652007-08-30 20:10:57 +000020928 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020929fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020930
20931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020932 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020933fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020934ac_res=`eval echo '${'$as_ac_var'}'`
20935 { echo "$as_me:$LINENO: result: $ac_res" >&5
20936echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020937if test `eval echo '${'$as_ac_var'}'` = yes; then
20938 cat >>confdefs.h <<_ACEOF
20939#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20940_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020941
Michael W. Hudson54241132001-12-07 15:38:26 +000020942else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020943 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020944 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020945 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20946 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020947esac
20948
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020949fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020950done
20951
Michael W. Hudson54241132001-12-07 15:38:26 +000020952
Christian Heimes0a8143f2007-12-18 23:22:54 +000020953
20954
20955
20956
20957
Christian Heimes48723512008-01-20 14:28:28 +000020958
20959
20960
20961
20962
20963for ac_func in acosh asinh atanh copysign expm1 finite isinf isnan log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000020964do
20965as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20966{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20967echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20968if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
20969 echo $ECHO_N "(cached) $ECHO_C" >&6
20970else
20971 cat >conftest.$ac_ext <<_ACEOF
20972/* confdefs.h. */
20973_ACEOF
20974cat confdefs.h >>conftest.$ac_ext
20975cat >>conftest.$ac_ext <<_ACEOF
20976/* end confdefs.h. */
20977/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20978 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20979#define $ac_func innocuous_$ac_func
20980
20981/* System header to define __stub macros and hopefully few prototypes,
20982 which can conflict with char $ac_func (); below.
20983 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20984 <limits.h> exists even on freestanding compilers. */
20985
20986#ifdef __STDC__
20987# include <limits.h>
20988#else
20989# include <assert.h>
20990#endif
20991
20992#undef $ac_func
20993
20994/* Override any GCC internal prototype to avoid an error.
20995 Use char because int might match the return type of a GCC
20996 builtin and then its argument prototype would still apply. */
20997#ifdef __cplusplus
20998extern "C"
20999#endif
21000char $ac_func ();
21001/* The GNU C library defines this for functions which it implements
21002 to always fail with ENOSYS. Some functions are actually named
21003 something starting with __ and the normal name is an alias. */
21004#if defined __stub_$ac_func || defined __stub___$ac_func
21005choke me
21006#endif
21007
21008int
21009main ()
21010{
21011return $ac_func ();
21012 ;
21013 return 0;
21014}
21015_ACEOF
21016rm -f conftest.$ac_objext conftest$ac_exeext
21017if { (ac_try="$ac_link"
21018case "(($ac_try" in
21019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21020 *) ac_try_echo=$ac_try;;
21021esac
21022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21023 (eval "$ac_link") 2>conftest.er1
21024 ac_status=$?
21025 grep -v '^ *+' conftest.er1 >conftest.err
21026 rm -f conftest.er1
21027 cat conftest.err >&5
21028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21029 (exit $ac_status); } && {
21030 test -z "$ac_c_werror_flag" ||
21031 test ! -s conftest.err
21032 } && test -s conftest$ac_exeext &&
21033 $as_test_x conftest$ac_exeext; then
21034 eval "$as_ac_var=yes"
21035else
21036 echo "$as_me: failed program was:" >&5
21037sed 's/^/| /' conftest.$ac_ext >&5
21038
21039 eval "$as_ac_var=no"
21040fi
21041
21042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21043 conftest$ac_exeext conftest.$ac_ext
21044fi
21045ac_res=`eval echo '${'$as_ac_var'}'`
21046 { echo "$as_me:$LINENO: result: $ac_res" >&5
21047echo "${ECHO_T}$ac_res" >&6; }
21048if test `eval echo '${'$as_ac_var'}'` = yes; then
21049 cat >>confdefs.h <<_ACEOF
21050#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21051_ACEOF
21052
21053fi
21054done
21055
21056
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021057LIBS=$LIBS_SAVE
21058
Guido van Rossumef2255b2000-03-10 22:30:29 +000021059# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000021060if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021061 { echo "$as_me:$LINENO: checking for wchar.h" >&5
21062echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021063if test "${ac_cv_header_wchar_h+set}" = set; then
21064 echo $ECHO_N "(cached) $ECHO_C" >&6
21065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021066{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21067echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000021068else
Martin v. Löwis11437992002-04-12 09:54:03 +000021069 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021070{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
21071echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021073/* confdefs.h. */
21074_ACEOF
21075cat confdefs.h >>conftest.$ac_ext
21076cat >>conftest.$ac_ext <<_ACEOF
21077/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021078$ac_includes_default
21079#include <wchar.h>
21080_ACEOF
21081rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082if { (ac_try="$ac_compile"
21083case "(($ac_try" in
21084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21085 *) ac_try_echo=$ac_try;;
21086esac
21087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021090 grep -v '^ *+' conftest.er1 >conftest.err
21091 rm -f conftest.er1
21092 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021094 (exit $ac_status); } && {
21095 test -z "$ac_c_werror_flag" ||
21096 test ! -s conftest.err
21097 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021098 ac_header_compiler=yes
21099else
21100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021101sed 's/^/| /' conftest.$ac_ext >&5
21102
Martin v. Löwiseba40652007-08-30 20:10:57 +000021103 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021105
21106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21107{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21108echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021109
21110# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000021111{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
21112echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021114/* confdefs.h. */
21115_ACEOF
21116cat confdefs.h >>conftest.$ac_ext
21117cat >>conftest.$ac_ext <<_ACEOF
21118/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021119#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021120_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000021121if { (ac_try="$ac_cpp conftest.$ac_ext"
21122case "(($ac_try" in
21123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21124 *) ac_try_echo=$ac_try;;
21125esac
21126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21127 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021129 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000021130 rm -f conftest.er1
21131 cat conftest.err >&5
21132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 (exit $ac_status); } >/dev/null && {
21134 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21135 test ! -s conftest.err
21136 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021137 ac_header_preproc=yes
21138else
21139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021140sed 's/^/| /' conftest.$ac_ext >&5
21141
Martin v. Löwis11437992002-04-12 09:54:03 +000021142 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021144
Martin v. Löwis11437992002-04-12 09:54:03 +000021145rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021146{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21147echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021148
21149# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021150case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21151 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000021152 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
21153echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021154 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
21155echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
21156 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021157 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021158 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021159 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
21160echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021161 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
21162echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
21163 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
21164echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
21165 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
21166echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021167 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
21168echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000021169 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
21170echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021171 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000021172## ------------------------------------------------ ##
21173## Report this to http://www.python.org/python-bugs ##
21174## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000021175_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000021176 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000021177 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021178esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021179{ echo "$as_me:$LINENO: checking for wchar.h" >&5
21180echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021181if test "${ac_cv_header_wchar_h+set}" = set; then
21182 echo $ECHO_N "(cached) $ECHO_C" >&6
21183else
21184 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000021185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021186{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
21187echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021188
21189fi
21190if test $ac_cv_header_wchar_h = yes; then
21191
21192
21193cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021194#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021195_ACEOF
21196
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021197 wchar_h="yes"
21198
Guido van Rossumef2255b2000-03-10 22:30:29 +000021199else
Martin v. Löwis11437992002-04-12 09:54:03 +000021200 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000021201
21202fi
21203
Michael W. Hudson54241132001-12-07 15:38:26 +000021204
Martin v. Löwis11437992002-04-12 09:54:03 +000021205
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021206# determine wchar_t size
21207if test "$wchar_h" = yes
21208then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021209 { echo "$as_me:$LINENO: checking for wchar_t" >&5
21210echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021211if test "${ac_cv_type_wchar_t+set}" = set; then
21212 echo $ECHO_N "(cached) $ECHO_C" >&6
21213else
21214 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021215/* confdefs.h. */
21216_ACEOF
21217cat confdefs.h >>conftest.$ac_ext
21218cat >>conftest.$ac_ext <<_ACEOF
21219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021220#include <wchar.h>
21221
Martin v. Löwiseba40652007-08-30 20:10:57 +000021222typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021223int
21224main ()
21225{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021226if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021227 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021228if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000021229 return 0;
21230 ;
21231 return 0;
21232}
21233_ACEOF
21234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021235if { (ac_try="$ac_compile"
21236case "(($ac_try" in
21237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21238 *) ac_try_echo=$ac_try;;
21239esac
21240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021243 grep -v '^ *+' conftest.er1 >conftest.err
21244 rm -f conftest.er1
21245 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021247 (exit $ac_status); } && {
21248 test -z "$ac_c_werror_flag" ||
21249 test ! -s conftest.err
21250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021251 ac_cv_type_wchar_t=yes
21252else
21253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021254sed 's/^/| /' conftest.$ac_ext >&5
21255
Martin v. Löwiseba40652007-08-30 20:10:57 +000021256 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021257fi
Brett Cannon19fab762007-06-02 03:02:29 +000021258
Martin v. Löwiseba40652007-08-30 20:10:57 +000021259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21260fi
21261{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
21262echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
21263
21264# The cast to long int works around a bug in the HP C Compiler
21265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21267# This bug is HP SR number 8606223364.
21268{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
21269echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021270if test "${ac_cv_sizeof_wchar_t+set}" = set; then
21271 echo $ECHO_N "(cached) $ECHO_C" >&6
21272else
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 if test "$cross_compiling" = yes; then
21274 # Depending upon the size, compute the lo and hi bounds.
21275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021276/* confdefs.h. */
21277_ACEOF
21278cat confdefs.h >>conftest.$ac_ext
21279cat >>conftest.$ac_ext <<_ACEOF
21280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021281#include <wchar.h>
21282
Martin v. Löwiseba40652007-08-30 20:10:57 +000021283 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021284int
21285main ()
21286{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021287static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021288test_array [0] = 0
21289
21290 ;
21291 return 0;
21292}
21293_ACEOF
21294rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021295if { (ac_try="$ac_compile"
21296case "(($ac_try" in
21297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21298 *) ac_try_echo=$ac_try;;
21299esac
21300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021303 grep -v '^ *+' conftest.er1 >conftest.err
21304 rm -f conftest.er1
21305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021307 (exit $ac_status); } && {
21308 test -z "$ac_c_werror_flag" ||
21309 test ! -s conftest.err
21310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021311 ac_lo=0 ac_mid=0
21312 while :; do
21313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021314/* confdefs.h. */
21315_ACEOF
21316cat confdefs.h >>conftest.$ac_ext
21317cat >>conftest.$ac_ext <<_ACEOF
21318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021319#include <wchar.h>
21320
Martin v. Löwiseba40652007-08-30 20:10:57 +000021321 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021322int
21323main ()
21324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021326test_array [0] = 0
21327
21328 ;
21329 return 0;
21330}
21331_ACEOF
21332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021333if { (ac_try="$ac_compile"
21334case "(($ac_try" in
21335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21336 *) ac_try_echo=$ac_try;;
21337esac
21338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021341 grep -v '^ *+' conftest.er1 >conftest.err
21342 rm -f conftest.er1
21343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345 (exit $ac_status); } && {
21346 test -z "$ac_c_werror_flag" ||
21347 test ! -s conftest.err
21348 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 ac_hi=$ac_mid; break
21350else
21351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021352sed 's/^/| /' conftest.$ac_ext >&5
21353
Martin v. Löwiseba40652007-08-30 20:10:57 +000021354 ac_lo=`expr $ac_mid + 1`
21355 if test $ac_lo -le $ac_mid; then
21356 ac_lo= ac_hi=
21357 break
21358 fi
21359 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021361
21362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021363 done
21364else
21365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021366sed 's/^/| /' conftest.$ac_ext >&5
21367
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021369/* confdefs.h. */
21370_ACEOF
21371cat confdefs.h >>conftest.$ac_ext
21372cat >>conftest.$ac_ext <<_ACEOF
21373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021374#include <wchar.h>
21375
Martin v. Löwiseba40652007-08-30 20:10:57 +000021376 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021377int
21378main ()
21379{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021381test_array [0] = 0
21382
21383 ;
21384 return 0;
21385}
21386_ACEOF
21387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388if { (ac_try="$ac_compile"
21389case "(($ac_try" in
21390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21391 *) ac_try_echo=$ac_try;;
21392esac
21393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021396 grep -v '^ *+' conftest.er1 >conftest.err
21397 rm -f conftest.er1
21398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400 (exit $ac_status); } && {
21401 test -z "$ac_c_werror_flag" ||
21402 test ! -s conftest.err
21403 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021404 ac_hi=-1 ac_mid=-1
21405 while :; do
21406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021407/* confdefs.h. */
21408_ACEOF
21409cat confdefs.h >>conftest.$ac_ext
21410cat >>conftest.$ac_ext <<_ACEOF
21411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021412#include <wchar.h>
21413
Martin v. Löwiseba40652007-08-30 20:10:57 +000021414 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021415int
21416main ()
21417{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021418static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021419test_array [0] = 0
21420
21421 ;
21422 return 0;
21423}
21424_ACEOF
21425rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021426if { (ac_try="$ac_compile"
21427case "(($ac_try" in
21428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21429 *) ac_try_echo=$ac_try;;
21430esac
21431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021434 grep -v '^ *+' conftest.er1 >conftest.err
21435 rm -f conftest.er1
21436 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021438 (exit $ac_status); } && {
21439 test -z "$ac_c_werror_flag" ||
21440 test ! -s conftest.err
21441 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021442 ac_lo=$ac_mid; break
21443else
21444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021445sed 's/^/| /' conftest.$ac_ext >&5
21446
Martin v. Löwiseba40652007-08-30 20:10:57 +000021447 ac_hi=`expr '(' $ac_mid ')' - 1`
21448 if test $ac_mid -le $ac_hi; then
21449 ac_lo= ac_hi=
21450 break
21451 fi
21452 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000021453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021454
21455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021456 done
21457else
21458 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021459sed 's/^/| /' conftest.$ac_ext >&5
21460
Martin v. Löwiseba40652007-08-30 20:10:57 +000021461 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000021462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021463
21464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021466
21467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021468# Binary search between lo and hi bounds.
21469while test "x$ac_lo" != "x$ac_hi"; do
21470 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021472/* confdefs.h. */
21473_ACEOF
21474cat confdefs.h >>conftest.$ac_ext
21475cat >>conftest.$ac_ext <<_ACEOF
21476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021477#include <wchar.h>
21478
Martin v. Löwiseba40652007-08-30 20:10:57 +000021479 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000021480int
21481main ()
21482{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021483static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000021484test_array [0] = 0
21485
21486 ;
21487 return 0;
21488}
21489_ACEOF
21490rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021491if { (ac_try="$ac_compile"
21492case "(($ac_try" in
21493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21494 *) ac_try_echo=$ac_try;;
21495esac
21496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021499 grep -v '^ *+' conftest.er1 >conftest.err
21500 rm -f conftest.er1
21501 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021503 (exit $ac_status); } && {
21504 test -z "$ac_c_werror_flag" ||
21505 test ! -s conftest.err
21506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021507 ac_hi=$ac_mid
21508else
21509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021510sed 's/^/| /' conftest.$ac_ext >&5
21511
Martin v. Löwiseba40652007-08-30 20:10:57 +000021512 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000021513fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021514
21515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021516done
21517case $ac_lo in
21518?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021519'') if test "$ac_cv_type_wchar_t" = yes; then
21520 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021521See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021522echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021523See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021524 { (exit 77); exit 77; }; }
21525 else
21526 ac_cv_sizeof_wchar_t=0
21527 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021528esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021529else
Martin v. Löwis11437992002-04-12 09:54:03 +000021530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021531/* confdefs.h. */
21532_ACEOF
21533cat confdefs.h >>conftest.$ac_ext
21534cat >>conftest.$ac_ext <<_ACEOF
21535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021536#include <wchar.h>
21537
Martin v. Löwiseba40652007-08-30 20:10:57 +000021538 typedef wchar_t ac__type_sizeof_;
21539static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21540static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000021541#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021542#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021543int
21544main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021545{
Martin v. Löwis11437992002-04-12 09:54:03 +000021546
21547 FILE *f = fopen ("conftest.val", "w");
21548 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549 return 1;
21550 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000021551 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021552 long int i = longval ();
21553 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21554 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021555 fprintf (f, "%ld\n", i);
21556 }
21557 else
21558 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000021559 unsigned long int i = ulongval ();
21560 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21561 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000021562 fprintf (f, "%lu\n", i);
21563 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021564 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021565
21566 ;
21567 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000021568}
Martin v. Löwis11437992002-04-12 09:54:03 +000021569_ACEOF
21570rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021571if { (ac_try="$ac_link"
21572case "(($ac_try" in
21573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21574 *) ac_try_echo=$ac_try;;
21575esac
21576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21577 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021578 ac_status=$?
21579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21580 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021581 { (case "(($ac_try" in
21582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21583 *) ac_try_echo=$ac_try;;
21584esac
21585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21586 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021587 ac_status=$?
21588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21589 (exit $ac_status); }; }; then
21590 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000021591else
Martin v. Löwis11437992002-04-12 09:54:03 +000021592 echo "$as_me: program exited with status $ac_status" >&5
21593echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021594sed 's/^/| /' conftest.$ac_ext >&5
21595
Martin v. Löwis11437992002-04-12 09:54:03 +000021596( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000021597if test "$ac_cv_type_wchar_t" = yes; then
21598 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021599See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021600echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000021601See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000021602 { (exit 77); exit 77; }; }
21603 else
21604 ac_cv_sizeof_wchar_t=0
21605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021606fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021607rm -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 +000021608fi
21609rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000021610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021611{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
21612echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
21613
21614
21615
Martin v. Löwis11437992002-04-12 09:54:03 +000021616cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021617#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021618_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021619
Michael W. Hudson54241132001-12-07 15:38:26 +000021620
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021621fi
21622
Martin v. Löwiseba40652007-08-30 20:10:57 +000021623{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
21624echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021625have_ucs4_tcl=no
21626cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021627/* confdefs.h. */
21628_ACEOF
21629cat confdefs.h >>conftest.$ac_ext
21630cat >>conftest.$ac_ext <<_ACEOF
21631/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021632
21633#include <tcl.h>
21634#if TCL_UTF_MAX != 6
21635# error "NOT UCS4_TCL"
21636#endif
21637int
21638main ()
21639{
21640
21641 ;
21642 return 0;
21643}
21644_ACEOF
21645rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021646if { (ac_try="$ac_compile"
21647case "(($ac_try" in
21648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21649 *) ac_try_echo=$ac_try;;
21650esac
21651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21652 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021654 grep -v '^ *+' conftest.er1 >conftest.err
21655 rm -f conftest.er1
21656 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021658 (exit $ac_status); } && {
21659 test -z "$ac_c_werror_flag" ||
21660 test ! -s conftest.err
21661 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021662
21663
21664cat >>confdefs.h <<\_ACEOF
21665#define HAVE_UCS4_TCL 1
21666_ACEOF
21667
21668 have_ucs4_tcl=yes
21669
21670else
21671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021672sed 's/^/| /' conftest.$ac_ext >&5
21673
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021675fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021676
21677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21678{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
21679echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021680
Skip Montanaro6dead952003-09-25 14:50:04 +000021681# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021682if test "$wchar_h" = yes
21683then
21684 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000021685 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
21686echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021687 if test "${ac_cv_wchar_t_signed+set}" = set; then
21688 echo $ECHO_N "(cached) $ECHO_C" >&6
21689else
21690
21691 if test "$cross_compiling" = yes; then
21692 ac_cv_wchar_t_signed=yes
21693else
21694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021695/* confdefs.h. */
21696_ACEOF
21697cat confdefs.h >>conftest.$ac_ext
21698cat >>conftest.$ac_ext <<_ACEOF
21699/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021700
21701 #include <wchar.h>
21702 int main()
21703 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000021704 /* Success: exit code 0 */
21705 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021706 }
21707
21708_ACEOF
21709rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021710if { (ac_try="$ac_link"
21711case "(($ac_try" in
21712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21713 *) ac_try_echo=$ac_try;;
21714esac
21715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21716 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021717 ac_status=$?
21718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021720 { (case "(($ac_try" in
21721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21722 *) ac_try_echo=$ac_try;;
21723esac
21724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21725 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021726 ac_status=$?
21727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21728 (exit $ac_status); }; }; then
21729 ac_cv_wchar_t_signed=yes
21730else
21731 echo "$as_me: program exited with status $ac_status" >&5
21732echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021733sed 's/^/| /' conftest.$ac_ext >&5
21734
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021735( exit $ac_status )
21736ac_cv_wchar_t_signed=no
21737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021738rm -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 +000021739fi
21740
Martin v. Löwiseba40652007-08-30 20:10:57 +000021741
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021742fi
21743
Martin v. Löwiseba40652007-08-30 20:10:57 +000021744 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
21745echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
21746fi
21747
21748{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
21749echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
21750# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021751if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021752 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021753else
21754 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000021755fi
21756
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021757
21758if test $enable_unicode = yes
21759then
Martin v. Löwisfd917792001-06-27 20:22:04 +000021760 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000021761 case "$have_ucs4_tcl" in
21762 yes) enable_unicode="ucs4"
21763 ;;
21764 *) enable_unicode="ucs2"
21765 ;;
21766 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021767fi
21768
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021769
21770
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021771case "$enable_unicode" in
21772ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000021773 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021774#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000021775_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021776
21777 ;;
21778ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000021779 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021780#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000021781_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021782
21783 ;;
21784esac
21785
Michael W. Hudson54241132001-12-07 15:38:26 +000021786
Martin v. Löwis11437992002-04-12 09:54:03 +000021787
21788
Martin v. Löwis0036cba2002-04-12 09:58:45 +000021789
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021790if test "$enable_unicode" = "no"
21791then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021792 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000021793 { echo "$as_me:$LINENO: result: not used" >&5
21794echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021795else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000021796 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000021797
21798cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021799#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021800_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021801
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000021802
21803 # wchar_t is only usable if it maps to an unsigned type
21804 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000021805 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021806 then
21807 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021808
Martin v. Löwis11437992002-04-12 09:54:03 +000021809cat >>confdefs.h <<\_ACEOF
21810#define HAVE_USABLE_WCHAR_T 1
21811_ACEOF
21812
21813 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021814#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000021815_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021816
21817 elif test "$ac_cv_sizeof_short" = "$unicode_size"
21818 then
21819 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000021820 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021821#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000021822_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021823
21824 elif test "$ac_cv_sizeof_long" = "$unicode_size"
21825 then
21826 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000021827 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021828#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000021829_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021830
21831 else
21832 PY_UNICODE_TYPE="no type found"
21833 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021834 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
21835echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000021836fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021837
21838# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000021839{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
21840echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021841if test "${ac_cv_c_bigendian+set}" = set; then
21842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000021843else
Martin v. Löwis11437992002-04-12 09:54:03 +000021844 # See if sys/param.h defines the BYTE_ORDER macro.
21845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021846/* confdefs.h. */
21847_ACEOF
21848cat confdefs.h >>conftest.$ac_ext
21849cat >>conftest.$ac_ext <<_ACEOF
21850/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021851#include <sys/types.h>
21852#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021853
Martin v. Löwis11437992002-04-12 09:54:03 +000021854int
21855main ()
21856{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021857#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
21858 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000021859 bogus endian macros
21860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021861
21862 ;
21863 return 0;
21864}
21865_ACEOF
21866rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021867if { (ac_try="$ac_compile"
21868case "(($ac_try" in
21869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21870 *) ac_try_echo=$ac_try;;
21871esac
21872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21873 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021874 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021875 grep -v '^ *+' conftest.er1 >conftest.err
21876 rm -f conftest.er1
21877 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021879 (exit $ac_status); } && {
21880 test -z "$ac_c_werror_flag" ||
21881 test ! -s conftest.err
21882 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021883 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000021884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021885/* confdefs.h. */
21886_ACEOF
21887cat confdefs.h >>conftest.$ac_ext
21888cat >>conftest.$ac_ext <<_ACEOF
21889/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000021890#include <sys/types.h>
21891#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000021892
Martin v. Löwis11437992002-04-12 09:54:03 +000021893int
21894main ()
21895{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021896#if BYTE_ORDER != BIG_ENDIAN
21897 not big endian
21898#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021899
21900 ;
21901 return 0;
21902}
21903_ACEOF
21904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021905if { (ac_try="$ac_compile"
21906case "(($ac_try" in
21907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21908 *) ac_try_echo=$ac_try;;
21909esac
21910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021913 grep -v '^ *+' conftest.er1 >conftest.err
21914 rm -f conftest.er1
21915 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021917 (exit $ac_status); } && {
21918 test -z "$ac_c_werror_flag" ||
21919 test ! -s conftest.err
21920 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021921 ac_cv_c_bigendian=yes
21922else
Martin v. Löwis11437992002-04-12 09:54:03 +000021923 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021924sed 's/^/| /' conftest.$ac_ext >&5
21925
Martin v. Löwiseba40652007-08-30 20:10:57 +000021926 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000021927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021928
21929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021930else
Martin v. Löwis11437992002-04-12 09:54:03 +000021931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021932sed 's/^/| /' conftest.$ac_ext >&5
21933
Martin v. Löwiseba40652007-08-30 20:10:57 +000021934 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000021935if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021936 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000021937 ac_cv_c_bigendian=unknown
21938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021939/* confdefs.h. */
21940_ACEOF
21941cat confdefs.h >>conftest.$ac_ext
21942cat >>conftest.$ac_ext <<_ACEOF
21943/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021944short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
21945short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021946void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021947short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
21948short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000021949void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021950int
21951main ()
21952{
21953 _ascii (); _ebcdic ();
21954 ;
21955 return 0;
21956}
21957_ACEOF
21958rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021959if { (ac_try="$ac_compile"
21960case "(($ac_try" in
21961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21962 *) ac_try_echo=$ac_try;;
21963esac
21964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021967 grep -v '^ *+' conftest.er1 >conftest.err
21968 rm -f conftest.er1
21969 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021971 (exit $ac_status); } && {
21972 test -z "$ac_c_werror_flag" ||
21973 test ! -s conftest.err
21974 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021975 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021976 ac_cv_c_bigendian=yes
21977fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021978if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021979 if test "$ac_cv_c_bigendian" = unknown; then
21980 ac_cv_c_bigendian=no
21981 else
21982 # finding both strings is unlikely to happen, but who knows?
21983 ac_cv_c_bigendian=unknown
21984 fi
21985fi
21986else
21987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021988sed 's/^/| /' conftest.$ac_ext >&5
21989
Martin v. Löwiseba40652007-08-30 20:10:57 +000021990
Martin v. Löwis11437992002-04-12 09:54:03 +000021991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021992
21993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021994else
21995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021996/* confdefs.h. */
21997_ACEOF
21998cat confdefs.h >>conftest.$ac_ext
21999cat >>conftest.$ac_ext <<_ACEOF
22000/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022002int
22003main ()
22004{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022005
Guido van Rossumef2255b2000-03-10 22:30:29 +000022006 /* Are we little or big endian? From Harbison&Steele. */
22007 union
22008 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022009 long int l;
22010 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000022011 } u;
22012 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013 return u.c[sizeof (long int) - 1] == 1;
22014
22015 ;
22016 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022017}
Martin v. Löwis11437992002-04-12 09:54:03 +000022018_ACEOF
22019rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022020if { (ac_try="$ac_link"
22021case "(($ac_try" in
22022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22023 *) ac_try_echo=$ac_try;;
22024esac
22025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22026 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022027 ac_status=$?
22028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22029 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022030 { (case "(($ac_try" in
22031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22032 *) ac_try_echo=$ac_try;;
22033esac
22034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22035 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022036 ac_status=$?
22037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22038 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022039 ac_cv_c_bigendian=no
22040else
Martin v. Löwis11437992002-04-12 09:54:03 +000022041 echo "$as_me: program exited with status $ac_status" >&5
22042echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022043sed 's/^/| /' conftest.$ac_ext >&5
22044
Martin v. Löwis11437992002-04-12 09:54:03 +000022045( exit $ac_status )
22046ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000022047fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022048rm -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 +000022049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022050
22051
Martin v. Löwis11437992002-04-12 09:54:03 +000022052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022053
22054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022056{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
22057echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022058case $ac_cv_c_bigendian in
22059 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000022060
Martin v. Löwis11437992002-04-12 09:54:03 +000022061cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022062#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022063_ACEOF
22064 ;;
22065 no)
22066 ;;
22067 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000022068 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022069presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022070echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000022071presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
22072 { (exit 1); exit 1; }; } ;;
22073esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000022074
Michael W. Hudson54241132001-12-07 15:38:26 +000022075
Ronald Oussoren988117f2006-04-29 11:31:35 +000022076
22077
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022078# Check whether right shifting a negative integer extends the sign bit
22079# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000022080{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
22081echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022082if test "${ac_cv_rshift_extends_sign+set}" = set; then
22083 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000022084else
Martin v. Löwis11437992002-04-12 09:54:03 +000022085
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022086if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022087 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022088else
Martin v. Löwis11437992002-04-12 09:54:03 +000022089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022090/* confdefs.h. */
22091_ACEOF
22092cat confdefs.h >>conftest.$ac_ext
22093cat >>conftest.$ac_ext <<_ACEOF
22094/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022095
22096int main()
22097{
Vladimir Marangozova6180282000-07-12 05:05:06 +000022098 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022099}
22100
Martin v. Löwis11437992002-04-12 09:54:03 +000022101_ACEOF
22102rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022103if { (ac_try="$ac_link"
22104case "(($ac_try" in
22105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22106 *) ac_try_echo=$ac_try;;
22107esac
22108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22109 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022110 ac_status=$?
22111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022113 { (case "(($ac_try" in
22114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22115 *) ac_try_echo=$ac_try;;
22116esac
22117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22118 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022119 ac_status=$?
22120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22121 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000022122 ac_cv_rshift_extends_sign=yes
22123else
Martin v. Löwis11437992002-04-12 09:54:03 +000022124 echo "$as_me: program exited with status $ac_status" >&5
22125echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022126sed 's/^/| /' conftest.$ac_ext >&5
22127
Martin v. Löwis11437992002-04-12 09:54:03 +000022128( exit $ac_status )
22129ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000022130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022131rm -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 +000022132fi
22133
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134
22135fi
22136
22137{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
22138echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000022139if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022140then
Martin v. Löwis11437992002-04-12 09:54:03 +000022141
22142cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022143#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022144_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022145
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022146fi
22147
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022148# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000022149{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
22150echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022151if test "${ac_cv_have_getc_unlocked+set}" = set; then
22152 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022153else
Martin v. Löwis11437992002-04-12 09:54:03 +000022154
22155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022156/* confdefs.h. */
22157_ACEOF
22158cat confdefs.h >>conftest.$ac_ext
22159cat >>conftest.$ac_ext <<_ACEOF
22160/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022161#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022162int
22163main ()
22164{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022165
22166 FILE *f = fopen("/dev/null", "r");
22167 flockfile(f);
22168 getc_unlocked(f);
22169 funlockfile(f);
22170
Martin v. Löwis11437992002-04-12 09:54:03 +000022171 ;
22172 return 0;
22173}
22174_ACEOF
22175rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022176if { (ac_try="$ac_link"
22177case "(($ac_try" in
22178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22179 *) ac_try_echo=$ac_try;;
22180esac
22181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22182 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022184 grep -v '^ *+' conftest.er1 >conftest.err
22185 rm -f conftest.er1
22186 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022188 (exit $ac_status); } && {
22189 test -z "$ac_c_werror_flag" ||
22190 test ! -s conftest.err
22191 } && test -s conftest$ac_exeext &&
22192 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022193 ac_cv_have_getc_unlocked=yes
22194else
Martin v. Löwis11437992002-04-12 09:54:03 +000022195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022196sed 's/^/| /' conftest.$ac_ext >&5
22197
Martin v. Löwiseba40652007-08-30 20:10:57 +000022198 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022200
22201rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022202 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022203fi
22204
Martin v. Löwiseba40652007-08-30 20:10:57 +000022205{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
22206echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022207if test "$ac_cv_have_getc_unlocked" = yes
22208then
Martin v. Löwis11437992002-04-12 09:54:03 +000022209
22210cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022211#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022212_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000022213
22214fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000022215
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022216# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000022217# save the value of LIBS so we don't actually link Python with readline
22218LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022219
Martin v. Löwiseba40652007-08-30 20:10:57 +000022220{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
22221echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022222if test "${ac_cv_lib_readline_readline+set}" = set; then
22223 echo $ECHO_N "(cached) $ECHO_C" >&6
22224else
22225 ac_check_lib_save_LIBS=$LIBS
22226LIBS="-lreadline $LIBS"
22227cat >conftest.$ac_ext <<_ACEOF
22228/* confdefs.h. */
22229_ACEOF
22230cat confdefs.h >>conftest.$ac_ext
22231cat >>conftest.$ac_ext <<_ACEOF
22232/* end confdefs.h. */
22233
Martin v. Löwiseba40652007-08-30 20:10:57 +000022234/* Override any GCC internal prototype to avoid an error.
22235 Use char because int might match the return type of a GCC
22236 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022237#ifdef __cplusplus
22238extern "C"
22239#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022240char readline ();
22241int
22242main ()
22243{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022244return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022245 ;
22246 return 0;
22247}
22248_ACEOF
22249rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022250if { (ac_try="$ac_link"
22251case "(($ac_try" in
22252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22253 *) ac_try_echo=$ac_try;;
22254esac
22255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22256 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022257 ac_status=$?
22258 grep -v '^ *+' conftest.er1 >conftest.err
22259 rm -f conftest.er1
22260 cat conftest.err >&5
22261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022262 (exit $ac_status); } && {
22263 test -z "$ac_c_werror_flag" ||
22264 test ! -s conftest.err
22265 } && test -s conftest$ac_exeext &&
22266 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022267 ac_cv_lib_readline_readline=yes
22268else
22269 echo "$as_me: failed program was:" >&5
22270sed 's/^/| /' conftest.$ac_ext >&5
22271
Martin v. Löwiseba40652007-08-30 20:10:57 +000022272 ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274
22275rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022276 conftest$ac_exeext conftest.$ac_ext
22277LIBS=$ac_check_lib_save_LIBS
22278fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022279{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
22280echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022281if test $ac_cv_lib_readline_readline = yes; then
22282 cat >>confdefs.h <<_ACEOF
22283#define HAVE_LIBREADLINE 1
22284_ACEOF
22285
22286 LIBS="-lreadline $LIBS"
22287
22288fi
22289
22290if test "$ac_cv_have_readline_readline" = no
22291then
22292
Martin v. Löwiseba40652007-08-30 20:10:57 +000022293{ echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
22294echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022295if test "${ac_cv_lib_termcap_readline+set}" = set; then
22296 echo $ECHO_N "(cached) $ECHO_C" >&6
22297else
22298 ac_check_lib_save_LIBS=$LIBS
22299LIBS="-ltermcap $LIBS"
22300cat >conftest.$ac_ext <<_ACEOF
22301/* confdefs.h. */
22302_ACEOF
22303cat confdefs.h >>conftest.$ac_ext
22304cat >>conftest.$ac_ext <<_ACEOF
22305/* end confdefs.h. */
22306
Martin v. Löwiseba40652007-08-30 20:10:57 +000022307/* Override any GCC internal prototype to avoid an error.
22308 Use char because int might match the return type of a GCC
22309 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022310#ifdef __cplusplus
22311extern "C"
22312#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022313char readline ();
22314int
22315main ()
22316{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022318 ;
22319 return 0;
22320}
22321_ACEOF
22322rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022323if { (ac_try="$ac_link"
22324case "(($ac_try" in
22325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22326 *) ac_try_echo=$ac_try;;
22327esac
22328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22329 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022330 ac_status=$?
22331 grep -v '^ *+' conftest.er1 >conftest.err
22332 rm -f conftest.er1
22333 cat conftest.err >&5
22334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022335 (exit $ac_status); } && {
22336 test -z "$ac_c_werror_flag" ||
22337 test ! -s conftest.err
22338 } && test -s conftest$ac_exeext &&
22339 $as_test_x conftest$ac_exeext; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022340 ac_cv_lib_termcap_readline=yes
22341else
22342 echo "$as_me: failed program was:" >&5
22343sed 's/^/| /' conftest.$ac_ext >&5
22344
Martin v. Löwiseba40652007-08-30 20:10:57 +000022345 ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022347
22348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022349 conftest$ac_exeext conftest.$ac_ext
22350LIBS=$ac_check_lib_save_LIBS
22351fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022352{ echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
22353echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6; }
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022354if test $ac_cv_lib_termcap_readline = yes; then
22355 cat >>confdefs.h <<_ACEOF
22356#define HAVE_LIBTERMCAP 1
22357_ACEOF
22358
22359 LIBS="-ltermcap $LIBS"
22360
22361fi
22362
22363fi
22364
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022365# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000022366{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
22367echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022368if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
22369 echo $ECHO_N "(cached) $ECHO_C" >&6
22370else
22371 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022372LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022373cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022374/* confdefs.h. */
22375_ACEOF
22376cat confdefs.h >>conftest.$ac_ext
22377cat >>conftest.$ac_ext <<_ACEOF
22378/* end confdefs.h. */
22379
Martin v. Löwiseba40652007-08-30 20:10:57 +000022380/* Override any GCC internal prototype to avoid an error.
22381 Use char because int might match the return type of a GCC
22382 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022383#ifdef __cplusplus
22384extern "C"
22385#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022386char rl_callback_handler_install ();
22387int
22388main ()
22389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022390return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022391 ;
22392 return 0;
22393}
22394_ACEOF
22395rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022396if { (ac_try="$ac_link"
22397case "(($ac_try" in
22398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22399 *) ac_try_echo=$ac_try;;
22400esac
22401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22402 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022404 grep -v '^ *+' conftest.er1 >conftest.err
22405 rm -f conftest.er1
22406 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022408 (exit $ac_status); } && {
22409 test -z "$ac_c_werror_flag" ||
22410 test ! -s conftest.err
22411 } && test -s conftest$ac_exeext &&
22412 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022413 ac_cv_lib_readline_rl_callback_handler_install=yes
22414else
22415 echo "$as_me: failed program was:" >&5
22416sed 's/^/| /' conftest.$ac_ext >&5
22417
Martin v. Löwiseba40652007-08-30 20:10:57 +000022418 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022420
22421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022422 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022423LIBS=$ac_check_lib_save_LIBS
22424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022425{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
22426echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022427if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
22428
22429cat >>confdefs.h <<\_ACEOF
22430#define HAVE_RL_CALLBACK 1
22431_ACEOF
22432
22433fi
22434
22435
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022436# check for readline 2.2
22437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022438/* confdefs.h. */
22439_ACEOF
22440cat confdefs.h >>conftest.$ac_ext
22441cat >>conftest.$ac_ext <<_ACEOF
22442/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022443#include <readline/readline.h>
22444_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022445if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022452 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022453 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022454 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); } >/dev/null && {
22458 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22459 test ! -s conftest.err
22460 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022461 have_readline=yes
22462else
22463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022464sed 's/^/| /' conftest.$ac_ext >&5
22465
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022466 have_readline=no
22467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022468
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022469rm -f conftest.err conftest.$ac_ext
22470if test $have_readline = yes
22471then
22472 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022473/* confdefs.h. */
22474_ACEOF
22475cat confdefs.h >>conftest.$ac_ext
22476cat >>conftest.$ac_ext <<_ACEOF
22477/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022478#include <readline/readline.h>
22479
22480_ACEOF
22481if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000022482 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000022483
22484cat >>confdefs.h <<\_ACEOF
22485#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
22486_ACEOF
22487
22488fi
22489rm -f conftest*
22490
22491fi
22492
Martin v. Löwis0daad592001-09-30 21:09:59 +000022493# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000022494{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
22495echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022496if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
22497 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000022498else
Martin v. Löwis11437992002-04-12 09:54:03 +000022499 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022500LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022502/* confdefs.h. */
22503_ACEOF
22504cat confdefs.h >>conftest.$ac_ext
22505cat >>conftest.$ac_ext <<_ACEOF
22506/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022507
Martin v. Löwiseba40652007-08-30 20:10:57 +000022508/* Override any GCC internal prototype to avoid an error.
22509 Use char because int might match the return type of a GCC
22510 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022511#ifdef __cplusplus
22512extern "C"
22513#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022514char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022515int
22516main ()
22517{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022518return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022519 ;
22520 return 0;
22521}
22522_ACEOF
22523rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524if { (ac_try="$ac_link"
22525case "(($ac_try" in
22526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22527 *) ac_try_echo=$ac_try;;
22528esac
22529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22530 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022532 grep -v '^ *+' conftest.er1 >conftest.err
22533 rm -f conftest.er1
22534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022536 (exit $ac_status); } && {
22537 test -z "$ac_c_werror_flag" ||
22538 test ! -s conftest.err
22539 } && test -s conftest$ac_exeext &&
22540 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022541 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000022542else
Martin v. Löwis11437992002-04-12 09:54:03 +000022543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022544sed 's/^/| /' conftest.$ac_ext >&5
22545
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000022547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022548
22549rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022550 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022551LIBS=$ac_check_lib_save_LIBS
22552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022553{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
22554echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022555if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022556
Martin v. Löwis11437992002-04-12 09:54:03 +000022557cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022558#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022559_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000022560
Martin v. Löwis0daad592001-09-30 21:09:59 +000022561fi
22562
Michael W. Hudson54241132001-12-07 15:38:26 +000022563
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000022564# also in 4.0
22565{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
22566echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
22567if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
22568 echo $ECHO_N "(cached) $ECHO_C" >&6
22569else
22570 ac_check_lib_save_LIBS=$LIBS
22571LIBS="-lreadline $LIBS"
22572cat >conftest.$ac_ext <<_ACEOF
22573/* confdefs.h. */
22574_ACEOF
22575cat confdefs.h >>conftest.$ac_ext
22576cat >>conftest.$ac_ext <<_ACEOF
22577/* end confdefs.h. */
22578
22579/* Override any GCC internal prototype to avoid an error.
22580 Use char because int might match the return type of a GCC
22581 builtin and then its argument prototype would still apply. */
22582#ifdef __cplusplus
22583extern "C"
22584#endif
22585char rl_completion_display_matches_hook ();
22586int
22587main ()
22588{
22589return rl_completion_display_matches_hook ();
22590 ;
22591 return 0;
22592}
22593_ACEOF
22594rm -f conftest.$ac_objext conftest$ac_exeext
22595if { (ac_try="$ac_link"
22596case "(($ac_try" in
22597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22598 *) ac_try_echo=$ac_try;;
22599esac
22600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22601 (eval "$ac_link") 2>conftest.er1
22602 ac_status=$?
22603 grep -v '^ *+' conftest.er1 >conftest.err
22604 rm -f conftest.er1
22605 cat conftest.err >&5
22606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22607 (exit $ac_status); } && {
22608 test -z "$ac_c_werror_flag" ||
22609 test ! -s conftest.err
22610 } && test -s conftest$ac_exeext &&
22611 $as_test_x conftest$ac_exeext; then
22612 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
22613else
22614 echo "$as_me: failed program was:" >&5
22615sed 's/^/| /' conftest.$ac_ext >&5
22616
22617 ac_cv_lib_readline_rl_completion_display_matches_hook=no
22618fi
22619
22620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22621 conftest$ac_exeext conftest.$ac_ext
22622LIBS=$ac_check_lib_save_LIBS
22623fi
22624{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
22625echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
22626if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
22627
22628cat >>confdefs.h <<\_ACEOF
22629#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
22630_ACEOF
22631
22632fi
22633
22634
Martin v. Löwis0daad592001-09-30 21:09:59 +000022635# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000022636{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
22637echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022638if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
22639 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000022640else
Martin v. Löwis11437992002-04-12 09:54:03 +000022641 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000022642LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022644/* confdefs.h. */
22645_ACEOF
22646cat confdefs.h >>conftest.$ac_ext
22647cat >>conftest.$ac_ext <<_ACEOF
22648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022649
Martin v. Löwiseba40652007-08-30 20:10:57 +000022650/* Override any GCC internal prototype to avoid an error.
22651 Use char because int might match the return type of a GCC
22652 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022653#ifdef __cplusplus
22654extern "C"
22655#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022656char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022657int
22658main ()
22659{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022660return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022661 ;
22662 return 0;
22663}
22664_ACEOF
22665rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022666if { (ac_try="$ac_link"
22667case "(($ac_try" in
22668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22669 *) ac_try_echo=$ac_try;;
22670esac
22671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22672 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022674 grep -v '^ *+' conftest.er1 >conftest.err
22675 rm -f conftest.er1
22676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022678 (exit $ac_status); } && {
22679 test -z "$ac_c_werror_flag" ||
22680 test ! -s conftest.err
22681 } && test -s conftest$ac_exeext &&
22682 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000022684else
Martin v. Löwis11437992002-04-12 09:54:03 +000022685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022686sed 's/^/| /' conftest.$ac_ext >&5
22687
Martin v. Löwiseba40652007-08-30 20:10:57 +000022688 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000022689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022690
22691rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022693LIBS=$ac_check_lib_save_LIBS
22694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022695{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
22696echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022697if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022698
Martin v. Löwis11437992002-04-12 09:54:03 +000022699cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022700#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022701_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000022702
Guido van Rossum353ae582001-07-10 16:45:32 +000022703fi
22704
Jack Jansendd19cf82001-12-06 22:36:17 +000022705
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022706# also in readline 4.2
22707cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022708/* confdefs.h. */
22709_ACEOF
22710cat confdefs.h >>conftest.$ac_ext
22711cat >>conftest.$ac_ext <<_ACEOF
22712/* end confdefs.h. */
22713#include <readline/readline.h>
22714_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022715if { (ac_try="$ac_cpp conftest.$ac_ext"
22716case "(($ac_try" in
22717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22718 *) ac_try_echo=$ac_try;;
22719esac
22720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22721 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022722 ac_status=$?
22723 grep -v '^ *+' conftest.er1 >conftest.err
22724 rm -f conftest.er1
22725 cat conftest.err >&5
22726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022727 (exit $ac_status); } >/dev/null && {
22728 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22729 test ! -s conftest.err
22730 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022731 have_readline=yes
22732else
22733 echo "$as_me: failed program was:" >&5
22734sed 's/^/| /' conftest.$ac_ext >&5
22735
22736 have_readline=no
22737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022739rm -f conftest.err conftest.$ac_ext
22740if test $have_readline = yes
22741then
22742 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022743/* confdefs.h. */
22744_ACEOF
22745cat confdefs.h >>conftest.$ac_ext
22746cat >>conftest.$ac_ext <<_ACEOF
22747/* end confdefs.h. */
22748#include <readline/readline.h>
22749
22750_ACEOF
22751if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22752 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
22753
22754cat >>confdefs.h <<\_ACEOF
22755#define HAVE_RL_CATCH_SIGNAL 1
22756_ACEOF
22757
22758fi
22759rm -f conftest*
22760
22761fi
22762
Martin v. Löwis82bca632006-02-10 20:49:30 +000022763# End of readline checks: restore LIBS
22764LIBS=$LIBS_no_readline
22765
Martin v. Löwiseba40652007-08-30 20:10:57 +000022766{ echo "$as_me:$LINENO: checking for broken nice()" >&5
22767echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022768if test "${ac_cv_broken_nice+set}" = set; then
22769 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022770else
Martin v. Löwis11437992002-04-12 09:54:03 +000022771
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022772if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000022773 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022774else
Martin v. Löwis11437992002-04-12 09:54:03 +000022775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022776/* confdefs.h. */
22777_ACEOF
22778cat confdefs.h >>conftest.$ac_ext
22779cat >>conftest.$ac_ext <<_ACEOF
22780/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022781
22782int main()
22783{
22784 int val1 = nice(1);
22785 if (val1 != -1 && val1 == nice(2))
22786 exit(0);
22787 exit(1);
22788}
22789
Martin v. Löwis11437992002-04-12 09:54:03 +000022790_ACEOF
22791rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022792if { (ac_try="$ac_link"
22793case "(($ac_try" in
22794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22795 *) ac_try_echo=$ac_try;;
22796esac
22797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22798 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022799 ac_status=$?
22800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022802 { (case "(($ac_try" in
22803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22804 *) ac_try_echo=$ac_try;;
22805esac
22806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22807 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022808 ac_status=$?
22809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22810 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022811 ac_cv_broken_nice=yes
22812else
Martin v. Löwis11437992002-04-12 09:54:03 +000022813 echo "$as_me: program exited with status $ac_status" >&5
22814echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022815sed 's/^/| /' conftest.$ac_ext >&5
22816
Martin v. Löwis11437992002-04-12 09:54:03 +000022817( exit $ac_status )
22818ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022819fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022820rm -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 +000022821fi
22822
Martin v. Löwiseba40652007-08-30 20:10:57 +000022823
22824fi
22825
22826{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
22827echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022828if test "$ac_cv_broken_nice" = yes
22829then
Martin v. Löwis11437992002-04-12 09:54:03 +000022830
22831cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022832#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022833_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000022834
22835fi
22836
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837{ echo "$as_me:$LINENO: checking for broken poll()" >&5
22838echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022839if test "$cross_compiling" = yes; then
22840 ac_cv_broken_poll=no
22841else
22842 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022843/* confdefs.h. */
22844_ACEOF
22845cat confdefs.h >>conftest.$ac_ext
22846cat >>conftest.$ac_ext <<_ACEOF
22847/* end confdefs.h. */
22848
22849#include <poll.h>
22850
22851int main (void)
22852 {
22853 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
22854
22855 close (42);
22856
22857 int poll_test = poll (&poll_struct, 1, 0);
22858
22859 if (poll_test < 0)
22860 {
22861 exit(0);
22862 }
22863 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
22864 {
22865 exit(0);
22866 }
22867 else
22868 {
22869 exit(1);
22870 }
22871 }
22872
22873_ACEOF
22874rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022875if { (ac_try="$ac_link"
22876case "(($ac_try" in
22877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22878 *) ac_try_echo=$ac_try;;
22879esac
22880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22881 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022882 ac_status=$?
22883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22884 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022885 { (case "(($ac_try" in
22886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22887 *) ac_try_echo=$ac_try;;
22888esac
22889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22890 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022891 ac_status=$?
22892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22893 (exit $ac_status); }; }; then
22894 ac_cv_broken_poll=yes
22895else
22896 echo "$as_me: program exited with status $ac_status" >&5
22897echo "$as_me: failed program was:" >&5
22898sed 's/^/| /' conftest.$ac_ext >&5
22899
22900( exit $ac_status )
22901ac_cv_broken_poll=no
22902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022903rm -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 +000022904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022905
22906
22907{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
22908echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022909if test "$ac_cv_broken_poll" = yes
22910then
22911
22912cat >>confdefs.h <<\_ACEOF
22913#define HAVE_BROKEN_POLL 1
22914_ACEOF
22915
22916fi
22917
Brett Cannon43802422005-02-10 20:48:03 +000022918# 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 +000022919# (which is not required by ISO C or UNIX spec) and/or if we support
22920# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000022921{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
22922echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000022923if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
22924 echo $ECHO_N "(cached) $ECHO_C" >&6
22925else
22926 cat >conftest.$ac_ext <<_ACEOF
22927/* confdefs.h. */
22928_ACEOF
22929cat confdefs.h >>conftest.$ac_ext
22930cat >>conftest.$ac_ext <<_ACEOF
22931/* end confdefs.h. */
22932#include <sys/types.h>
22933#include <$ac_cv_struct_tm>
22934
22935
22936int
22937main ()
22938{
22939static struct tm ac_aggr;
22940if (ac_aggr.tm_zone)
22941return 0;
22942 ;
22943 return 0;
22944}
22945_ACEOF
22946rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022947if { (ac_try="$ac_compile"
22948case "(($ac_try" in
22949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22950 *) ac_try_echo=$ac_try;;
22951esac
22952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22953 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022954 ac_status=$?
22955 grep -v '^ *+' conftest.er1 >conftest.err
22956 rm -f conftest.er1
22957 cat conftest.err >&5
22958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022959 (exit $ac_status); } && {
22960 test -z "$ac_c_werror_flag" ||
22961 test ! -s conftest.err
22962 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000022963 ac_cv_member_struct_tm_tm_zone=yes
22964else
22965 echo "$as_me: failed program was:" >&5
22966sed 's/^/| /' conftest.$ac_ext >&5
22967
Martin v. Löwiseba40652007-08-30 20:10:57 +000022968 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000022969/* confdefs.h. */
22970_ACEOF
22971cat confdefs.h >>conftest.$ac_ext
22972cat >>conftest.$ac_ext <<_ACEOF
22973/* end confdefs.h. */
22974#include <sys/types.h>
22975#include <$ac_cv_struct_tm>
22976
22977
22978int
22979main ()
22980{
22981static struct tm ac_aggr;
22982if (sizeof ac_aggr.tm_zone)
22983return 0;
22984 ;
22985 return 0;
22986}
22987_ACEOF
22988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022989if { (ac_try="$ac_compile"
22990case "(($ac_try" in
22991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22992 *) ac_try_echo=$ac_try;;
22993esac
22994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22995 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022996 ac_status=$?
22997 grep -v '^ *+' conftest.er1 >conftest.err
22998 rm -f conftest.er1
22999 cat conftest.err >&5
23000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023001 (exit $ac_status); } && {
23002 test -z "$ac_c_werror_flag" ||
23003 test ! -s conftest.err
23004 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023005 ac_cv_member_struct_tm_tm_zone=yes
23006else
23007 echo "$as_me: failed program was:" >&5
23008sed 's/^/| /' conftest.$ac_ext >&5
23009
Martin v. Löwiseba40652007-08-30 20:10:57 +000023010 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000023011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023012
23013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023015
23016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000023017fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023018{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
23019echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023020if test $ac_cv_member_struct_tm_tm_zone = yes; then
23021
23022cat >>confdefs.h <<_ACEOF
23023#define HAVE_STRUCT_TM_TM_ZONE 1
23024_ACEOF
23025
23026
23027fi
23028
23029if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
23030
23031cat >>confdefs.h <<\_ACEOF
23032#define HAVE_TM_ZONE 1
23033_ACEOF
23034
23035else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023036 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
23037echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
23038if test "${ac_cv_have_decl_tzname+set}" = set; then
23039 echo $ECHO_N "(cached) $ECHO_C" >&6
23040else
23041 cat >conftest.$ac_ext <<_ACEOF
23042/* confdefs.h. */
23043_ACEOF
23044cat confdefs.h >>conftest.$ac_ext
23045cat >>conftest.$ac_ext <<_ACEOF
23046/* end confdefs.h. */
23047#include <time.h>
23048
23049int
23050main ()
23051{
23052#ifndef tzname
23053 (void) tzname;
23054#endif
23055
23056 ;
23057 return 0;
23058}
23059_ACEOF
23060rm -f conftest.$ac_objext
23061if { (ac_try="$ac_compile"
23062case "(($ac_try" in
23063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23064 *) ac_try_echo=$ac_try;;
23065esac
23066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23067 (eval "$ac_compile") 2>conftest.er1
23068 ac_status=$?
23069 grep -v '^ *+' conftest.er1 >conftest.err
23070 rm -f conftest.er1
23071 cat conftest.err >&5
23072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23073 (exit $ac_status); } && {
23074 test -z "$ac_c_werror_flag" ||
23075 test ! -s conftest.err
23076 } && test -s conftest.$ac_objext; then
23077 ac_cv_have_decl_tzname=yes
23078else
23079 echo "$as_me: failed program was:" >&5
23080sed 's/^/| /' conftest.$ac_ext >&5
23081
23082 ac_cv_have_decl_tzname=no
23083fi
23084
23085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23086fi
23087{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
23088echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
23089if test $ac_cv_have_decl_tzname = yes; then
23090
23091cat >>confdefs.h <<_ACEOF
23092#define HAVE_DECL_TZNAME 1
23093_ACEOF
23094
23095
23096else
23097 cat >>confdefs.h <<_ACEOF
23098#define HAVE_DECL_TZNAME 0
23099_ACEOF
23100
23101
23102fi
23103
23104
23105 { echo "$as_me:$LINENO: checking for tzname" >&5
23106echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023107if test "${ac_cv_var_tzname+set}" = set; then
23108 echo $ECHO_N "(cached) $ECHO_C" >&6
23109else
23110 cat >conftest.$ac_ext <<_ACEOF
23111/* confdefs.h. */
23112_ACEOF
23113cat confdefs.h >>conftest.$ac_ext
23114cat >>conftest.$ac_ext <<_ACEOF
23115/* end confdefs.h. */
23116#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117#if !HAVE_DECL_TZNAME
23118extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000023119#endif
23120
23121int
23122main ()
23123{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023124return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000023125 ;
23126 return 0;
23127}
23128_ACEOF
23129rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023130if { (ac_try="$ac_link"
23131case "(($ac_try" in
23132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23133 *) ac_try_echo=$ac_try;;
23134esac
23135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23136 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023137 ac_status=$?
23138 grep -v '^ *+' conftest.er1 >conftest.err
23139 rm -f conftest.er1
23140 cat conftest.err >&5
23141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023142 (exit $ac_status); } && {
23143 test -z "$ac_c_werror_flag" ||
23144 test ! -s conftest.err
23145 } && test -s conftest$ac_exeext &&
23146 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000023147 ac_cv_var_tzname=yes
23148else
23149 echo "$as_me: failed program was:" >&5
23150sed 's/^/| /' conftest.$ac_ext >&5
23151
Martin v. Löwiseba40652007-08-30 20:10:57 +000023152 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000023153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023154
23155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000023156 conftest$ac_exeext conftest.$ac_ext
23157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023158{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
23159echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023160 if test $ac_cv_var_tzname = yes; then
23161
23162cat >>confdefs.h <<\_ACEOF
23163#define HAVE_TZNAME 1
23164_ACEOF
23165
23166 fi
23167fi
23168
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023169
Martin v. Löwis1d459062005-03-14 21:23:33 +000023170# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000023171{ echo "$as_me:$LINENO: checking for working tzset()" >&5
23172echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023173if test "${ac_cv_working_tzset+set}" = set; then
23174 echo $ECHO_N "(cached) $ECHO_C" >&6
23175else
23176
23177if test "$cross_compiling" = yes; then
23178 ac_cv_working_tzset=no
23179else
23180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023181/* confdefs.h. */
23182_ACEOF
23183cat confdefs.h >>conftest.$ac_ext
23184cat >>conftest.$ac_ext <<_ACEOF
23185/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023186
23187#include <stdlib.h>
23188#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000023189#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000023190
23191#if HAVE_TZNAME
23192extern char *tzname[];
23193#endif
23194
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023195int main()
23196{
Brett Cannon18367812003-09-19 00:59:16 +000023197 /* Note that we need to ensure that not only does tzset(3)
23198 do 'something' with localtime, but it works as documented
23199 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000023200 This includes making sure that tzname is set properly if
23201 tm->tm_zone does not exist since it is the alternative way
23202 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000023203
23204 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000023205 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000023206 */
23207
Martin v. Löwis1d459062005-03-14 21:23:33 +000023208 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000023209 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
23210
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023211 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023212 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023213 if (localtime(&groundhogday)->tm_hour != 0)
23214 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023215#if HAVE_TZNAME
23216 /* For UTC, tzname[1] is sometimes "", sometimes " " */
23217 if (strcmp(tzname[0], "UTC") ||
23218 (tzname[1][0] != 0 && tzname[1][0] != ' '))
23219 exit(1);
23220#endif
Brett Cannon18367812003-09-19 00:59:16 +000023221
Neal Norwitz7f2588c2003-04-11 15:35:53 +000023222 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023223 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000023224 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023225 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023226#if HAVE_TZNAME
23227 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
23228 exit(1);
23229#endif
Brett Cannon18367812003-09-19 00:59:16 +000023230
23231 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
23232 tzset();
23233 if (localtime(&groundhogday)->tm_hour != 11)
23234 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023235#if HAVE_TZNAME
23236 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
23237 exit(1);
23238#endif
23239
23240#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000023241 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
23242 exit(1);
23243 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
23244 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000023245#endif
Brett Cannon18367812003-09-19 00:59:16 +000023246
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023247 exit(0);
23248}
23249
23250_ACEOF
23251rm -f 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>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023259 ac_status=$?
23260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23261 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023262 { (case "(($ac_try" in
23263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23264 *) ac_try_echo=$ac_try;;
23265esac
23266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23267 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023268 ac_status=$?
23269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23270 (exit $ac_status); }; }; then
23271 ac_cv_working_tzset=yes
23272else
23273 echo "$as_me: program exited with status $ac_status" >&5
23274echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023275sed 's/^/| /' conftest.$ac_ext >&5
23276
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023277( exit $ac_status )
23278ac_cv_working_tzset=no
23279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023280rm -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 +000023281fi
23282
Martin v. Löwiseba40652007-08-30 20:10:57 +000023283
23284fi
23285
23286{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
23287echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000023288if test "$ac_cv_working_tzset" = yes
23289then
23290
23291cat >>confdefs.h <<\_ACEOF
23292#define HAVE_WORKING_TZSET 1
23293_ACEOF
23294
23295fi
23296
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023297# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023298{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
23299echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023300if test "${ac_cv_stat_tv_nsec+set}" = set; then
23301 echo $ECHO_N "(cached) $ECHO_C" >&6
23302else
23303 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023304/* confdefs.h. */
23305_ACEOF
23306cat confdefs.h >>conftest.$ac_ext
23307cat >>conftest.$ac_ext <<_ACEOF
23308/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023309#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023310int
23311main ()
23312{
23313
23314struct stat st;
23315st.st_mtim.tv_nsec = 1;
23316
23317 ;
23318 return 0;
23319}
23320_ACEOF
23321rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023322if { (ac_try="$ac_compile"
23323case "(($ac_try" in
23324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23325 *) ac_try_echo=$ac_try;;
23326esac
23327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023330 grep -v '^ *+' conftest.er1 >conftest.err
23331 rm -f conftest.er1
23332 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023334 (exit $ac_status); } && {
23335 test -z "$ac_c_werror_flag" ||
23336 test ! -s conftest.err
23337 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000023338 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023339else
23340 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023341sed 's/^/| /' conftest.$ac_ext >&5
23342
Martin v. Löwiseba40652007-08-30 20:10:57 +000023343 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023344fi
23345
Martin v. Löwiseba40652007-08-30 20:10:57 +000023346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23347fi
23348
23349{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
23350echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000023351if test "$ac_cv_stat_tv_nsec" = yes
23352then
23353
23354cat >>confdefs.h <<\_ACEOF
23355#define HAVE_STAT_TV_NSEC 1
23356_ACEOF
23357
23358fi
23359
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023360# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000023361{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
23362echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023363if test "${ac_cv_stat_tv_nsec2+set}" = set; then
23364 echo $ECHO_N "(cached) $ECHO_C" >&6
23365else
23366 cat >conftest.$ac_ext <<_ACEOF
23367/* confdefs.h. */
23368_ACEOF
23369cat confdefs.h >>conftest.$ac_ext
23370cat >>conftest.$ac_ext <<_ACEOF
23371/* end confdefs.h. */
23372#include <sys/stat.h>
23373int
23374main ()
23375{
23376
23377struct stat st;
23378st.st_mtimespec.tv_nsec = 1;
23379
23380 ;
23381 return 0;
23382}
23383_ACEOF
23384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023385if { (ac_try="$ac_compile"
23386case "(($ac_try" in
23387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23388 *) ac_try_echo=$ac_try;;
23389esac
23390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023392 ac_status=$?
23393 grep -v '^ *+' conftest.er1 >conftest.err
23394 rm -f conftest.er1
23395 cat conftest.err >&5
23396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023397 (exit $ac_status); } && {
23398 test -z "$ac_c_werror_flag" ||
23399 test ! -s conftest.err
23400 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023401 ac_cv_stat_tv_nsec2=yes
23402else
23403 echo "$as_me: failed program was:" >&5
23404sed 's/^/| /' conftest.$ac_ext >&5
23405
Martin v. Löwiseba40652007-08-30 20:10:57 +000023406 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023407fi
23408
Martin v. Löwiseba40652007-08-30 20:10:57 +000023409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23410fi
23411
23412{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
23413echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000023414if test "$ac_cv_stat_tv_nsec2" = yes
23415then
23416
23417cat >>confdefs.h <<\_ACEOF
23418#define HAVE_STAT_TV_NSEC2 1
23419_ACEOF
23420
23421fi
23422
Jack Jansen666b1e72001-10-31 12:11:48 +000023423# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
23425echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023426if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
23427 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023428else
Martin v. Löwis11437992002-04-12 09:54:03 +000023429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023430/* confdefs.h. */
23431_ACEOF
23432cat confdefs.h >>conftest.$ac_ext
23433cat >>conftest.$ac_ext <<_ACEOF
23434/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023435#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023436int
23437main ()
23438{
Jack Jansen666b1e72001-10-31 12:11:48 +000023439
23440 int rtn;
23441 rtn = mvwdelch(0,0,0);
23442
Martin v. Löwis11437992002-04-12 09:54:03 +000023443 ;
23444 return 0;
23445}
23446_ACEOF
23447rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023448if { (ac_try="$ac_compile"
23449case "(($ac_try" in
23450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23451 *) ac_try_echo=$ac_try;;
23452esac
23453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023456 grep -v '^ *+' conftest.er1 >conftest.err
23457 rm -f conftest.er1
23458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023460 (exit $ac_status); } && {
23461 test -z "$ac_c_werror_flag" ||
23462 test ! -s conftest.err
23463 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023464 ac_cv_mvwdelch_is_expression=yes
23465else
Martin v. Löwis11437992002-04-12 09:54:03 +000023466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023467sed 's/^/| /' conftest.$ac_ext >&5
23468
Martin v. Löwiseba40652007-08-30 20:10:57 +000023469 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023470fi
23471
Martin v. Löwiseba40652007-08-30 20:10:57 +000023472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23473fi
23474
23475{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
23476echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000023477
23478if test "$ac_cv_mvwdelch_is_expression" = yes
23479then
Martin v. Löwis11437992002-04-12 09:54:03 +000023480
23481cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023482#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023483_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023484
23485fi
23486
Martin v. Löwiseba40652007-08-30 20:10:57 +000023487{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
23488echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023489if test "${ac_cv_window_has_flags+set}" = set; then
23490 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000023491else
Martin v. Löwis11437992002-04-12 09:54:03 +000023492 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023493/* confdefs.h. */
23494_ACEOF
23495cat confdefs.h >>conftest.$ac_ext
23496cat >>conftest.$ac_ext <<_ACEOF
23497/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000023498#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023499int
23500main ()
23501{
Jack Jansen666b1e72001-10-31 12:11:48 +000023502
23503 WINDOW *w;
23504 w->_flags = 0;
23505
Martin v. Löwis11437992002-04-12 09:54:03 +000023506 ;
23507 return 0;
23508}
23509_ACEOF
23510rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023511if { (ac_try="$ac_compile"
23512case "(($ac_try" in
23513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23514 *) ac_try_echo=$ac_try;;
23515esac
23516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23517 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023518 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023519 grep -v '^ *+' conftest.er1 >conftest.err
23520 rm -f conftest.er1
23521 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023523 (exit $ac_status); } && {
23524 test -z "$ac_c_werror_flag" ||
23525 test ! -s conftest.err
23526 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000023527 ac_cv_window_has_flags=yes
23528else
Martin v. Löwis11437992002-04-12 09:54:03 +000023529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023530sed 's/^/| /' conftest.$ac_ext >&5
23531
Martin v. Löwiseba40652007-08-30 20:10:57 +000023532 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000023533fi
23534
Martin v. Löwiseba40652007-08-30 20:10:57 +000023535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23536fi
23537
23538{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
23539echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023540
Jack Jansen666b1e72001-10-31 12:11:48 +000023541
23542if test "$ac_cv_window_has_flags" = yes
23543then
Martin v. Löwis11437992002-04-12 09:54:03 +000023544
23545cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023546#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023547_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000023548
23549fi
23550
Martin v. Löwiseba40652007-08-30 20:10:57 +000023551{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
23552echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023553cat >conftest.$ac_ext <<_ACEOF
23554/* confdefs.h. */
23555_ACEOF
23556cat confdefs.h >>conftest.$ac_ext
23557cat >>conftest.$ac_ext <<_ACEOF
23558/* end confdefs.h. */
23559#include <curses.h>
23560int
23561main ()
23562{
23563void *x=is_term_resized
23564 ;
23565 return 0;
23566}
23567_ACEOF
23568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023569if { (ac_try="$ac_compile"
23570case "(($ac_try" in
23571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23572 *) ac_try_echo=$ac_try;;
23573esac
23574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23575 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023576 ac_status=$?
23577 grep -v '^ *+' conftest.er1 >conftest.err
23578 rm -f conftest.er1
23579 cat conftest.err >&5
23580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023581 (exit $ac_status); } && {
23582 test -z "$ac_c_werror_flag" ||
23583 test ! -s conftest.err
23584 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023585
23586cat >>confdefs.h <<\_ACEOF
23587#define HAVE_CURSES_IS_TERM_RESIZED 1
23588_ACEOF
23589
Martin v. Löwiseba40652007-08-30 20:10:57 +000023590 { echo "$as_me:$LINENO: result: yes" >&5
23591echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023592else
23593 echo "$as_me: failed program was:" >&5
23594sed 's/^/| /' conftest.$ac_ext >&5
23595
Martin v. Löwiseba40652007-08-30 20:10:57 +000023596 { echo "$as_me:$LINENO: result: no" >&5
23597echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023598
23599fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023600
Martin v. Löwiseba40652007-08-30 20:10:57 +000023601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23602
23603{ echo "$as_me:$LINENO: checking for resize_term" >&5
23604echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023605cat >conftest.$ac_ext <<_ACEOF
23606/* confdefs.h. */
23607_ACEOF
23608cat confdefs.h >>conftest.$ac_ext
23609cat >>conftest.$ac_ext <<_ACEOF
23610/* end confdefs.h. */
23611#include <curses.h>
23612int
23613main ()
23614{
23615void *x=resize_term
23616 ;
23617 return 0;
23618}
23619_ACEOF
23620rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023621if { (ac_try="$ac_compile"
23622case "(($ac_try" in
23623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23624 *) ac_try_echo=$ac_try;;
23625esac
23626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23627 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023628 ac_status=$?
23629 grep -v '^ *+' conftest.er1 >conftest.err
23630 rm -f conftest.er1
23631 cat conftest.err >&5
23632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023633 (exit $ac_status); } && {
23634 test -z "$ac_c_werror_flag" ||
23635 test ! -s conftest.err
23636 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023637
23638cat >>confdefs.h <<\_ACEOF
23639#define HAVE_CURSES_RESIZE_TERM 1
23640_ACEOF
23641
Martin v. Löwiseba40652007-08-30 20:10:57 +000023642 { echo "$as_me:$LINENO: result: yes" >&5
23643echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023644else
23645 echo "$as_me: failed program was:" >&5
23646sed 's/^/| /' conftest.$ac_ext >&5
23647
Martin v. Löwiseba40652007-08-30 20:10:57 +000023648 { echo "$as_me:$LINENO: result: no" >&5
23649echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023650
23651fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023652
Martin v. Löwiseba40652007-08-30 20:10:57 +000023653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23654
23655{ echo "$as_me:$LINENO: checking for resizeterm" >&5
23656echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023657cat >conftest.$ac_ext <<_ACEOF
23658/* confdefs.h. */
23659_ACEOF
23660cat confdefs.h >>conftest.$ac_ext
23661cat >>conftest.$ac_ext <<_ACEOF
23662/* end confdefs.h. */
23663#include <curses.h>
23664int
23665main ()
23666{
23667void *x=resizeterm
23668 ;
23669 return 0;
23670}
23671_ACEOF
23672rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673if { (ac_try="$ac_compile"
23674case "(($ac_try" in
23675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23676 *) ac_try_echo=$ac_try;;
23677esac
23678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23679 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000023680 ac_status=$?
23681 grep -v '^ *+' conftest.er1 >conftest.err
23682 rm -f conftest.er1
23683 cat conftest.err >&5
23684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023685 (exit $ac_status); } && {
23686 test -z "$ac_c_werror_flag" ||
23687 test ! -s conftest.err
23688 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000023689
23690cat >>confdefs.h <<\_ACEOF
23691#define HAVE_CURSES_RESIZETERM 1
23692_ACEOF
23693
Martin v. Löwiseba40652007-08-30 20:10:57 +000023694 { echo "$as_me:$LINENO: result: yes" >&5
23695echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023696else
23697 echo "$as_me: failed program was:" >&5
23698sed 's/^/| /' conftest.$ac_ext >&5
23699
Martin v. Löwiseba40652007-08-30 20:10:57 +000023700 { echo "$as_me:$LINENO: result: no" >&5
23701echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000023702
23703fi
Walter Dörwald4994d952006-06-19 08:07:50 +000023704
Martin v. Löwiseba40652007-08-30 20:10:57 +000023705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23706
23707{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
23708echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023709
23710if test -r /dev/ptmx
23711then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023712 { echo "$as_me:$LINENO: result: yes" >&5
23713echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023714
23715cat >>confdefs.h <<\_ACEOF
23716#define HAVE_DEV_PTMX 1
23717_ACEOF
23718
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023719else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023720 { echo "$as_me:$LINENO: result: no" >&5
23721echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000023722fi
23723
Martin v. Löwiseba40652007-08-30 20:10:57 +000023724{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
23725echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023726
23727if test -r /dev/ptc
23728then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023729 { echo "$as_me:$LINENO: result: yes" >&5
23730echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023731
23732cat >>confdefs.h <<\_ACEOF
23733#define HAVE_DEV_PTC 1
23734_ACEOF
23735
Martin v. Löwisfefbc202006-10-17 18:59:23 +000023736else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023737 { echo "$as_me:$LINENO: result: no" >&5
23738echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000023739fi
23740
Martin v. Löwiseba40652007-08-30 20:10:57 +000023741{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
23742echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023743if test "$cross_compiling" = yes; then
23744 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
23745See \`config.log' for more details." >&5
23746echo "$as_me: error: cannot run test program while cross compiling
23747See \`config.log' for more details." >&2;}
23748 { (exit 1); exit 1; }; }
23749else
23750 cat >conftest.$ac_ext <<_ACEOF
23751/* confdefs.h. */
23752_ACEOF
23753cat confdefs.h >>conftest.$ac_ext
23754cat >>conftest.$ac_ext <<_ACEOF
23755/* end confdefs.h. */
23756#include <stdio.h>
23757#include <stddef.h>
23758#include <string.h>
23759
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023760#ifdef HAVE_SYS_TYPES_H
23761#include <sys/types.h>
23762#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023763
23764#ifdef HAVE_SSIZE_T
23765typedef ssize_t Py_ssize_t;
23766#elif SIZEOF_VOID_P == SIZEOF_LONG
23767typedef long Py_ssize_t;
23768#else
23769typedef int Py_ssize_t;
23770#endif
Brett Cannon09d12362006-05-11 05:11:33 +000023771
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000023772int main()
23773{
23774 char buffer[256];
23775
Brett Cannon09d12362006-05-11 05:11:33 +000023776 if(sprintf(buffer, "%zd", (size_t)123) < 0)
23777 return 1;
23778
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000023779 if (strcmp(buffer, "123"))
23780 return 1;
23781
23782 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
23783 return 1;
23784
23785 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000023786 return 1;
23787
23788 return 0;
23789}
23790_ACEOF
23791rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023792if { (ac_try="$ac_link"
23793case "(($ac_try" in
23794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23795 *) ac_try_echo=$ac_try;;
23796esac
23797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23798 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023799 ac_status=$?
23800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023802 { (case "(($ac_try" in
23803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23804 *) ac_try_echo=$ac_try;;
23805esac
23806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23807 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000023808 ac_status=$?
23809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23810 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023811 { echo "$as_me:$LINENO: result: yes" >&5
23812echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023813
23814cat >>confdefs.h <<\_ACEOF
23815#define PY_FORMAT_SIZE_T "z"
23816_ACEOF
23817
23818else
23819 echo "$as_me: program exited with status $ac_status" >&5
23820echo "$as_me: failed program was:" >&5
23821sed 's/^/| /' conftest.$ac_ext >&5
23822
23823( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023824{ echo "$as_me:$LINENO: result: no" >&5
23825echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000023826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023827rm -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 +000023828fi
23829
Martin v. Löwiseba40652007-08-30 20:10:57 +000023830
23831
23832{ echo "$as_me:$LINENO: checking for socklen_t" >&5
23833echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023834if test "${ac_cv_type_socklen_t+set}" = set; then
23835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000023836else
Martin v. Löwis11437992002-04-12 09:54:03 +000023837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023838/* confdefs.h. */
23839_ACEOF
23840cat confdefs.h >>conftest.$ac_ext
23841cat >>conftest.$ac_ext <<_ACEOF
23842/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000023843
23844#ifdef HAVE_SYS_TYPES_H
23845#include <sys/types.h>
23846#endif
23847#ifdef HAVE_SYS_SOCKET_H
23848#include <sys/socket.h>
23849#endif
23850
23851
Martin v. Löwiseba40652007-08-30 20:10:57 +000023852typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023853int
23854main ()
23855{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023856if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023857 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023858if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000023859 return 0;
23860 ;
23861 return 0;
23862}
23863_ACEOF
23864rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023865if { (ac_try="$ac_compile"
23866case "(($ac_try" in
23867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23868 *) ac_try_echo=$ac_try;;
23869esac
23870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023873 grep -v '^ *+' conftest.er1 >conftest.err
23874 rm -f conftest.er1
23875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023877 (exit $ac_status); } && {
23878 test -z "$ac_c_werror_flag" ||
23879 test ! -s conftest.err
23880 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000023881 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000023882else
Martin v. Löwis11437992002-04-12 09:54:03 +000023883 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023884sed 's/^/| /' conftest.$ac_ext >&5
23885
Martin v. Löwiseba40652007-08-30 20:10:57 +000023886 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000023887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023888
23889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023890fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023891{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23892echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023893if test $ac_cv_type_socklen_t = yes; then
23894 :
23895else
Guido van Rossum95713eb2000-05-18 20:53:31 +000023896
Martin v. Löwis01c04012002-11-11 14:58:44 +000023897cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023898#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000023899_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000023900
23901fi
23902
Michael W. Hudson54241132001-12-07 15:38:26 +000023903
Michael W. Hudson54241132001-12-07 15:38:26 +000023904
23905
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000023906for h in `(cd $srcdir;echo Python/thread_*.h)`
23907do
23908 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
23909done
23910
Michael W. Hudson54241132001-12-07 15:38:26 +000023911
Neal Norwitzd24499d2005-12-18 21:36:39 +000023912SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023913{ echo "$as_me:$LINENO: checking for build directories" >&5
23914echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023915for dir in $SRCDIRS; do
23916 if test ! -d $dir; then
23917 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000023918 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000023919done
Martin v. Löwiseba40652007-08-30 20:10:57 +000023920{ echo "$as_me:$LINENO: result: done" >&5
23921echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000023922
Guido van Rossum627b2d71993-12-24 10:39:16 +000023923# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000023924ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000023925
Martin v. Löwis11437992002-04-12 09:54:03 +000023926cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023927# This file is a shell script that caches the results of configure
23928# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000023929# scripts and configure runs, see configure's option --config-cache.
23930# It is not useful on other systems. If it contains results you don't
23931# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023932#
Martin v. Löwis11437992002-04-12 09:54:03 +000023933# config.status only pays attention to the cache file if you give it
23934# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023935#
Skip Montanaro6dead952003-09-25 14:50:04 +000023936# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000023937# loading this file, other *unset* `ac_cv_foo' will be assigned the
23938# following values.
23939
23940_ACEOF
23941
Guido van Rossumf78abae1997-01-21 22:02:36 +000023942# The following way of writing the cache mishandles newlines in values,
23943# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023944# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023945# Ultrix sh set writes to stderr and can't be redirected directly,
23946# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023947(
23948 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23949 eval ac_val=\$$ac_var
23950 case $ac_val in #(
23951 *${as_nl}*)
23952 case $ac_var in #(
23953 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23954echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23955 esac
23956 case $ac_var in #(
23957 _ | IFS | as_nl) ;; #(
23958 *) $as_unset $ac_var ;;
23959 esac ;;
23960 esac
23961 done
23962
Martin v. Löwis11437992002-04-12 09:54:03 +000023963 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000023964 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23965 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000023966 # `set' does not quote correctly, so add quotes (double-quote
23967 # substitution turns \\\\ into \\, and sed turns \\ into \).
23968 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023969 "s/'/'\\\\''/g;
23970 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000023971 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000023972 *)
23973 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000023974 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000023975 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023976 esac |
23977 sort
23978) |
Martin v. Löwis11437992002-04-12 09:54:03 +000023979 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000023980 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000023981 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000023982 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000023983 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23984 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000023985 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23986 :end' >>confcache
23987if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23988 if test -w "$cache_file"; then
23989 test "x$cache_file" != "x/dev/null" &&
23990 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23991echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023992 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023993 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000023994 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23995echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023996 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023997fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023998rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000023999
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024000test "x$prefix" = xNONE && prefix=$ac_default_prefix
24001# Let make expand exec_prefix.
24002test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000024003
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024004DEFS=-DHAVE_CONFIG_H
24005
Skip Montanaro6dead952003-09-25 14:50:04 +000024006ac_libobjs=
24007ac_ltlibobjs=
24008for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24009 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024010 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24011 ac_i=`echo "$ac_i" | sed "$ac_script"`
24012 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24013 # will be set to the directory where LIBOBJS objects are built.
24014 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24015 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000024016done
24017LIBOBJS=$ac_libobjs
24018
24019LTLIBOBJS=$ac_ltlibobjs
24020
24021
Martin v. Löwis11437992002-04-12 09:54:03 +000024022
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024023: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000024024ac_clean_files_save=$ac_clean_files
24025ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24026{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
24027echo "$as_me: creating $CONFIG_STATUS" >&6;}
24028cat >$CONFIG_STATUS <<_ACEOF
24029#! $SHELL
24030# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024031# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024032# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000024033# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000024034
Martin v. Löwis11437992002-04-12 09:54:03 +000024035debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000024036ac_cs_recheck=false
24037ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000024038SHELL=\${CONFIG_SHELL-$SHELL}
24039_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000024040
Martin v. Löwis11437992002-04-12 09:54:03 +000024041cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024042## --------------------- ##
24043## M4sh Initialization. ##
24044## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000024045
Martin v. Löwiseba40652007-08-30 20:10:57 +000024046# Be more Bourne compatible
24047DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024048if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24049 emulate sh
24050 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000024051 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24052 # is contrary to our usage. Disable this feature.
24053 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024054 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000024055else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024056 case `(set -o) 2>/dev/null` in
24057 *posix*) set -o posix ;;
24058esac
24059
Martin v. Löwis11437992002-04-12 09:54:03 +000024060fi
Michael W. Hudson54241132001-12-07 15:38:26 +000024061
Skip Montanaro6dead952003-09-25 14:50:04 +000024062
Martin v. Löwis11437992002-04-12 09:54:03 +000024063
24064
Martin v. Löwiseba40652007-08-30 20:10:57 +000024065# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000024066# Avoid depending upon Character Ranges.
24067as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24068as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24069as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24070as_cr_digits='0123456789'
24071as_cr_alnum=$as_cr_Letters$as_cr_digits
24072
24073# The user is always right.
24074if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000024075 echo "#! /bin/sh" >conf$$.sh
24076 echo "exit 0" >>conf$$.sh
24077 chmod +x conf$$.sh
24078 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024079 PATH_SEPARATOR=';'
24080 else
24081 PATH_SEPARATOR=:
24082 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000024083 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024084fi
24085
Martin v. Löwiseba40652007-08-30 20:10:57 +000024086# Support unset when possible.
24087if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
24088 as_unset=unset
24089else
24090 as_unset=false
24091fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024092
Martin v. Löwiseba40652007-08-30 20:10:57 +000024093
24094# IFS
24095# We need space, tab and new line, in precisely that order. Quoting is
24096# there to prevent editors from complaining about space-tab.
24097# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24098# splitting by setting IFS to empty value.)
24099as_nl='
24100'
24101IFS=" "" $as_nl"
24102
24103# Find who we are. Look in the path if we contain no directory separator.
24104case $0 in
24105 *[\\/]* ) as_myself=$0 ;;
24106 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000024107for as_dir in $PATH
24108do
24109 IFS=$as_save_IFS
24110 test -z "$as_dir" && as_dir=.
24111 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24112done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024113IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000024114
Martin v. Löwiseba40652007-08-30 20:10:57 +000024115 ;;
24116esac
24117# We did not find ourselves, most probably we were run as `sh COMMAND'
24118# in which case we are not to be found in the path.
24119if test "x$as_myself" = x; then
24120 as_myself=$0
24121fi
24122if test ! -f "$as_myself"; then
24123 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24124 { (exit 1); exit 1; }
24125fi
24126
24127# Work around bugs in pre-3.0 UWIN ksh.
24128for as_var in ENV MAIL MAILPATH
24129do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24130done
24131PS1='$ '
24132PS2='> '
24133PS4='+ '
24134
24135# NLS nuisances.
24136for as_var in \
24137 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24138 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24139 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000024140do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024141 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
24142 eval $as_var=C; export $as_var
24143 else
24144 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24145 fi
24146done
24147
24148# Required to use basename.
24149if expr a : '\(a\)' >/dev/null 2>&1 &&
24150 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24151 as_expr=expr
24152else
24153 as_expr=false
24154fi
24155
24156if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24157 as_basename=basename
24158else
24159 as_basename=false
24160fi
24161
24162
24163# Name of the executable.
24164as_me=`$as_basename -- "$0" ||
24165$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24166 X"$0" : 'X\(//\)$' \| \
24167 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24168echo X/"$0" |
24169 sed '/^.*\/\([^/][^/]*\)\/*$/{
24170 s//\1/
24171 q
24172 }
24173 /^X\/\(\/\/\)$/{
24174 s//\1/
24175 q
24176 }
24177 /^X\/\(\/\).*/{
24178 s//\1/
24179 q
24180 }
24181 s/.*/./; q'`
24182
24183# CDPATH.
24184$as_unset CDPATH
24185
24186
24187
Martin v. Löwis11437992002-04-12 09:54:03 +000024188 as_lineno_1=$LINENO
24189 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000024190 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024191 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000024192
Martin v. Löwis11437992002-04-12 09:54:03 +000024193 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24194 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000024195 # line-number line after each line using $LINENO; the second 'sed'
24196 # does the real work. The second script uses 'N' to pair each
24197 # line-number line with the line containing $LINENO, and appends
24198 # trailing '-' during substitution so that $LINENO is not a special
24199 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000024200 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024201 # scripts with optimization help from Paolo Bonzini. Blame Lee
24202 # E. McMahon (1931-1989) for sed's syntax. :-)
24203 sed -n '
24204 p
24205 /[$]LINENO/=
24206 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000024207 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024208 s/[$]LINENO.*/&-/
24209 t lineno
24210 b
24211 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000024212 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000024213 :loop
24214 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000024215 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000024216 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000024217 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000024218 chmod +x "$as_me.lineno" ||
24219 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024220 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024221
Martin v. Löwis11437992002-04-12 09:54:03 +000024222 # Don't try to exec as it changes $[0], causing all sort of problems
24223 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000024224 # original and so on. Autoconf is especially sensitive to this).
24225 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000024226 # Exit status is that of the last command.
24227 exit
24228}
24229
24230
Martin v. Löwiseba40652007-08-30 20:10:57 +000024231if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24232 as_dirname=dirname
24233else
24234 as_dirname=false
24235fi
24236
24237ECHO_C= ECHO_N= ECHO_T=
24238case `echo -n x` in
24239-n*)
24240 case `echo 'x\c'` in
24241 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24242 *) ECHO_C='\c';;
24243 esac;;
24244*)
24245 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000024246esac
24247
Martin v. Löwiseba40652007-08-30 20:10:57 +000024248if expr a : '\(a\)' >/dev/null 2>&1 &&
24249 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024250 as_expr=expr
24251else
24252 as_expr=false
24253fi
24254
24255rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000024256if test -d conf$$.dir; then
24257 rm -f conf$$.dir/conf$$.file
24258else
24259 rm -f conf$$.dir
24260 mkdir conf$$.dir
24261fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024262echo >conf$$.file
24263if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024264 as_ln_s='ln -s'
24265 # ... but there are two gotchas:
24266 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24267 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24268 # In both cases, we have to default to `cp -p'.
24269 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024270 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000024271elif ln conf$$.file conf$$ 2>/dev/null; then
24272 as_ln_s=ln
24273else
24274 as_ln_s='cp -p'
24275fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024276rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24277rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000024278
Skip Montanaro6dead952003-09-25 14:50:04 +000024279if mkdir -p . 2>/dev/null; then
24280 as_mkdir_p=:
24281else
Skip Montanarof0d5f792004-08-15 14:08:23 +000024282 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000024283 as_mkdir_p=false
24284fi
24285
Martin v. Löwiseba40652007-08-30 20:10:57 +000024286if test -x / >/dev/null 2>&1; then
24287 as_test_x='test -x'
24288else
24289 if ls -dL / >/dev/null 2>&1; then
24290 as_ls_L_option=L
24291 else
24292 as_ls_L_option=
24293 fi
24294 as_test_x='
24295 eval sh -c '\''
24296 if test -d "$1"; then
24297 test -d "$1/.";
24298 else
24299 case $1 in
24300 -*)set "./$1";;
24301 esac;
24302 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24303 ???[sx]*):;;*)false;;esac;fi
24304 '\'' sh
24305 '
24306fi
24307as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000024308
24309# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024310as_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 +000024311
24312# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000024313as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000024314
24315
Martin v. Löwis11437992002-04-12 09:54:03 +000024316exec 6>&1
24317
Martin v. Löwiseba40652007-08-30 20:10:57 +000024318# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000024319# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000024320# values after options handling.
24321ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000024322This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000024323generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000024324
24325 CONFIG_FILES = $CONFIG_FILES
24326 CONFIG_HEADERS = $CONFIG_HEADERS
24327 CONFIG_LINKS = $CONFIG_LINKS
24328 CONFIG_COMMANDS = $CONFIG_COMMANDS
24329 $ $0 $@
24330
Martin v. Löwiseba40652007-08-30 20:10:57 +000024331on `(hostname || uname -n) 2>/dev/null | sed 1q`
24332"
24333
Martin v. Löwis11437992002-04-12 09:54:03 +000024334_ACEOF
24335
Martin v. Löwiseba40652007-08-30 20:10:57 +000024336cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024337# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024338config_files="$ac_config_files"
24339config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000024340
Martin v. Löwiseba40652007-08-30 20:10:57 +000024341_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024342
24343cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024344ac_cs_usage="\
24345\`$as_me' instantiates files from templates according to the
24346current configuration.
24347
24348Usage: $0 [OPTIONS] [FILE]...
24349
24350 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000024351 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000024352 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000024353 -d, --debug don't remove temporary files
24354 --recheck update $as_me by reconfiguring in the same conditions
24355 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024356 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024357 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000024358 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000024359
24360Configuration files:
24361$config_files
24362
24363Configuration headers:
24364$config_headers
24365
24366Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000024367
Martin v. Löwiseba40652007-08-30 20:10:57 +000024368_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024369cat >>$CONFIG_STATUS <<_ACEOF
24370ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000024371python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000024372configured by $0, generated by GNU Autoconf 2.61,
24373 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000024374
Martin v. Löwiseba40652007-08-30 20:10:57 +000024375Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000024376This config.status script is free software; the Free Software Foundation
24377gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000024378
24379ac_pwd='$ac_pwd'
24380srcdir='$srcdir'
24381INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000024382_ACEOF
24383
24384cat >>$CONFIG_STATUS <<\_ACEOF
24385# If no file are specified by the user, then we need to provide default
24386# value. By we need to know if files were specified by the user.
24387ac_need_defaults=:
24388while test $# != 0
24389do
24390 case $1 in
24391 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024392 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24393 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000024394 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000024395 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024396 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000024397 ac_option=$1
24398 ac_optarg=$2
24399 ac_shift=shift
24400 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024401 esac
24402
Skip Montanaro6dead952003-09-25 14:50:04 +000024403 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000024404 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000024405 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24406 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024407 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24408 echo "$ac_cs_version"; exit ;;
24409 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000024410 debug=: ;;
24411 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000024412 $ac_shift
24413 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024414 ac_need_defaults=false;;
24415 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000024416 $ac_shift
24417 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000024418 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024419 --he | --h)
24420 # Conflict between --help and --header
24421 { echo "$as_me: error: ambiguous option: $1
24422Try \`$0 --help' for more information." >&2
24423 { (exit 1); exit 1; }; };;
24424 --help | --hel | -h )
24425 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000024426 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24427 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24428 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024429
24430 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024431 -*) { echo "$as_me: error: unrecognized option: $1
24432Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024433 { (exit 1); exit 1; }; } ;;
24434
Martin v. Löwiseba40652007-08-30 20:10:57 +000024435 *) ac_config_targets="$ac_config_targets $1"
24436 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024437
24438 esac
24439 shift
24440done
24441
Skip Montanaro6dead952003-09-25 14:50:04 +000024442ac_configure_extra_args=
24443
24444if $ac_cs_silent; then
24445 exec 6>/dev/null
24446 ac_configure_extra_args="$ac_configure_extra_args --silent"
24447fi
24448
24449_ACEOF
24450cat >>$CONFIG_STATUS <<_ACEOF
24451if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024452 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24453 CONFIG_SHELL=$SHELL
24454 export CONFIG_SHELL
24455 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000024456fi
24457
Martin v. Löwis11437992002-04-12 09:54:03 +000024458_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024459cat >>$CONFIG_STATUS <<\_ACEOF
24460exec 5>>config.log
24461{
24462 echo
24463 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24464## Running $as_me. ##
24465_ASBOX
24466 echo "$ac_log"
24467} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024468
Martin v. Löwiseba40652007-08-30 20:10:57 +000024469_ACEOF
24470cat >>$CONFIG_STATUS <<_ACEOF
24471_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024472
24473cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024474
24475# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000024476for ac_config_target in $ac_config_targets
24477do
Martin v. Löwiseba40652007-08-30 20:10:57 +000024478 case $ac_config_target in
24479 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
24480 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
24481 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
24482 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
24483 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
24484 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
24485
Martin v. Löwis11437992002-04-12 09:54:03 +000024486 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
24487echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24488 { (exit 1); exit 1; }; };;
24489 esac
24490done
24491
Martin v. Löwiseba40652007-08-30 20:10:57 +000024492
Martin v. Löwis11437992002-04-12 09:54:03 +000024493# If the user did not use the arguments to specify the items to instantiate,
24494# then the envvar interface is used. Set only those that are not.
24495# We use the long form for the default assignment because of an extremely
24496# bizarre bug on SunOS 4.1.3.
24497if $ac_need_defaults; then
24498 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24499 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24500fi
24501
Skip Montanaro6dead952003-09-25 14:50:04 +000024502# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000024503# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000024504# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024505# Hook for its removal unless debugging.
24506# Note that there is a small window in which the directory will not be cleaned:
24507# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000024508$debug ||
24509{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024510 tmp=
24511 trap 'exit_status=$?
24512 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24513' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000024514 trap '{ (exit 1); exit 1; }' 1 2 13 15
24515}
Martin v. Löwis11437992002-04-12 09:54:03 +000024516# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000024517
Martin v. Löwis11437992002-04-12 09:54:03 +000024518{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024519 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000024520 test -n "$tmp" && test -d "$tmp"
24521} ||
24522{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024523 tmp=./conf$$-$RANDOM
24524 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000024525} ||
24526{
Skip Montanaro6dead952003-09-25 14:50:04 +000024527 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000024528 { (exit 1); exit 1; }
24529}
24530
Martin v. Löwis11437992002-04-12 09:54:03 +000024531#
Martin v. Löwiseba40652007-08-30 20:10:57 +000024532# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000024533#
24534
24535# No need to generate the scripts if there are no CONFIG_FILES.
24536# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000024537if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024538
24539_ACEOF
24540
Martin v. Löwiseba40652007-08-30 20:10:57 +000024541
24542
24543ac_delim='%!_!# '
24544for ac_last_try in false false false false false :; do
24545 cat >conf$$subs.sed <<_ACEOF
24546SHELL!$SHELL$ac_delim
24547PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24548PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24549PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24550PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24551PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24552PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24553exec_prefix!$exec_prefix$ac_delim
24554prefix!$prefix$ac_delim
24555program_transform_name!$program_transform_name$ac_delim
24556bindir!$bindir$ac_delim
24557sbindir!$sbindir$ac_delim
24558libexecdir!$libexecdir$ac_delim
24559datarootdir!$datarootdir$ac_delim
24560datadir!$datadir$ac_delim
24561sysconfdir!$sysconfdir$ac_delim
24562sharedstatedir!$sharedstatedir$ac_delim
24563localstatedir!$localstatedir$ac_delim
24564includedir!$includedir$ac_delim
24565oldincludedir!$oldincludedir$ac_delim
24566docdir!$docdir$ac_delim
24567infodir!$infodir$ac_delim
24568htmldir!$htmldir$ac_delim
24569dvidir!$dvidir$ac_delim
24570pdfdir!$pdfdir$ac_delim
24571psdir!$psdir$ac_delim
24572libdir!$libdir$ac_delim
24573localedir!$localedir$ac_delim
24574mandir!$mandir$ac_delim
24575DEFS!$DEFS$ac_delim
24576ECHO_C!$ECHO_C$ac_delim
24577ECHO_N!$ECHO_N$ac_delim
24578ECHO_T!$ECHO_T$ac_delim
24579LIBS!$LIBS$ac_delim
24580build_alias!$build_alias$ac_delim
24581host_alias!$host_alias$ac_delim
24582target_alias!$target_alias$ac_delim
24583VERSION!$VERSION$ac_delim
24584SOVERSION!$SOVERSION$ac_delim
24585CONFIG_ARGS!$CONFIG_ARGS$ac_delim
24586UNIVERSALSDK!$UNIVERSALSDK$ac_delim
24587PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
24588PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
24589PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
24590PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
24591FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
24592FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
24593FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
24594FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
24595FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
24596MACHDEP!$MACHDEP$ac_delim
24597SGI_ABI!$SGI_ABI$ac_delim
24598EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
24599EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
24600CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
24601EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
24602CC!$CC$ac_delim
24603CFLAGS!$CFLAGS$ac_delim
24604LDFLAGS!$LDFLAGS$ac_delim
24605CPPFLAGS!$CPPFLAGS$ac_delim
24606ac_ct_CC!$ac_ct_CC$ac_delim
24607EXEEXT!$EXEEXT$ac_delim
24608OBJEXT!$OBJEXT$ac_delim
24609CXX!$CXX$ac_delim
24610MAINCC!$MAINCC$ac_delim
24611CPP!$CPP$ac_delim
24612GREP!$GREP$ac_delim
24613EGREP!$EGREP$ac_delim
24614BUILDEXEEXT!$BUILDEXEEXT$ac_delim
24615LIBRARY!$LIBRARY$ac_delim
24616LDLIBRARY!$LDLIBRARY$ac_delim
24617DLLLIBRARY!$DLLLIBRARY$ac_delim
24618BLDLIBRARY!$BLDLIBRARY$ac_delim
24619LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
24620INSTSONAME!$INSTSONAME$ac_delim
24621RUNSHARED!$RUNSHARED$ac_delim
24622LINKCC!$LINKCC$ac_delim
24623RANLIB!$RANLIB$ac_delim
24624AR!$AR$ac_delim
24625SVNVERSION!$SVNVERSION$ac_delim
24626INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24627INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24628INSTALL_DATA!$INSTALL_DATA$ac_delim
24629LN!$LN$ac_delim
24630OPT!$OPT$ac_delim
24631BASECFLAGS!$BASECFLAGS$ac_delim
24632OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
24633LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
24634SO!$SO$ac_delim
24635LDSHARED!$LDSHARED$ac_delim
24636BLDSHARED!$BLDSHARED$ac_delim
24637CCSHARED!$CCSHARED$ac_delim
24638LINKFORSHARED!$LINKFORSHARED$ac_delim
24639CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
24640SHLIBS!$SHLIBS$ac_delim
24641USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
24642SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
24643_ACEOF
24644
24645 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24646 break
24647 elif $ac_last_try; then
24648 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24649echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24650 { (exit 1); exit 1; }; }
24651 else
24652 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000024653 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024654done
24655
24656ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24657if test -n "$ac_eof"; then
24658 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24659 ac_eof=`expr $ac_eof + 1`
24660fi
24661
24662cat >>$CONFIG_STATUS <<_ACEOF
24663cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24664/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24665_ACEOF
24666sed '
24667s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24668s/^/s,@/; s/!/@,|#_!!_#|/
24669:n
24670t n
24671s/'"$ac_delim"'$/,g/; t
24672s/$/\\/; p
24673N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24674' >>$CONFIG_STATUS <conf$$subs.sed
24675rm -f conf$$subs.sed
24676cat >>$CONFIG_STATUS <<_ACEOF
24677CEOF$ac_eof
24678_ACEOF
24679
24680
24681ac_delim='%!_!# '
24682for ac_last_try in false false false false false :; do
24683 cat >conf$$subs.sed <<_ACEOF
24684USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
24685LDLAST!$LDLAST$ac_delim
24686THREADOBJ!$THREADOBJ$ac_delim
24687DLINCLDIR!$DLINCLDIR$ac_delim
24688DYNLOADFILE!$DYNLOADFILE$ac_delim
24689MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
24690TRUE!$TRUE$ac_delim
24691LIBOBJS!$LIBOBJS$ac_delim
24692HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
24693HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
24694HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
24695HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
24696HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
24697LIBM!$LIBM$ac_delim
24698LIBC!$LIBC$ac_delim
24699UNICODE_OBJS!$UNICODE_OBJS$ac_delim
24700THREADHEADERS!$THREADHEADERS$ac_delim
24701SRCDIRS!$SRCDIRS$ac_delim
24702LTLIBOBJS!$LTLIBOBJS$ac_delim
24703_ACEOF
24704
24705 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 19; then
24706 break
24707 elif $ac_last_try; then
24708 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24709echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24710 { (exit 1); exit 1; }; }
24711 else
24712 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24713 fi
24714done
24715
24716ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24717if test -n "$ac_eof"; then
24718 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24719 ac_eof=`expr $ac_eof + 1`
24720fi
24721
24722cat >>$CONFIG_STATUS <<_ACEOF
24723cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24724/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24725_ACEOF
24726sed '
24727s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24728s/^/s,@/; s/!/@,|#_!!_#|/
24729:n
24730t n
24731s/'"$ac_delim"'$/,g/; t
24732s/$/\\/; p
24733N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24734' >>$CONFIG_STATUS <conf$$subs.sed
24735rm -f conf$$subs.sed
24736cat >>$CONFIG_STATUS <<_ACEOF
24737:end
24738s/|#_!!_#|//g
24739CEOF$ac_eof
24740_ACEOF
24741
24742
24743# VPATH may cause trouble with some makes, so we remove $(srcdir),
24744# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24745# trailing colons and then remove the whole line if VPATH becomes empty
24746# (actually we leave an empty line to preserve line numbers).
24747if test "x$srcdir" = x.; then
24748 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24749s/:*\$(srcdir):*/:/
24750s/:*\${srcdir}:*/:/
24751s/:*@srcdir@:*/:/
24752s/^\([^=]*=[ ]*\):*/\1/
24753s/:*$//
24754s/^[^=]*=[ ]*$//
24755}'
24756fi
24757
24758cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024759fi # test -n "$CONFIG_FILES"
24760
Martin v. Löwiseba40652007-08-30 20:10:57 +000024761
24762for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
24763do
24764 case $ac_tag in
24765 :[FHLC]) ac_mode=$ac_tag; continue;;
24766 esac
24767 case $ac_mode$ac_tag in
24768 :[FHL]*:*);;
24769 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24770echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24771 { (exit 1); exit 1; }; };;
24772 :[FH]-) ac_tag=-:-;;
24773 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24774 esac
24775 ac_save_IFS=$IFS
24776 IFS=:
24777 set x $ac_tag
24778 IFS=$ac_save_IFS
24779 shift
24780 ac_file=$1
24781 shift
24782
24783 case $ac_mode in
24784 :L) ac_source=$1;;
24785 :[FH])
24786 ac_file_inputs=
24787 for ac_f
24788 do
24789 case $ac_f in
24790 -) ac_f="$tmp/stdin";;
24791 *) # Look for the file first in the build tree, then in the source tree
24792 # (if the path is not absolute). The absolute path cannot be DOS-style,
24793 # because $ac_f cannot contain `:'.
24794 test -f "$ac_f" ||
24795 case $ac_f in
24796 [\\/$]*) false;;
24797 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24798 esac ||
24799 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24800echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24801 { (exit 1); exit 1; }; };;
24802 esac
24803 ac_file_inputs="$ac_file_inputs $ac_f"
24804 done
24805
24806 # Let's still pretend it is `configure' which instantiates (i.e., don't
24807 # use $as_me), people would be surprised to read:
24808 # /* config.h. Generated by config.status. */
24809 configure_input="Generated from "`IFS=:
24810 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24811 if test x"$ac_file" != x-; then
24812 configure_input="$ac_file. $configure_input"
24813 { echo "$as_me:$LINENO: creating $ac_file" >&5
24814echo "$as_me: creating $ac_file" >&6;}
24815 fi
24816
24817 case $ac_tag in
24818 *:-:* | *:-) cat >"$tmp/stdin";;
24819 esac
24820 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024821 esac
24822
Martin v. Löwiseba40652007-08-30 20:10:57 +000024823 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024824$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024825 X"$ac_file" : 'X\(//\)[^/]' \| \
24826 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000024828echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024829 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24830 s//\1/
24831 q
24832 }
24833 /^X\(\/\/\)[^/].*/{
24834 s//\1/
24835 q
24836 }
24837 /^X\(\/\/\)$/{
24838 s//\1/
24839 q
24840 }
24841 /^X\(\/\).*/{
24842 s//\1/
24843 q
24844 }
24845 s/.*/./; q'`
24846 { as_dir="$ac_dir"
24847 case $as_dir in #(
24848 -*) as_dir=./$as_dir;;
24849 esac
24850 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000024851 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000024852 while :; do
24853 case $as_dir in #(
24854 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24855 *) as_qdir=$as_dir;;
24856 esac
24857 as_dirs="'$as_qdir' $as_dirs"
24858 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024859$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024860 X"$as_dir" : 'X\(//\)[^/]' \| \
24861 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000024863echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024864 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24865 s//\1/
24866 q
24867 }
24868 /^X\(\/\/\)[^/].*/{
24869 s//\1/
24870 q
24871 }
24872 /^X\(\/\/\)$/{
24873 s//\1/
24874 q
24875 }
24876 /^X\(\/\).*/{
24877 s//\1/
24878 q
24879 }
24880 s/.*/./; q'`
24881 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000024882 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883 test -z "$as_dirs" || eval "mkdir $as_dirs"
24884 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24885echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000024886 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024887 ac_builddir=.
24888
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889case "$ac_dir" in
24890.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24891*)
Martin v. Löwis11437992002-04-12 09:54:03 +000024892 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000024893 # A ".." for each directory in $ac_dir_suffix.
24894 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24895 case $ac_top_builddir_sub in
24896 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24897 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24898 esac ;;
24899esac
24900ac_abs_top_builddir=$ac_pwd
24901ac_abs_builddir=$ac_pwd$ac_dir_suffix
24902# for backward compatibility:
24903ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000024904
24905case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024906 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000024907 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024908 ac_top_srcdir=$ac_top_builddir_sub
24909 ac_abs_top_srcdir=$ac_pwd ;;
24910 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000024911 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024912 ac_top_srcdir=$srcdir
24913 ac_abs_top_srcdir=$srcdir ;;
24914 *) # Relative name.
24915 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24916 ac_top_srcdir=$ac_top_build_prefix$srcdir
24917 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024918esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000024919ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000024920
Martin v. Löwis11437992002-04-12 09:54:03 +000024921
Martin v. Löwiseba40652007-08-30 20:10:57 +000024922 case $ac_mode in
24923 :F)
24924 #
24925 # CONFIG_FILE
24926 #
Martin v. Löwis11437992002-04-12 09:54:03 +000024927
24928 case $INSTALL in
24929 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024930 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024931 esac
Brett Cannon19fab762007-06-02 03:02:29 +000024932_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024933
24934cat >>$CONFIG_STATUS <<\_ACEOF
24935# If the template does not know about datarootdir, expand it.
24936# FIXME: This hack should be removed a few years after 2.60.
24937ac_datarootdir_hack=; ac_datarootdir_seen=
24938
24939case `sed -n '/datarootdir/ {
24940 p
24941 q
24942}
24943/@datadir@/p
24944/@docdir@/p
24945/@infodir@/p
24946/@localedir@/p
24947/@mandir@/p
24948' $ac_file_inputs` in
24949*datarootdir*) ac_datarootdir_seen=yes;;
24950*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24951 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24952echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24953_ACEOF
24954cat >>$CONFIG_STATUS <<_ACEOF
24955 ac_datarootdir_hack='
24956 s&@datadir@&$datadir&g
24957 s&@docdir@&$docdir&g
24958 s&@infodir@&$infodir&g
24959 s&@localedir@&$localedir&g
24960 s&@mandir@&$mandir&g
24961 s&\\\${datarootdir}&$datarootdir&g' ;;
24962esac
24963_ACEOF
24964
24965# Neutralize VPATH when `$srcdir' = `.'.
24966# Shell code in configure.ac might set extrasub.
24967# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000024968cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000024969 sed "$ac_vpsub
24970$extrasub
24971_ACEOF
24972cat >>$CONFIG_STATUS <<\_ACEOF
24973:t
24974/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975s&@configure_input@&$configure_input&;t t
24976s&@top_builddir@&$ac_top_builddir_sub&;t t
24977s&@srcdir@&$ac_srcdir&;t t
24978s&@abs_srcdir@&$ac_abs_srcdir&;t t
24979s&@top_srcdir@&$ac_top_srcdir&;t t
24980s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24981s&@builddir@&$ac_builddir&;t t
24982s&@abs_builddir@&$ac_abs_builddir&;t t
24983s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24984s&@INSTALL@&$ac_INSTALL&;t t
24985$ac_datarootdir_hack
24986" $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 +000024987
Martin v. Löwiseba40652007-08-30 20:10:57 +000024988test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24989 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24990 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24991 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24992which seems to be undefined. Please make sure it is defined." >&5
24993echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24994which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024995
Martin v. Löwiseba40652007-08-30 20:10:57 +000024996 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000024997 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000024998 -) cat "$tmp/out"; rm -f "$tmp/out";;
24999 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025000 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025001 ;;
25002 :H)
25003 #
25004 # CONFIG_HEADER
25005 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025006_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025007
Martin v. Löwiseba40652007-08-30 20:10:57 +000025008# Transform confdefs.h into a sed script `conftest.defines', that
25009# substitutes the proper values into config.h.in to produce config.h.
25010rm -f conftest.defines conftest.tail
25011# First, append a space to every undef/define line, to ease matching.
25012echo 's/$/ /' >conftest.defines
25013# Then, protect against being on the right side of a sed subst, or in
25014# an unquoted here document, in config.status. If some macros were
25015# called several times there might be several #defines for the same
25016# symbol, which is useless. But do not sort them, since the last
25017# AC_DEFINE must be honored.
25018ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25019# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25020# NAME is the cpp macro being defined, VALUE is the value it is being given.
25021# PARAMS is the parameter list in the macro definition--in most cases, it's
25022# just an empty string.
25023ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25024ac_dB='\\)[ (].*,\\1define\\2'
25025ac_dC=' '
25026ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025027
Martin v. Löwiseba40652007-08-30 20:10:57 +000025028uniq confdefs.h |
25029 sed -n '
25030 t rset
25031 :rset
25032 s/^[ ]*#[ ]*define[ ][ ]*//
25033 t ok
25034 d
25035 :ok
25036 s/[\\&,]/\\&/g
25037 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25038 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25039 ' >>conftest.defines
25040
25041# Remove the space that was appended to ease matching.
25042# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025043# example, in the case of _POSIX_SOURCE, which is predefined and required
25044# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025045# (The regexp can be short, since the line contains either #define or #undef.)
25046echo 's/ $//
25047s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000025048
Martin v. Löwiseba40652007-08-30 20:10:57 +000025049# Break up conftest.defines:
25050ac_max_sed_lines=50
25051
25052# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25053# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25054# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25055# et cetera.
25056ac_in='$ac_file_inputs'
25057ac_out='"$tmp/out1"'
25058ac_nxt='"$tmp/out2"'
25059
25060while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000025061do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025062 # Write a here document:
25063 cat >>$CONFIG_STATUS <<_ACEOF
25064 # First, check the format of the line:
25065 cat >"\$tmp/defines.sed" <<\\CEOF
25066/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25067/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25068b
25069:def
25070_ACEOF
25071 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000025072 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025073 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25074 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25075 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25076 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000025077 rm -f conftest.defines
25078 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000025079done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025080rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000025081
Martin v. Löwiseba40652007-08-30 20:10:57 +000025082echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025083cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025084 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025085 echo "/* $configure_input */" >"$tmp/config.h"
25086 cat "$ac_result" >>"$tmp/config.h"
25087 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025088 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
25089echo "$as_me: $ac_file is unchanged" >&6;}
25090 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025091 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025092 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000025093 fi
25094 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025095 echo "/* $configure_input */"
25096 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000025097 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025098 rm -f "$tmp/out12"
25099 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000025100
Martin v. Löwiseba40652007-08-30 20:10:57 +000025101
25102 esac
25103
25104done # for ac_tag
25105
Guido van Rossum627b2d71993-12-24 10:39:16 +000025106
Martin v. Löwis11437992002-04-12 09:54:03 +000025107{ (exit 0); exit 0; }
25108_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025109chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000025110ac_clean_files=$ac_clean_files_save
25111
25112
25113# configure is writing to config.log, and then calls config.status.
25114# config.status does its own redirection, appending to config.log.
25115# Unfortunately, on DOS this fails, as config.log is still kept open
25116# by configure, so config.status won't be able to write to it; its
25117# output is simply discarded. So we exec the FD to /dev/null,
25118# effectively closing config.log, so it can be properly (re)opened and
25119# appended to by config.status. When coming back to configure, we
25120# need to make the FD available again.
25121if test "$no_create" != yes; then
25122 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025123 ac_config_status_args=
25124 test "$silent" = yes &&
25125 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000025126 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000025127 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025128 exec 5>>config.log
25129 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25130 # would make configure fail if this is the last instruction.
25131 $ac_cs_success || { (exit 1); exit 1; }
25132fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000025133
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025134
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025135echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025136if test ! -f Modules/Setup
25137then
25138 cp $srcdir/Modules/Setup.dist Modules/Setup
25139fi
25140
Martin v. Löwisf7afe952006-04-14 15:16:15 +000025141echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000025142if test ! -f Modules/Setup.local
25143then
25144 echo "# Edit this file for local setup changes" >Modules/Setup.local
25145fi
25146
25147echo "creating Makefile"
25148$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
25149 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000025150 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000025151
25152case $ac_sys_system in
25153BeOS)
25154 { echo "$as_me:$LINENO: WARNING:
25155
25156 Support for BeOS is deprecated as of Python 2.6.
25157 See PEP 11 for the gory details.
25158 " >&5
25159echo "$as_me: WARNING:
25160
25161 Support for BeOS is deprecated as of Python 2.6.
25162 See PEP 11 for the gory details.
25163 " >&2;}
25164 ;;
25165*) ;;
25166esac
25167
Neil Schemenauerc761fc82001-02-19 04:50:49 +000025168mv config.c Modules