blob: f58fde44b6cb950b4c03c61f241278d6a3df7bbb [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Ronald Oussorenba0aa6b2009-09-20 20:16:38 +00002# From configure.in Revision: 74712 .
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
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +0000660ARCH_RUN_32BIT
Martin v. Löwiseba40652007-08-30 20:10:57 +0000661PYTHONFRAMEWORK
Ronald Oussoren580c7fe2008-05-02 19:45:11 +0000662PYTHONFRAMEWORKIDENTIFIER
Martin v. Löwiseba40652007-08-30 20:10:57 +0000663PYTHONFRAMEWORKDIR
664PYTHONFRAMEWORKPREFIX
665PYTHONFRAMEWORKINSTALLDIR
666FRAMEWORKINSTALLFIRST
667FRAMEWORKINSTALLLAST
668FRAMEWORKALTINSTALLFIRST
669FRAMEWORKALTINSTALLLAST
670FRAMEWORKUNIXTOOLSPREFIX
671MACHDEP
672SGI_ABI
673EXTRAPLATDIR
674EXTRAMACHDEPPATH
675CONFIGURE_MACOSX_DEPLOYMENT_TARGET
676EXPORT_MACOSX_DEPLOYMENT_TARGET
677CC
678CFLAGS
679LDFLAGS
680CPPFLAGS
681ac_ct_CC
682EXEEXT
683OBJEXT
684CXX
685MAINCC
686CPP
687GREP
688EGREP
689BUILDEXEEXT
690LIBRARY
691LDLIBRARY
692DLLLIBRARY
693BLDLIBRARY
694LDLIBRARYDIR
695INSTSONAME
696RUNSHARED
697LINKCC
698RANLIB
699AR
700SVNVERSION
701INSTALL_PROGRAM
702INSTALL_SCRIPT
703INSTALL_DATA
704LN
705OPT
706BASECFLAGS
Ronald Oussoren5640ce22008-06-05 12:58:24 +0000707UNIVERSAL_ARCH_FLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000708OTHER_LIBTOOL_OPT
709LIBTOOL_CRUFT
710SO
711LDSHARED
712BLDSHARED
713CCSHARED
714LINKFORSHARED
715CFLAGSFORSHARED
716SHLIBS
717USE_SIGNAL_MODULE
718SIGNAL_OBJS
719USE_THREAD_MODULE
720LDLAST
721THREADOBJ
722DLINCLDIR
723DYNLOADFILE
724MACHDEP_OBJS
725TRUE
726LIBOBJS
727HAVE_GETHOSTBYNAME_R_6_ARG
728HAVE_GETHOSTBYNAME_R_5_ARG
729HAVE_GETHOSTBYNAME_R_3_ARG
730HAVE_GETHOSTBYNAME_R
731HAVE_GETHOSTBYNAME
732LIBM
733LIBC
734UNICODE_OBJS
735THREADHEADERS
736SRCDIRS
737LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000738ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
745LIBS
746CPPFLAGS
747CPP'
748
Guido van Rossum627b2d71993-12-24 10:39:16 +0000749
Guido van Rossum7f43da71994-08-01 12:15:30 +0000750# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000751ac_init_help=
752ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753# The variables have the same names as the options, with
754# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000755cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000756exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758no_recursion=
759prefix=NONE
760program_prefix=NONE
761program_suffix=NONE
762program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000764site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000766verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000767x_includes=NONE
768x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000769
770# Installation directory options.
771# These are left unexpanded so users can "make install exec_prefix=/foo"
772# and all the variables that are supposed to be based on exec_prefix
773# by default will actually change.
774# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000775# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000776bindir='${exec_prefix}/bin'
777sbindir='${exec_prefix}/sbin'
778libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000779datarootdir='${prefix}/share'
780datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000781sysconfdir='${prefix}/etc'
782sharedstatedir='${prefix}/com'
783localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000784includedir='${prefix}/include'
785oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000786docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
787infodir='${datarootdir}/info'
788htmldir='${docdir}'
789dvidir='${docdir}'
790pdfdir='${docdir}'
791psdir='${docdir}'
792libdir='${exec_prefix}/lib'
793localedir='${datarootdir}/locale'
794mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000795
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000797ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800 # If the previous option needs an argument, assign it.
801 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000802 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 ac_prev=
804 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806
Martin v. Löwiseba40652007-08-30 20:10:57 +0000807 case $ac_option in
808 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
809 *) ac_optarg=yes ;;
810 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812 # Accept the important Cygnus configure options, so we can diagnose typos.
813
Martin v. Löwiseba40652007-08-30 20:10:57 +0000814 case $ac_dashdash$ac_option in
815 --)
816 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000818 -bindir | --bindir | --bindi | --bind | --bin | --bi)
819 ac_prev=bindir ;;
820 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000821 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000822
823 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000824 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000828 -cache-file | --cache-file | --cache-fil | --cache-fi \
829 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
830 ac_prev=cache_file ;;
831 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
832 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000833 cache_file=$ac_optarg ;;
834
835 --config-cache | -C)
836 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837
Martin v. Löwiseba40652007-08-30 20:10:57 +0000838 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000842
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
844 | --dataroo | --dataro | --datar)
845 ac_prev=datarootdir ;;
846 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
847 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
848 datarootdir=$ac_optarg ;;
849
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000851 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000854 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
855 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000856 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
857 eval enable_$ac_feature=no ;;
858
859 -docdir | --docdir | --docdi | --doc | --do)
860 ac_prev=docdir ;;
861 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
862 docdir=$ac_optarg ;;
863
864 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
865 ac_prev=dvidir ;;
866 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
867 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
869 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000870 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000873 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
874 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +0000875 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
876 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
879 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
880 | --exec | --exe | --ex)
881 ac_prev=exec_prefix ;;
882 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
883 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
884 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000885 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886
887 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Obsolete; use --with-gas.
889 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890
Martin v. Löwis11437992002-04-12 09:54:03 +0000891 -help | --help | --hel | --he | -h)
892 ac_init_help=long ;;
893 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
894 ac_init_help=recursive ;;
895 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
896 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
898 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000899 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
904 ac_prev=htmldir ;;
905 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
906 | --ht=*)
907 htmldir=$ac_optarg ;;
908
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 -includedir | --includedir | --includedi | --included | --include \
910 | --includ | --inclu | --incl | --inc)
911 ac_prev=includedir ;;
912 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
913 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000914 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915
916 -infodir | --infodir | --infodi | --infod | --info | --inf)
917 ac_prev=infodir ;;
918 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000920
921 -libdir | --libdir | --libdi | --libd)
922 ac_prev=libdir ;;
923 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000924 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925
926 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
927 | --libexe | --libex | --libe)
928 ac_prev=libexecdir ;;
929 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
930 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
Martin v. Löwiseba40652007-08-30 20:10:57 +0000933 -localedir | --localedir | --localedi | --localed | --locale)
934 ac_prev=localedir ;;
935 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
936 localedir=$ac_optarg ;;
937
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 ac_prev=localstatedir ;;
941 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944
945 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
946 ac_prev=mandir ;;
947 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Obsolete; use --without-fp.
952 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000955 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 no_create=yes ;;
957
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
959 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
960 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000962 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
963 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
964 | --oldin | --oldi | --old | --ol | --o)
965 ac_prev=oldincludedir ;;
966 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
967 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
968 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000969 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000970
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
972 ac_prev=prefix ;;
973 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
976 -program-prefix | --program-prefix | --program-prefi | --program-pref \
977 | --program-pre | --program-pr | --program-p)
978 ac_prev=program_prefix ;;
979 -program-prefix=* | --program-prefix=* | --program-prefi=* \
980 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -program-suffix | --program-suffix | --program-suffi | --program-suff \
984 | --program-suf | --program-su | --program-s)
985 ac_prev=program_suffix ;;
986 -program-suffix=* | --program-suffix=* | --program-suffi=* \
987 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989
990 -program-transform-name | --program-transform-name \
991 | --program-transform-nam | --program-transform-na \
992 | --program-transform-n | --program-transform- \
993 | --program-transform | --program-transfor \
994 | --program-transfo | --program-transf \
995 | --program-trans | --program-tran \
996 | --progr-tra | --program-tr | --program-t)
997 ac_prev=program_transform_name ;;
998 -program-transform-name=* | --program-transform-name=* \
999 | --program-transform-nam=* | --program-transform-na=* \
1000 | --program-transform-n=* | --program-transform-=* \
1001 | --program-transform=* | --program-transfor=* \
1002 | --program-transfo=* | --program-transf=* \
1003 | --program-trans=* | --program-tran=* \
1004 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
Martin v. Löwiseba40652007-08-30 20:10:57 +00001007 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1008 ac_prev=pdfdir ;;
1009 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1010 pdfdir=$ac_optarg ;;
1011
1012 -psdir | --psdir | --psdi | --psd | --ps)
1013 ac_prev=psdir ;;
1014 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1015 psdir=$ac_optarg ;;
1016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1018 | -silent | --silent | --silen | --sile | --sil)
1019 silent=yes ;;
1020
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1022 ac_prev=sbindir ;;
1023 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1024 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1028 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1029 | --sharedst | --shareds | --shared | --share | --shar \
1030 | --sha | --sh)
1031 ac_prev=sharedstatedir ;;
1032 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1033 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1034 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1035 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038 -site | --site | --sit)
1039 ac_prev=site ;;
1040 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1044 ac_prev=srcdir ;;
1045 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1049 | --syscon | --sysco | --sysc | --sys | --sy)
1050 ac_prev=sysconfdir ;;
1051 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1052 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001058 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1061 verbose=yes ;;
1062
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 -version | --version | --versio | --versi | --vers | -V)
1064 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001068 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 # Reject names that are not valid shell variable names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001078 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 { echo "$as_me: error: invalid package name: $ac_package" >&2
1080 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001081 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1082 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001084 --x)
1085 # Obsolete; use --with-x.
1086 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087
1088 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1089 | --x-incl | --x-inc | --x-in | --x-i)
1090 ac_prev=x_includes ;;
1091 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1092 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1096 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1097 ac_prev=x_libraries ;;
1098 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1099 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 -*) { echo "$as_me: error: unrecognized option: $ac_option
1103Try \`$0 --help' for more information." >&2
1104 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 ;;
1106
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 *=*)
1108 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1109 # Reject names that are not valid shell variable names.
1110 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1111 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1112 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 export $ac_envvar ;;
1115
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 # FIXME: should be removed in autoconf 3.0.
1118 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1119 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1120 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1121 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 ;;
1123
1124 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125done
1126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1129 { echo "$as_me: error: missing argument to $ac_option" >&2
1130 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131fi
1132
Martin v. Löwiseba40652007-08-30 20:10:57 +00001133# Be sure to have absolute directory names.
1134for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1135 datadir sysconfdir sharedstatedir localstatedir includedir \
1136 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1137 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001139 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 [\\/$]* | ?:[\\/]* ) continue;;
1142 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001144 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1145 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001147
Martin v. Löwis11437992002-04-12 09:54:03 +00001148# There might be people who depend on the old broken behavior: `$host'
1149# used to hold the argument of --host etc.
1150# FIXME: To remove some day.
1151build=$build_alias
1152host=$host_alias
1153target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001154
Martin v. Löwis11437992002-04-12 09:54:03 +00001155# FIXME: To remove some day.
1156if test "x$host_alias" != x; then
1157 if test "x$build_alias" = x; then
1158 cross_compiling=maybe
1159 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1160 If a cross compiler is detected then cross compile mode will be used." >&2
1161 elif test "x$build_alias" != "x$host_alias"; then
1162 cross_compiling=yes
1163 fi
1164fi
1165
1166ac_tool_prefix=
1167test -n "$host_alias" && ac_tool_prefix=$host_alias-
1168
1169test "$silent" = yes && exec 6>/dev/null
1170
Guido van Rossum627b2d71993-12-24 10:39:16 +00001171
Martin v. Löwiseba40652007-08-30 20:10:57 +00001172ac_pwd=`pwd` && test -n "$ac_pwd" &&
1173ac_ls_di=`ls -di .` &&
1174ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1175 { echo "$as_me: error: Working directory cannot be determined" >&2
1176 { (exit 1); exit 1; }; }
1177test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1178 { echo "$as_me: error: pwd does not report name of working directory" >&2
1179 { (exit 1); exit 1; }; }
1180
1181
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182# Find the source files, if location was not specified.
1183if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001185 # Try the directory containing this script, then the parent directory.
1186 ac_confdir=`$as_dirname -- "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001187$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001188 X"$0" : 'X\(//\)[^/]' \| \
1189 X"$0" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001190 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +00001191echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001192 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1193 s//\1/
1194 q
1195 }
1196 /^X\(\/\/\)[^/].*/{
1197 s//\1/
1198 q
1199 }
1200 /^X\(\/\/\)$/{
1201 s//\1/
1202 q
1203 }
1204 /^X\(\/\).*/{
1205 s//\1/
1206 q
1207 }
1208 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001210 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211 srcdir=..
1212 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213else
1214 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001216if test ! -r "$srcdir/$ac_unique_file"; then
1217 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1218 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001221ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1222ac_abs_confdir=`(
1223 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001224 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001225 pwd)`
1226# When building in place, set srcdir=.
1227if test "$ac_abs_confdir" = "$ac_pwd"; then
1228 srcdir=.
1229fi
1230# Remove unnecessary trailing slashes from srcdir.
1231# Double slashes in file names in object file debugging info
1232# mess up M-x gdb in Emacs.
1233case $srcdir in
1234*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1235esac
1236for ac_var in $ac_precious_vars; do
1237 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1238 eval ac_env_${ac_var}_value=\$${ac_var}
1239 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1241done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001242
Martin v. Löwis11437992002-04-12 09:54:03 +00001243#
1244# Report the --help message.
1245#
1246if test "$ac_init_help" = "long"; then
1247 # Omit some internal or obsolete options to make the list less imposing.
1248 # This message is too long to be a string in the A/UX 3.1 sh.
1249 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001250\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001251
1252Usage: $0 [OPTION]... [VAR=VALUE]...
1253
1254To assign environment variables (e.g., CC, CFLAGS...), specify them as
1255VAR=VALUE. See below for descriptions of some of the useful variables.
1256
1257Defaults for the options are specified in brackets.
1258
1259Configuration:
1260 -h, --help display this help and exit
1261 --help=short display options specific to this package
1262 --help=recursive display the short help of all the included packages
1263 -V, --version display version information and exit
1264 -q, --quiet, --silent do not print \`checking...' messages
1265 --cache-file=FILE cache test results in FILE [disabled]
1266 -C, --config-cache alias for \`--cache-file=config.cache'
1267 -n, --no-create do not create output files
1268 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270Installation directories:
1271 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001272 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001273 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275
1276By default, \`make install' will install all the files in
1277\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1278an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1279for instance \`--prefix=\$HOME'.
1280
1281For better control, use the options below.
1282
1283Fine tuning of the installation directories:
1284 --bindir=DIR user executables [EPREFIX/bin]
1285 --sbindir=DIR system admin executables [EPREFIX/sbin]
1286 --libexecdir=DIR program executables [EPREFIX/libexec]
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1288 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1289 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1290 --libdir=DIR object code libraries [EPREFIX/lib]
1291 --includedir=DIR C header files [PREFIX/include]
1292 --oldincludedir=DIR C header files for non-gcc [/usr/include]
Martin v. Löwiseba40652007-08-30 20:10:57 +00001293 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1294 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1295 --infodir=DIR info documentation [DATAROOTDIR/info]
1296 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1297 --mandir=DIR man documentation [DATAROOTDIR/man]
1298 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1299 --htmldir=DIR html documentation [DOCDIR]
1300 --dvidir=DIR dvi documentation [DOCDIR]
1301 --pdfdir=DIR pdf documentation [DOCDIR]
1302 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001303_ACEOF
1304
1305 cat <<\_ACEOF
1306_ACEOF
1307fi
1308
1309if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001310 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001311 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001313 cat <<\_ACEOF
1314
1315Optional Features:
1316 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1317 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001318 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001319 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001320 --enable-framework[=INSTALLDIR]
1321 Build (MacOSX|Darwin) framework
1322 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001323 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001324 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1325 --enable-ipv6 Enable ipv6 (with ipv4) support
1326 --disable-ipv6 Disable ipv6 support
1327 --enable-unicode[=ucs[24]]
1328 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001329
1330Optional Packages:
1331 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1332 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001333 --with-universal-archs=ARCH
1334 select architectures for universal build ("32-bit",
Ronald Oussoren7ab74352009-09-08 07:10:07 +00001335 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001336 --with-framework-name=FRAMEWORK
1337 specify an alternate name of the framework built
1338 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001339 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001340 --with-cxx-main=<compiler>
1341 compile main() and link python executable with C++
1342 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --with-suffix=.exe set executable suffix
1344 --with-pydebug build with Py_DEBUG defined
1345 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001346 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-signal-module disable/enable signal module
1348 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1349 --with(out)-threads[=DIRECTORY]
1350 disable/enable thread support
1351 --with(out)-thread[=DIRECTORY]
1352 deprecated; use --with(out)-threads
1353 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001354 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001355 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001356 --with(out)-pymalloc disable/enable specialized mallocs
1357 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001358 --with-fpectl enable SIGFPE catching
1359 --with-libm=STRING math library
1360 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001361
1362Some influential environment variables:
1363 CC C compiler command
1364 CFLAGS C compiler flags
1365 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1366 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001367 LIBS libraries to pass to the linker, e.g. -l<library>
1368 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1369 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001370 CPP C preprocessor
1371
1372Use these variables to override the choices made by `configure' or to help
1373it to find libraries and programs with nonstandard names/locations.
1374
Martin v. Löwis1d459062005-03-14 21:23:33 +00001375Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001376_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001377ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001378fi
1379
1380if test "$ac_init_help" = "recursive"; then
1381 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Martin v. Löwiseba40652007-08-30 20:10:57 +00001383 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 ac_builddir=.
1385
Martin v. Löwiseba40652007-08-30 20:10:57 +00001386case "$ac_dir" in
1387.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1388*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001389 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001390 # A ".." for each directory in $ac_dir_suffix.
1391 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1392 case $ac_top_builddir_sub in
1393 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1395 esac ;;
1396esac
1397ac_abs_top_builddir=$ac_pwd
1398ac_abs_builddir=$ac_pwd$ac_dir_suffix
1399# for backward compatibility:
1400ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001401
1402case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001403 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001404 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001405 ac_top_srcdir=$ac_top_builddir_sub
1406 ac_abs_top_srcdir=$ac_pwd ;;
1407 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001409 ac_top_srcdir=$srcdir
1410 ac_abs_top_srcdir=$srcdir ;;
1411 *) # Relative name.
1412 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1413 ac_top_srcdir=$ac_top_build_prefix$srcdir
1414 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001415esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001416ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001417
Martin v. Löwiseba40652007-08-30 20:10:57 +00001418 cd "$ac_dir" || { ac_status=$?; continue; }
1419 # Check for guested configure.
1420 if test -f "$ac_srcdir/configure.gnu"; then
1421 echo &&
1422 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1423 elif test -f "$ac_srcdir/configure"; then
1424 echo &&
1425 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 else
1427 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001428 fi || ac_status=$?
1429 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 done
1431fi
1432
Martin v. Löwiseba40652007-08-30 20:10:57 +00001433test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001434if $ac_init_version; then
1435 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001436python configure 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +00001437generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001438
Martin v. Löwiseba40652007-08-30 20:10:57 +00001439Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14402002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001441This configure script is free software; the Free Software Foundation
1442gives unlimited permission to copy, distribute and modify it.
1443_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001444 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001445fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001446cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001447This file contains any messages produced by compilers while
1448running configure, to aid debugging if configure makes a mistake.
1449
Neal Norwitz9be57322006-08-18 05:39:20 +00001450It was created by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +00001451generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453 $ $0 $@
1454
1455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001456exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001457{
1458cat <<_ASUNAME
1459## --------- ##
1460## Platform. ##
1461## --------- ##
1462
1463hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1464uname -m = `(uname -m) 2>/dev/null || echo unknown`
1465uname -r = `(uname -r) 2>/dev/null || echo unknown`
1466uname -s = `(uname -s) 2>/dev/null || echo unknown`
1467uname -v = `(uname -v) 2>/dev/null || echo unknown`
1468
1469/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1470/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1471
1472/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1473/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1474/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001475/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001476/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1477/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1478/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1479
1480_ASUNAME
1481
1482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1483for as_dir in $PATH
1484do
1485 IFS=$as_save_IFS
1486 test -z "$as_dir" && as_dir=.
1487 echo "PATH: $as_dir"
1488done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001489IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491} >&5
1492
1493cat >&5 <<_ACEOF
1494
1495
1496## ----------- ##
1497## Core tests. ##
1498## ----------- ##
1499
1500_ACEOF
1501
1502
1503# Keep a trace of the command line.
1504# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001505# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001507# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001508ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001509ac_configure_args0=
1510ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001511ac_must_keep_next=false
1512for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001513do
Skip Montanaro6dead952003-09-25 14:50:04 +00001514 for ac_arg
1515 do
1516 case $ac_arg in
1517 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1518 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1519 | -silent | --silent | --silen | --sile | --sil)
1520 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521 *\'*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1523 esac
1524 case $ac_pass in
1525 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1526 2)
1527 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1528 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001530 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 case $ac_arg in
1532 *=* | --config-cache | -C | -disable-* | --disable-* \
1533 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1534 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1535 | -with-* | --with-* | -without-* | --without-* | --x)
1536 case "$ac_configure_args0 " in
1537 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1538 esac
1539 ;;
1540 -* ) ac_must_keep_next=true ;;
1541 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001542 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001543 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001544 ;;
1545 esac
1546 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001547done
Skip Montanaro6dead952003-09-25 14:50:04 +00001548$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1549$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 +00001550
1551# When interrupted or exit'd, cleanup temporary files, and complete
1552# config.log. We remove comments because anyway the quotes in there
1553# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001554# WARNING: Use '\'' to represent an apostrophe within the trap.
1555# 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 +00001556trap 'exit_status=$?
1557 # Save into config.log some information that might help in debugging.
1558 {
1559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001560
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 cat <<\_ASBOX
1562## ---------------- ##
1563## Cache variables. ##
1564## ---------------- ##
1565_ASBOX
1566 echo
1567 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568(
1569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1570 eval ac_val=\$$ac_var
1571 case $ac_val in #(
1572 *${as_nl}*)
1573 case $ac_var in #(
1574 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1575echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1576 esac
1577 case $ac_var in #(
1578 _ | IFS | as_nl) ;; #(
1579 *) $as_unset $ac_var ;;
1580 esac ;;
1581 esac
1582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001586 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001587 "s/'\''/'\''\\\\'\'''\''/g;
1588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1589 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001590 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001592 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001593 esac |
1594 sort
1595)
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001597
1598 cat <<\_ASBOX
1599## ----------------- ##
1600## Output variables. ##
1601## ----------------- ##
1602_ASBOX
1603 echo
1604 for ac_var in $ac_subst_vars
1605 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001606 eval ac_val=\$$ac_var
1607 case $ac_val in
1608 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1609 esac
1610 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001611 done | sort
1612 echo
1613
1614 if test -n "$ac_subst_files"; then
1615 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001616## ------------------- ##
1617## File substitutions. ##
1618## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001619_ASBOX
1620 echo
1621 for ac_var in $ac_subst_files
1622 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 eval ac_val=\$$ac_var
1624 case $ac_val in
1625 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1626 esac
1627 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001628 done | sort
1629 echo
1630 fi
1631
Martin v. Löwis11437992002-04-12 09:54:03 +00001632 if test -s confdefs.h; then
1633 cat <<\_ASBOX
1634## ----------- ##
1635## confdefs.h. ##
1636## ----------- ##
1637_ASBOX
1638 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001639 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 echo
1641 fi
1642 test "$ac_signal" != 0 &&
1643 echo "$as_me: caught signal $ac_signal"
1644 echo "$as_me: exit $exit_status"
1645 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001646 rm -f core *.core core.conftest.* &&
1647 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001649' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001650for ac_signal in 1 2 13 15; do
1651 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1652done
1653ac_signal=0
1654
1655# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001656rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001657
1658# Predefined preprocessor variables.
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_NAME "$PACKAGE_NAME"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_VERSION "$PACKAGE_VERSION"
1672_ACEOF
1673
1674
1675cat >>confdefs.h <<_ACEOF
1676#define PACKAGE_STRING "$PACKAGE_STRING"
1677_ACEOF
1678
1679
1680cat >>confdefs.h <<_ACEOF
1681#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1682_ACEOF
1683
1684
1685# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001686# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001687if test -n "$CONFIG_SITE"; then
1688 set x "$CONFIG_SITE"
1689elif test "x$prefix" != xNONE; then
1690 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1691else
1692 set x "$ac_default_prefix/share/config.site" \
1693 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695shift
1696for ac_site_file
1697do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001698 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1700echo "$as_me: loading site script $ac_site_file" >&6;}
1701 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702 . "$ac_site_file"
1703 fi
1704done
1705
1706if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001707 # Some versions of bash will fail to source /dev/null (special
1708 # files actually), so we avoid doing that.
1709 if test -f "$cache_file"; then
1710 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1711echo "$as_me: loading cache $cache_file" >&6;}
1712 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001713 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1714 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 esac
1716 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717else
Martin v. Löwis11437992002-04-12 09:54:03 +00001718 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1719echo "$as_me: creating cache $cache_file" >&6;}
1720 >$cache_file
1721fi
1722
1723# Check that the precious variables saved in the cache have kept the same
1724# value.
1725ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001726for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1728 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1730 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001731 case $ac_old_set,$ac_new_set in
1732 set,)
1733 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1734echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1735 ac_cache_corrupted=: ;;
1736 ,set)
1737 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1738echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,);;
1741 *)
1742 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001743 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001744echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001745 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001746echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001747 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001748echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001749 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001750 fi;;
1751 esac
1752 # Pass precious variables to config.status.
1753 if test "$ac_new_set" = set; then
1754 case $ac_new_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001755 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 *) ac_arg=$ac_var=$ac_new_val ;;
1757 esac
1758 case " $ac_configure_args " in
1759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1760 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1761 esac
1762 fi
1763done
1764if $ac_cache_corrupted; then
1765 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1766echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1767 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1768echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1769 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001770fi
1771
Martin v. Löwiseba40652007-08-30 20:10:57 +00001772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
Guido van Rossum7f43da71994-08-01 12:15:30 +00001796ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001797ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1800ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801
Guido van Rossum627b2d71993-12-24 10:39:16 +00001802
Michael W. Hudson54241132001-12-07 15:38:26 +00001803
Martin v. Löwiseba40652007-08-30 20:10:57 +00001804ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001805
1806
Martin v. Löwis11437992002-04-12 09:54:03 +00001807
1808
1809
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001810
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001811
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001812# We don't use PACKAGE_ variables, and they cause conflicts
1813# with other autoconf-based packages that include Python.h
1814grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1815rm confdefs.h
1816mv confdefs.h.new confdefs.h
1817
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001818
Neal Norwitz9be57322006-08-18 05:39:20 +00001819VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001820
Martin v. Löwis1142de32002-03-29 16:28:31 +00001821
1822SOVERSION=1.0
1823
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001824# The later defininition of _XOPEN_SOURCE disables certain features
1825# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1826
1827cat >>confdefs.h <<\_ACEOF
1828#define _GNU_SOURCE 1
1829_ACEOF
1830
1831
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001832# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1833# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1834# them.
1835
1836cat >>confdefs.h <<\_ACEOF
1837#define _NETBSD_SOURCE 1
1838_ACEOF
1839
1840
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001841# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1842# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1843# them.
1844
1845cat >>confdefs.h <<\_ACEOF
1846#define __BSD_VISIBLE 1
1847_ACEOF
1848
1849
Martin v. Löwisd6320502004-08-12 13:45:08 +00001850# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1851# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1852
1853cat >>confdefs.h <<\_ACEOF
1854#define _BSD_TYPES 1
1855_ACEOF
1856
1857
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001858# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1859# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1860# them.
1861
1862cat >>confdefs.h <<\_ACEOF
1863#define _DARWIN_C_SOURCE 1
1864_ACEOF
1865
1866
1867
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001868define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001869
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001870# Arguments passed to configure.
1871
1872CONFIG_ARGS="$ac_configure_args"
1873
Martin v. Löwiseba40652007-08-30 20:10:57 +00001874# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001875if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001876 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001877 case $enableval in
1878 yes)
1879 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1880 ;;
1881 esac
1882 case $enableval in
1883 no)
1884 UNIVERSALSDK=
1885 enable_universalsdk=
1886 ;;
1887 *)
1888 UNIVERSALSDK=$enableval
1889 ;;
1890 esac
1891
1892else
1893
1894 UNIVERSALSDK=
1895 enable_universalsdk=
1896
Martin v. Löwiseba40652007-08-30 20:10:57 +00001897fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001898
1899
Martin v. Löwiseba40652007-08-30 20:10:57 +00001900
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001901
1902
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001903UNIVERSAL_ARCHS="32-bit"
1904{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1905echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
1906
1907# Check whether --with-universal-archs was given.
1908if test "${with_universal_archs+set}" = set; then
1909 withval=$with_universal_archs;
1910 { echo "$as_me:$LINENO: result: $withval" >&5
1911echo "${ECHO_T}$withval" >&6; }
1912 UNIVERSAL_ARCHS="$withval"
1913
1914else
1915
1916 { echo "$as_me:$LINENO: result: 32-bit" >&5
1917echo "${ECHO_T}32-bit" >&6; }
1918
1919fi
1920
1921
1922
1923
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001924
1925# Check whether --with-framework-name was given.
1926if test "${with_framework_name+set}" = set; then
1927 withval=$with_framework_name;
1928 PYTHONFRAMEWORK=${withval}
1929 PYTHONFRAMEWORKDIR=${withval}.framework
1930 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1931
1932else
1933
1934 PYTHONFRAMEWORK=Python
1935 PYTHONFRAMEWORKDIR=Python.framework
1936 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1937
1938fi
1939
Martin v. Löwiseba40652007-08-30 20:10:57 +00001940# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001941if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001942 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001943 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001944 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001945 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001946 esac
1947 case $enableval in
1948 no)
1949 PYTHONFRAMEWORK=
1950 PYTHONFRAMEWORKDIR=no-framework
1951 PYTHONFRAMEWORKPREFIX=
1952 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001953 FRAMEWORKINSTALLFIRST=
1954 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001955 FRAMEWORKALTINSTALLFIRST=
1956 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001957 if test "x${prefix}" = "xNONE"; then
1958 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1959 else
1960 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1961 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001962 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001963 ;;
1964 *)
1965 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001966 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001967 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001968 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1969 if test "$UNIVERSAL_ARCHS" = "all"
1970 then
1971 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussoren75d83852009-03-30 17:56:14 +00001972 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001973 else
Ronald Oussoren75d83852009-03-30 17:56:14 +00001974 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001975 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1976 fi
1977
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001978 if test "x${prefix}" = "xNONE" ; then
1979 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1980 else
1981 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1982 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001983 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001984
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001985 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00001986 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00001987 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001988
Martin v. Löwiseba40652007-08-30 20:10:57 +00001989 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001990
Martin v. Löwiseba40652007-08-30 20:10:57 +00001991 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001992
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001993 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
1994
1995 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
1996
Jack Jansene578a632001-08-15 01:27:14 +00001997 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001998
Guido van Rossum563e7081996-09-10 18:20:48 +00001999else
Martin v. Löwis11437992002-04-12 09:54:03 +00002000
Jack Jansene578a632001-08-15 01:27:14 +00002001 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002002 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002003 PYTHONFRAMEWORKPREFIX=
2004 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002005 FRAMEWORKINSTALLFIRST=
2006 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002007 FRAMEWORKALTINSTALLFIRST=
2008 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002009 if test "x${prefix}" = "xNONE" ; then
2010 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2011 else
2012 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2013 fi
Jack Jansene578a632001-08-15 01:27:14 +00002014 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002015
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002016 if test "$UNIVERSAL_ARCHS" = "all"
2017 then
2018 FRAMEWORKINSTALLLAST=update4wayuniversal
2019 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2020 fi
2021
Martin v. Löwiseba40652007-08-30 20:10:57 +00002022fi
2023
Michael W. Hudson54241132001-12-07 15:38:26 +00002024
2025
2026
2027
Jack Jansene578a632001-08-15 01:27:14 +00002028
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002029
2030
Ronald Oussoren5b787322006-06-06 19:50:24 +00002031
2032
2033
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002034
Jack Jansene578a632001-08-15 01:27:14 +00002035##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002036## AC_HELP_STRING(--with-dyld,
2037## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002038##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002039# Set name for machine-dependent library files
2040
Martin v. Löwiseba40652007-08-30 20:10:57 +00002041{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2042echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002043if test -z "$MACHDEP"
2044then
Guido van Rossum563e7081996-09-10 18:20:48 +00002045 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002046 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2047 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002048 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002049 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002050 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002051 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002052 ac_md_system=`echo $ac_sys_system |
2053 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2054 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002055 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002056 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002057
Guido van Rossum07397971997-04-29 21:49:50 +00002058 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002059 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002060 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002061 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002062 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002063 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002064 esac
2065fi
Guido van Rossum91922671997-10-09 20:24:13 +00002066
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002067# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2068# disable features if it is defined, without any means to access these
2069# features as extensions. For these systems, we skip the definition of
2070# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2071# some feature, make sure there is no alternative way to access this
2072# feature. Also, when using wildcards, make sure you have verified the
2073# need for not defining _XOPEN_SOURCE on all systems matching the
2074# wildcard, and that the wildcard does not include future systems
2075# (which may remove their limitations).
2076case $ac_sys_system/$ac_sys_release in
2077 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2078 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002079 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002080 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002081 define_xopen_source=no
2082 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2083 # also defined. This can be overridden by defining _BSD_SOURCE
2084 # As this has a different meaning on Linux, only define it on OpenBSD
2085
2086cat >>confdefs.h <<\_ACEOF
2087#define _BSD_SOURCE 1
2088_ACEOF
2089
2090 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002091 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2092 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2093 # Marc Recht
Benjamin Petersonf9c08882008-11-16 17:57:10 +00002094 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002095 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002096 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2097 # of union __?sigval. Reported by Stuart Bishop.
2098 SunOS/5.6)
2099 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002100 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2101 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002102 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002103 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002104 define_xopen_source=no;;
2105 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002106 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002107 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002108 define_xopen_source=no;;
Martin v. Löwis7f08c1f2008-11-04 20:43:31 +00002109 # On FreeBSD 4, the math functions C89 does not cover are never defined
2110 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2111 FreeBSD/4.*)
2112 define_xopen_source=no;;
2113 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2114 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2115 # identifies itself as Darwin/7.*
2116 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2117 # disables platform specific features beyond repair.
2118 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2119 # has no effect, don't bother defining them
2120 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002121 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002122 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2123 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2124 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002125 AIX/4)
2126 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002127 AIX/5)
2128 if test `uname -r` -eq 1; then
2129 define_xopen_source=no
2130 fi
2131 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002132 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2133 # defining NI_NUMERICHOST.
2134 QNX/6.3.2)
2135 define_xopen_source=no
2136 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002137
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002138esac
2139
2140if test $define_xopen_source = yes
2141then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002142 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2143 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002144 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2145 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002146 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002147 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002148
2149cat >>confdefs.h <<\_ACEOF
2150#define _XOPEN_SOURCE 500
2151_ACEOF
2152
2153 ;;
2154 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002155
2156cat >>confdefs.h <<\_ACEOF
2157#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002158_ACEOF
2159
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 ;;
2161 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002162
2163 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2164 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2165 # several APIs are not declared. Since this is also needed in some
2166 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002167 # except for Solaris 10, where it must not be defined,
2168 # as it implies XPG4.2
2169 case $ac_sys_system/$ac_sys_release in
2170 SunOS/5.10)
2171 ;;
2172 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002173
2174cat >>confdefs.h <<\_ACEOF
2175#define _XOPEN_SOURCE_EXTENDED 1
2176_ACEOF
2177
Martin v. Löwis7dece662005-11-26 11:38:24 +00002178 ;;
2179 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002180
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002181
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002182cat >>confdefs.h <<\_ACEOF
2183#define _POSIX_C_SOURCE 200112L
2184_ACEOF
2185
2186
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002187fi
2188
Guido van Rossum91922671997-10-09 20:24:13 +00002189#
2190# SGI compilers allow the specification of the both the ABI and the
2191# ISA on the command line. Depending on the values of these switches,
2192# different and often incompatable code will be generated.
2193#
2194# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2195# thus supply support for various ABI/ISA combinations. The MACHDEP
2196# variable is also adjusted.
2197#
2198
2199if test ! -z "$SGI_ABI"
2200then
2201 CC="cc $SGI_ABI"
2202 LDFLAGS="$SGI_ABI $LDFLAGS"
2203 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002205{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2206echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002207
Jack Jansen83f898c2002-12-30 22:23:40 +00002208# And add extra plat-mac for darwin
2209
Jack Jansen7b59b422003-03-17 15:44:10 +00002210
Martin v. Löwiseba40652007-08-30 20:10:57 +00002211{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2212echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002213if test -z "$EXTRAPLATDIR"
2214then
2215 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002216 darwin)
2217 EXTRAPLATDIR="\$(PLATMACDIRS)"
2218 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2219 ;;
2220 *)
2221 EXTRAPLATDIR=""
2222 EXTRAMACHDEPPATH=""
2223 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002224 esac
2225fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002226{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2227echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002228
Jack Jansen6b08a402004-06-03 12:41:45 +00002229# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2230# it may influence the way we can build extensions, so distutils
2231# needs to check it
2232
Ronald Oussoren988117f2006-04-29 11:31:35 +00002233
Jack Jansen6b08a402004-06-03 12:41:45 +00002234CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002235EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002236
Mark Dickinson65134662008-04-25 16:11:04 +00002237{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2238echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
2239ac_sys_machine=`uname -m`
2240{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2241echo "${ECHO_T}$ac_sys_machine" >&6; }
2242
Guido van Rossum627b2d71993-12-24 10:39:16 +00002243# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002244
2245# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2246# for debug/optimization stuff. BASECFLAGS is for flags that are required
2247# just to get things to compile and link. Users are free to override OPT
2248# when running configure or make. The build should not break if they do.
2249# BASECFLAGS should generally not be messed with, however.
2250
2251# XXX shouldn't some/most/all of this code be merged with the stuff later
2252# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwiseba40652007-08-30 20:10:57 +00002253{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2254echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002255
Martin v. Löwiseba40652007-08-30 20:10:57 +00002256# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002257if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002258 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002259 case $withval in
Ronald Oussoren75d83852009-03-30 17:56:14 +00002260 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002261 without_gcc=yes;;
2262 yes) CC=gcc
2263 without_gcc=no;;
2264 *) CC=$withval
2265 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002266 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002267else
Martin v. Löwis11437992002-04-12 09:54:03 +00002268
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002269 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002270 AIX*) CC=cc_r
2271 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002272 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002273 case $BE_HOST_CPU in
2274 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002275 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002276 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002277 BASECFLAGS="$BASECFLAGS -export pragma"
2278 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002279 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002280 ;;
2281 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002282 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002283 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002284 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002285 ;;
2286 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002287 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2288echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
2289 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002290 ;;
2291 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002292 AR="\$(srcdir)/Modules/ar_beos"
2293 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002294 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002295 Monterey*)
2296 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002297 without_gcc=;;
2298 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002299 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002300fi
2301
2302{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2303echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002304
Guido van Rossum8b131c51995-03-09 14:10:13 +00002305# If the user switches compilers, we can't believe the cache
2306if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2307then
Martin v. Löwis11437992002-04-12 09:54:03 +00002308 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
2309(it is also a good idea to do 'make clean' before compiling)" >&5
2310echo "$as_me: error: cached CC is different -- throw away $cache_file
2311(it is also a good idea to do 'make clean' before compiling)" >&2;}
2312 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002313fi
2314
Martin v. Löwis11437992002-04-12 09:54:03 +00002315ac_ext=c
2316ac_cpp='$CPP $CPPFLAGS'
2317ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2318ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2319ac_compiler_gnu=$ac_cv_c_compiler_gnu
2320if test -n "$ac_tool_prefix"; then
2321 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2322set dummy ${ac_tool_prefix}gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002323{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002325if test "${ac_cv_prog_CC+set}" = set; then
2326 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002327else
2328 if test -n "$CC"; then
2329 ac_cv_prog_CC="$CC" # Let the user override the test.
2330else
Martin v. Löwis11437992002-04-12 09:54:03 +00002331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2332for as_dir in $PATH
2333do
2334 IFS=$as_save_IFS
2335 test -z "$as_dir" && as_dir=.
2336 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002337 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 +00002338 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2339 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2340 break 2
2341 fi
2342done
2343done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002344IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002345
Jack Jansendd19cf82001-12-06 22:36:17 +00002346fi
2347fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002348CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002349if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002350 { echo "$as_me:$LINENO: result: $CC" >&5
2351echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002352else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002353 { echo "$as_me:$LINENO: result: no" >&5
2354echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002355fi
2356
Martin v. Löwiseba40652007-08-30 20:10:57 +00002357
Martin v. Löwis11437992002-04-12 09:54:03 +00002358fi
2359if test -z "$ac_cv_prog_CC"; then
2360 ac_ct_CC=$CC
2361 # Extract the first word of "gcc", so it can be a program name with args.
2362set dummy gcc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002363{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2364echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002365if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2366 echo $ECHO_N "(cached) $ECHO_C" >&6
2367else
2368 if test -n "$ac_ct_CC"; then
2369 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2370else
2371as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372for as_dir in $PATH
2373do
2374 IFS=$as_save_IFS
2375 test -z "$as_dir" && as_dir=.
2376 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002377 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 +00002378 ac_cv_prog_ac_ct_CC="gcc"
2379 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2380 break 2
2381 fi
2382done
2383done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002384IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002385
2386fi
2387fi
2388ac_ct_CC=$ac_cv_prog_ac_ct_CC
2389if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002390 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2391echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002392else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002393 { echo "$as_me:$LINENO: result: no" >&5
2394echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002395fi
2396
Martin v. Löwiseba40652007-08-30 20:10:57 +00002397 if test "x$ac_ct_CC" = x; then
2398 CC=""
2399 else
2400 case $cross_compiling:$ac_tool_warned in
2401yes:)
2402{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2403whose name does not start with the host triplet. If you think this
2404configuration is useful to you, please write to autoconf@gnu.org." >&5
2405echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2406whose name does not start with the host triplet. If you think this
2407configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2408ac_tool_warned=yes ;;
2409esac
2410 CC=$ac_ct_CC
2411 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002412else
2413 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002414fi
2415
Jack Jansendd19cf82001-12-06 22:36:17 +00002416if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002417 if test -n "$ac_tool_prefix"; then
2418 # 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 +00002419set dummy ${ac_tool_prefix}cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002420{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2421echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002422if test "${ac_cv_prog_CC+set}" = set; then
2423 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002424else
2425 if test -n "$CC"; then
2426 ac_cv_prog_CC="$CC" # Let the user override the test.
2427else
Martin v. Löwis11437992002-04-12 09:54:03 +00002428as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2429for as_dir in $PATH
2430do
2431 IFS=$as_save_IFS
2432 test -z "$as_dir" && as_dir=.
2433 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002434 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 +00002435 ac_cv_prog_CC="${ac_tool_prefix}cc"
2436 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2437 break 2
2438 fi
2439done
2440done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002441IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002442
2443fi
2444fi
2445CC=$ac_cv_prog_CC
2446if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002447 { echo "$as_me:$LINENO: result: $CC" >&5
2448echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002450 { echo "$as_me:$LINENO: result: no" >&5
2451echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452fi
2453
Martin v. Löwiseba40652007-08-30 20:10:57 +00002454
Martin v. Löwis11437992002-04-12 09:54:03 +00002455 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002456fi
2457if test -z "$CC"; then
2458 # Extract the first word of "cc", so it can be a program name with args.
2459set dummy cc; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002460{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2461echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002462if test "${ac_cv_prog_CC+set}" = set; then
2463 echo $ECHO_N "(cached) $ECHO_C" >&6
2464else
2465 if test -n "$CC"; then
2466 ac_cv_prog_CC="$CC" # Let the user override the test.
2467else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002468 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2470for as_dir in $PATH
2471do
2472 IFS=$as_save_IFS
2473 test -z "$as_dir" && as_dir=.
2474 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002475 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 +00002476 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2477 ac_prog_rejected=yes
2478 continue
2479 fi
2480 ac_cv_prog_CC="cc"
2481 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2482 break 2
2483 fi
2484done
2485done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002486IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002487
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002488if test $ac_prog_rejected = yes; then
2489 # We found a bogon in the path, so make sure we never use it.
2490 set dummy $ac_cv_prog_CC
2491 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002492 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002493 # We chose a different compiler from the bogus one.
2494 # However, it has the same basename, so the bogon will be chosen
2495 # first if we set CC to just the basename; use the full file name.
2496 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002497 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002498 fi
2499fi
2500fi
2501fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002502CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002503if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002504 { echo "$as_me:$LINENO: result: $CC" >&5
2505echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002506else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002507 { echo "$as_me:$LINENO: result: no" >&5
2508echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002509fi
2510
Martin v. Löwiseba40652007-08-30 20:10:57 +00002511
Martin v. Löwis11437992002-04-12 09:54:03 +00002512fi
2513if test -z "$CC"; then
2514 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 do
2517 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2518set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2520echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002521if test "${ac_cv_prog_CC+set}" = set; then
2522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002523else
2524 if test -n "$CC"; then
2525 ac_cv_prog_CC="$CC" # Let the user override the test.
2526else
Martin v. Löwis11437992002-04-12 09:54:03 +00002527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2528for as_dir in $PATH
2529do
2530 IFS=$as_save_IFS
2531 test -z "$as_dir" && as_dir=.
2532 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002533 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 +00002534 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2535 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2536 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002538done
2539done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002540IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002541
2542fi
2543fi
2544CC=$ac_cv_prog_CC
2545if test -n "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002546 { echo "$as_me:$LINENO: result: $CC" >&5
2547echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002548else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002549 { echo "$as_me:$LINENO: result: no" >&5
2550echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002551fi
2552
Martin v. Löwiseba40652007-08-30 20:10:57 +00002553
Martin v. Löwis11437992002-04-12 09:54:03 +00002554 test -n "$CC" && break
2555 done
2556fi
2557if test -z "$CC"; then
2558 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002559 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002560do
2561 # Extract the first word of "$ac_prog", so it can be a program name with args.
2562set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2564echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002565if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2566 echo $ECHO_N "(cached) $ECHO_C" >&6
2567else
2568 if test -n "$ac_ct_CC"; then
2569 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2570else
2571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2572for as_dir in $PATH
2573do
2574 IFS=$as_save_IFS
2575 test -z "$as_dir" && as_dir=.
2576 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002577 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 +00002578 ac_cv_prog_ac_ct_CC="$ac_prog"
2579 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2580 break 2
2581 fi
2582done
2583done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002585
Martin v. Löwis11437992002-04-12 09:54:03 +00002586fi
2587fi
2588ac_ct_CC=$ac_cv_prog_ac_ct_CC
2589if test -n "$ac_ct_CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2591echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002592else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 { echo "$as_me:$LINENO: result: no" >&5
2594echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002595fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002596
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 test -n "$ac_ct_CC" && break
2599done
Michael W. Hudson54241132001-12-07 15:38:26 +00002600
Martin v. Löwiseba40652007-08-30 20:10:57 +00002601 if test "x$ac_ct_CC" = x; then
2602 CC=""
2603 else
2604 case $cross_compiling:$ac_tool_warned in
2605yes:)
2606{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2607whose name does not start with the host triplet. If you think this
2608configuration is useful to you, please write to autoconf@gnu.org." >&5
2609echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2610whose name does not start with the host triplet. If you think this
2611configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2612ac_tool_warned=yes ;;
2613esac
2614 CC=$ac_ct_CC
2615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002616fi
2617
2618fi
2619
2620
Skip Montanaro6dead952003-09-25 14:50:04 +00002621test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2622See \`config.log' for more details." >&5
2623echo "$as_me: error: no acceptable C compiler found in \$PATH
2624See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 { (exit 1); exit 1; }; }
2626
2627# Provide some information about the compiler.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002628echo "$as_me:$LINENO: checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002629ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002630{ (ac_try="$ac_compiler --version >&5"
2631case "(($ac_try" in
2632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2633 *) ac_try_echo=$ac_try;;
2634esac
2635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2636 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 ac_status=$?
2638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2639 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640{ (ac_try="$ac_compiler -v >&5"
2641case "(($ac_try" in
2642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2643 *) ac_try_echo=$ac_try;;
2644esac
2645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2646 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002647 ac_status=$?
2648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2649 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650{ (ac_try="$ac_compiler -V >&5"
2651case "(($ac_try" in
2652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2653 *) ac_try_echo=$ac_try;;
2654esac
2655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2656 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002657 ac_status=$?
2658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2659 (exit $ac_status); }
2660
2661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002662/* confdefs.h. */
2663_ACEOF
2664cat confdefs.h >>conftest.$ac_ext
2665cat >>conftest.$ac_ext <<_ACEOF
2666/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668int
2669main ()
2670{
2671
2672 ;
2673 return 0;
2674}
2675_ACEOF
2676ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002677ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002678# Try to create an executable without -o first, disregard a.out.
2679# It will help us diagnose broken compilers, and finding out an intuition
2680# of exeext.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002681{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2682echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002683ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002684#
2685# List of possible output files, starting from the most likely.
2686# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2687# only as a last resort. b.out is created by i960 compilers.
2688ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2689#
2690# The IRIX 6 linker writes into existing files which may not be
2691# executable, retaining their permissions. Remove them first so a
2692# subsequent execution test works.
2693ac_rmfiles=
2694for ac_file in $ac_files
2695do
2696 case $ac_file in
2697 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2698 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2699 esac
2700done
2701rm -f $ac_rmfiles
2702
2703if { (ac_try="$ac_link_default"
2704case "(($ac_try" in
2705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706 *) ac_try_echo=$ac_try;;
2707esac
2708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2709 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 ac_status=$?
2711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2712 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002713 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2714# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2715# in a Makefile. We should not override ac_cv_exeext if it was cached,
2716# so that the user can short-circuit this test for compilers unknown to
2717# Autoconf.
2718for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002719do
2720 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002722 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002723 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002724 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002725 # We found the default executable, but exeext='' is most
2726 # certainly right.
2727 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002728 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002729 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2730 then :; else
2731 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2732 fi
2733 # We set ac_cv_exeext here because the later test for it is not
2734 # safe: cross compilers may not add the suffix if given an `-o'
2735 # argument, so we may need to know it at that point already.
2736 # Even if this section looks crufty: it has the advantage of
2737 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002738 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002739 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002740 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 esac
2742done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002743test "$ac_cv_exeext" = no && ac_cv_exeext=
2744
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002745else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002746 ac_file=''
2747fi
2748
2749{ echo "$as_me:$LINENO: result: $ac_file" >&5
2750echo "${ECHO_T}$ac_file" >&6; }
2751if test -z "$ac_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002753sed 's/^/| /' conftest.$ac_ext >&5
2754
2755{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2756See \`config.log' for more details." >&5
2757echo "$as_me: error: C compiler cannot create executables
2758See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002760fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002761
Martin v. Löwis11437992002-04-12 09:54:03 +00002762ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002763
Martin v. Löwiseba40652007-08-30 20:10:57 +00002764# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002765# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002766{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2767echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002768# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2769# If not cross compiling, check that we can run a simple program.
2770if test "$cross_compiling" != yes; then
2771 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002772 { (case "(($ac_try" in
2773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774 *) ac_try_echo=$ac_try;;
2775esac
2776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2777 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 ac_status=$?
2779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2780 (exit $ac_status); }; }; then
2781 cross_compiling=no
2782 else
2783 if test "$cross_compiling" = maybe; then
2784 cross_compiling=yes
2785 else
2786 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002787If you meant to cross compile, use \`--host'.
2788See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002789echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002790If you meant to cross compile, use \`--host'.
2791See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002792 { (exit 1); exit 1; }; }
2793 fi
2794 fi
2795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796{ echo "$as_me:$LINENO: result: yes" >&5
2797echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002798
Skip Montanaro6dead952003-09-25 14:50:04 +00002799rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002800ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002801# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002802# the compiler is broken, or we cross compile.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002803{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2804echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2805{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2806echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002807
Martin v. Löwiseba40652007-08-30 20:10:57 +00002808{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2809echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2810if { (ac_try="$ac_link"
2811case "(($ac_try" in
2812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2813 *) ac_try_echo=$ac_try;;
2814esac
2815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2816 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002817 ac_status=$?
2818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2819 (exit $ac_status); }; then
2820 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2821# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2822# work properly (i.e., refer to `conftest.exe'), while it won't with
2823# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002824for ac_file in conftest.exe conftest conftest.*; do
2825 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002826 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002827 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002829 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 * ) break;;
2831 esac
2832done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002833else
Skip Montanaro6dead952003-09-25 14:50:04 +00002834 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2835See \`config.log' for more details." >&5
2836echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2837See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002838 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002839fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002840
Martin v. Löwis11437992002-04-12 09:54:03 +00002841rm -f conftest$ac_cv_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002842{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2843echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002844
2845rm -f conftest.$ac_ext
2846EXEEXT=$ac_cv_exeext
2847ac_exeext=$EXEEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002848{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2849echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002850if test "${ac_cv_objext+set}" = set; then
2851 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002852else
Martin v. Löwis11437992002-04-12 09:54:03 +00002853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002854/* confdefs.h. */
2855_ACEOF
2856cat confdefs.h >>conftest.$ac_ext
2857cat >>conftest.$ac_ext <<_ACEOF
2858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002859
Martin v. Löwis11437992002-04-12 09:54:03 +00002860int
2861main ()
2862{
2863
2864 ;
2865 return 0;
2866}
2867_ACEOF
2868rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002869if { (ac_try="$ac_compile"
2870case "(($ac_try" in
2871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2872 *) ac_try_echo=$ac_try;;
2873esac
2874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2875 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 ac_status=$?
2877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2878 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002879 for ac_file in conftest.o conftest.obj conftest.*; do
2880 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002881 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002882 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002883 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2884 break;;
2885 esac
2886done
2887else
2888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002889sed 's/^/| /' conftest.$ac_ext >&5
2890
2891{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2892See \`config.log' for more details." >&5
2893echo "$as_me: error: cannot compute suffix of object files: cannot compile
2894See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 { (exit 1); exit 1; }; }
2896fi
2897
2898rm -f conftest.$ac_cv_objext conftest.$ac_ext
2899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002900{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2901echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002902OBJEXT=$ac_cv_objext
2903ac_objext=$OBJEXT
Martin v. Löwiseba40652007-08-30 20:10:57 +00002904{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2905echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002906if test "${ac_cv_c_compiler_gnu+set}" = set; then
2907 echo $ECHO_N "(cached) $ECHO_C" >&6
2908else
2909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002910/* confdefs.h. */
2911_ACEOF
2912cat confdefs.h >>conftest.$ac_ext
2913cat >>conftest.$ac_ext <<_ACEOF
2914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002915
Martin v. Löwis11437992002-04-12 09:54:03 +00002916int
2917main ()
2918{
2919#ifndef __GNUC__
2920 choke me
2921#endif
2922
2923 ;
2924 return 0;
2925}
2926_ACEOF
2927rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002928if { (ac_try="$ac_compile"
2929case "(($ac_try" in
2930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2931 *) ac_try_echo=$ac_try;;
2932esac
2933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2934 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002936 grep -v '^ *+' conftest.er1 >conftest.err
2937 rm -f conftest.er1
2938 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002940 (exit $ac_status); } && {
2941 test -z "$ac_c_werror_flag" ||
2942 test ! -s conftest.err
2943 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 ac_compiler_gnu=yes
2945else
2946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002947sed 's/^/| /' conftest.$ac_ext >&5
2948
Martin v. Löwiseba40652007-08-30 20:10:57 +00002949 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002950fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002951
2952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002953ac_cv_c_compiler_gnu=$ac_compiler_gnu
2954
2955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002956{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2957echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002958GCC=`test $ac_compiler_gnu = yes && echo yes`
2959ac_test_CFLAGS=${CFLAGS+set}
2960ac_save_CFLAGS=$CFLAGS
Martin v. Löwiseba40652007-08-30 20:10:57 +00002961{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2962echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002963if test "${ac_cv_prog_cc_g+set}" = set; then
2964 echo $ECHO_N "(cached) $ECHO_C" >&6
2965else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002966 ac_save_c_werror_flag=$ac_c_werror_flag
2967 ac_c_werror_flag=yes
2968 ac_cv_prog_cc_g=no
2969 CFLAGS="-g"
2970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002971/* confdefs.h. */
2972_ACEOF
2973cat confdefs.h >>conftest.$ac_ext
2974cat >>conftest.$ac_ext <<_ACEOF
2975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002976
Martin v. Löwis11437992002-04-12 09:54:03 +00002977int
2978main ()
2979{
2980
2981 ;
2982 return 0;
2983}
2984_ACEOF
2985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002986if { (ac_try="$ac_compile"
2987case "(($ac_try" in
2988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2989 *) ac_try_echo=$ac_try;;
2990esac
2991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002994 grep -v '^ *+' conftest.er1 >conftest.err
2995 rm -f conftest.er1
2996 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002998 (exit $ac_status); } && {
2999 test -z "$ac_c_werror_flag" ||
3000 test ! -s conftest.err
3001 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003002 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003003else
Martin v. Löwis11437992002-04-12 09:54:03 +00003004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003005sed 's/^/| /' conftest.$ac_ext >&5
3006
Martin v. Löwiseba40652007-08-30 20:10:57 +00003007 CFLAGS=""
3008 cat >conftest.$ac_ext <<_ACEOF
3009/* confdefs.h. */
3010_ACEOF
3011cat confdefs.h >>conftest.$ac_ext
3012cat >>conftest.$ac_ext <<_ACEOF
3013/* end confdefs.h. */
3014
3015int
3016main ()
3017{
3018
3019 ;
3020 return 0;
3021}
3022_ACEOF
3023rm -f conftest.$ac_objext
3024if { (ac_try="$ac_compile"
3025case "(($ac_try" in
3026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3027 *) ac_try_echo=$ac_try;;
3028esac
3029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3030 (eval "$ac_compile") 2>conftest.er1
3031 ac_status=$?
3032 grep -v '^ *+' conftest.er1 >conftest.err
3033 rm -f conftest.er1
3034 cat conftest.err >&5
3035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3036 (exit $ac_status); } && {
3037 test -z "$ac_c_werror_flag" ||
3038 test ! -s conftest.err
3039 } && test -s conftest.$ac_objext; then
3040 :
3041else
3042 echo "$as_me: failed program was:" >&5
3043sed 's/^/| /' conftest.$ac_ext >&5
3044
3045 ac_c_werror_flag=$ac_save_c_werror_flag
3046 CFLAGS="-g"
3047 cat >conftest.$ac_ext <<_ACEOF
3048/* confdefs.h. */
3049_ACEOF
3050cat confdefs.h >>conftest.$ac_ext
3051cat >>conftest.$ac_ext <<_ACEOF
3052/* end confdefs.h. */
3053
3054int
3055main ()
3056{
3057
3058 ;
3059 return 0;
3060}
3061_ACEOF
3062rm -f conftest.$ac_objext
3063if { (ac_try="$ac_compile"
3064case "(($ac_try" in
3065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3066 *) ac_try_echo=$ac_try;;
3067esac
3068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3069 (eval "$ac_compile") 2>conftest.er1
3070 ac_status=$?
3071 grep -v '^ *+' conftest.er1 >conftest.err
3072 rm -f conftest.er1
3073 cat conftest.err >&5
3074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3075 (exit $ac_status); } && {
3076 test -z "$ac_c_werror_flag" ||
3077 test ! -s conftest.err
3078 } && test -s conftest.$ac_objext; then
3079 ac_cv_prog_cc_g=yes
3080else
3081 echo "$as_me: failed program was:" >&5
3082sed 's/^/| /' conftest.$ac_ext >&5
3083
3084
Guido van Rossum627b2d71993-12-24 10:39:16 +00003085fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003086
3087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003088fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003089
3090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3091fi
3092
3093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3094 ac_c_werror_flag=$ac_save_c_werror_flag
3095fi
3096{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3097echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003098if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003099 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003100elif test $ac_cv_prog_cc_g = yes; then
3101 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003102 CFLAGS="-g -O2"
3103 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003104 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003105 fi
3106else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003107 if test "$GCC" = yes; then
3108 CFLAGS="-O2"
3109 else
3110 CFLAGS=
3111 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003113{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3114echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3115if test "${ac_cv_prog_cc_c89+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003116 echo $ECHO_N "(cached) $ECHO_C" >&6
3117else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003118 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003119ac_save_CC=$CC
3120cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003121/* confdefs.h. */
3122_ACEOF
3123cat confdefs.h >>conftest.$ac_ext
3124cat >>conftest.$ac_ext <<_ACEOF
3125/* end confdefs.h. */
3126#include <stdarg.h>
3127#include <stdio.h>
3128#include <sys/types.h>
3129#include <sys/stat.h>
3130/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3131struct buf { int x; };
3132FILE * (*rcsopen) (struct buf *, struct stat *, int);
3133static char *e (p, i)
3134 char **p;
3135 int i;
3136{
3137 return p[i];
3138}
3139static char *f (char * (*g) (char **, int), char **p, ...)
3140{
3141 char *s;
3142 va_list v;
3143 va_start (v,p);
3144 s = g (p, va_arg (v,int));
3145 va_end (v);
3146 return s;
3147}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003148
3149/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3150 function prototypes and stuff, but not '\xHH' hex character constants.
3151 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003153 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3154 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003155 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003156int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3157
Martin v. Löwiseba40652007-08-30 20:10:57 +00003158/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3159 inside strings and character constants. */
3160#define FOO(x) 'x'
3161int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3162
Skip Montanaro6dead952003-09-25 14:50:04 +00003163int test (int i, double x);
3164struct s1 {int (*f) (int a);};
3165struct s2 {int (*f) (double a);};
3166int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3167int argc;
3168char **argv;
3169int
3170main ()
3171{
3172return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3173 ;
3174 return 0;
3175}
3176_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3178 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003179do
3180 CC="$ac_save_CC $ac_arg"
3181 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182if { (ac_try="$ac_compile"
3183case "(($ac_try" in
3184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3185 *) ac_try_echo=$ac_try;;
3186esac
3187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3188 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003189 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003190 grep -v '^ *+' conftest.er1 >conftest.err
3191 rm -f conftest.er1
3192 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003194 (exit $ac_status); } && {
3195 test -z "$ac_c_werror_flag" ||
3196 test ! -s conftest.err
3197 } && test -s conftest.$ac_objext; then
3198 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003199else
3200 echo "$as_me: failed program was:" >&5
3201sed 's/^/| /' conftest.$ac_ext >&5
3202
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203
Skip Montanaro6dead952003-09-25 14:50:04 +00003204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003205
3206rm -f core conftest.err conftest.$ac_objext
3207 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003208done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003209rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003210CC=$ac_save_CC
3211
3212fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213# AC_CACHE_VAL
3214case "x$ac_cv_prog_cc_c89" in
3215 x)
3216 { echo "$as_me:$LINENO: result: none needed" >&5
3217echo "${ECHO_T}none needed" >&6; } ;;
3218 xno)
3219 { echo "$as_me:$LINENO: result: unsupported" >&5
3220echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003221 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003222 CC="$CC $ac_cv_prog_cc_c89"
3223 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3224echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003225esac
3226
Skip Montanaro6dead952003-09-25 14:50:04 +00003227
Martin v. Löwis11437992002-04-12 09:54:03 +00003228ac_ext=c
3229ac_cpp='$CPP $CPPFLAGS'
3230ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3231ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3232ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003233
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003234
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003235
3236
Martin v. Löwiseba40652007-08-30 20:10:57 +00003237{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3238echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003239
Martin v. Löwiseba40652007-08-30 20:10:57 +00003240# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003241if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003242 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003243
3244 case $withval in
3245 no) with_cxx_main=no
3246 MAINCC='$(CC)';;
3247 yes) with_cxx_main=yes
3248 MAINCC='$(CXX)';;
3249 *) with_cxx_main=yes
3250 MAINCC=$withval
3251 if test -z "$CXX"
3252 then
3253 CXX=$withval
3254 fi;;
3255 esac
3256else
3257
3258 with_cxx_main=no
3259 MAINCC='$(CC)'
3260
Martin v. Löwiseba40652007-08-30 20:10:57 +00003261fi
3262
3263{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3264echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003265
3266preset_cxx="$CXX"
3267if test -z "$CXX"
3268then
3269 case "$CC" in
3270 gcc) # Extract the first word of "g++", so it can be a program name with args.
3271set dummy g++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003274if test "${ac_cv_path_CXX+set}" = set; then
3275 echo $ECHO_N "(cached) $ECHO_C" >&6
3276else
3277 case $CXX in
3278 [\\/]* | ?:[\\/]*)
3279 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3280 ;;
3281 *)
3282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283for as_dir in notfound
3284do
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003288 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 +00003289 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3290 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3291 break 2
3292 fi
3293done
3294done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003295IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003296
3297 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3298 ;;
3299esac
3300fi
3301CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003302if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003303 { echo "$as_me:$LINENO: result: $CXX" >&5
3304echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003305else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 { echo "$as_me:$LINENO: result: no" >&5
3307echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003310 ;;
3311 cc) # Extract the first word of "c++", so it can be a program name with args.
3312set dummy c++; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003313{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3314echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003315if test "${ac_cv_path_CXX+set}" = set; then
3316 echo $ECHO_N "(cached) $ECHO_C" >&6
3317else
3318 case $CXX in
3319 [\\/]* | ?:[\\/]*)
3320 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3321 ;;
3322 *)
3323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3324for as_dir in notfound
3325do
3326 IFS=$as_save_IFS
3327 test -z "$as_dir" && as_dir=.
3328 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003329 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 +00003330 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
3331 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3332 break 2
3333 fi
3334done
3335done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003336IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003337
3338 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3339 ;;
3340esac
3341fi
3342CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003343if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003344 { echo "$as_me:$LINENO: result: $CXX" >&5
3345echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003346else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003347 { echo "$as_me:$LINENO: result: no" >&5
3348echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003350
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003351 ;;
3352 esac
3353 if test "$CXX" = "notfound"
3354 then
3355 CXX=""
3356 fi
3357fi
3358if test -z "$CXX"
3359then
3360 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3361do
3362 # Extract the first word of "$ac_prog", so it can be a program name with args.
3363set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00003364{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3365echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003366if test "${ac_cv_prog_CXX+set}" = set; then
3367 echo $ECHO_N "(cached) $ECHO_C" >&6
3368else
3369 if test -n "$CXX"; then
3370 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3371else
3372as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3373for as_dir in $PATH
3374do
3375 IFS=$as_save_IFS
3376 test -z "$as_dir" && as_dir=.
3377 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003378 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 +00003379 ac_cv_prog_CXX="$ac_prog"
3380 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3381 break 2
3382 fi
3383done
3384done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003385IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003386
3387fi
3388fi
3389CXX=$ac_cv_prog_CXX
3390if test -n "$CXX"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003391 { echo "$as_me:$LINENO: result: $CXX" >&5
3392echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003393else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003394 { echo "$as_me:$LINENO: result: no" >&5
3395echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003396fi
3397
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003399 test -n "$CXX" && break
3400done
3401test -n "$CXX" || CXX="notfound"
3402
3403 if test "$CXX" = "notfound"
3404 then
3405 CXX=""
3406 fi
3407fi
3408if test "$preset_cxx" != "$CXX"
3409then
3410 { echo "$as_me:$LINENO: WARNING:
3411
3412 By default, distutils will build C++ extension modules with \"$CXX\".
3413 If this is not intended, then set CXX on the configure command line.
3414 " >&5
3415echo "$as_me: WARNING:
3416
3417 By default, distutils will build C++ extension modules with \"$CXX\".
3418 If this is not intended, then set CXX on the configure command line.
3419 " >&2;}
3420fi
3421
3422
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003423# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003424
3425ac_ext=c
3426ac_cpp='$CPP $CPPFLAGS'
3427ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3428ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3429ac_compiler_gnu=$ac_cv_c_compiler_gnu
Martin v. Löwiseba40652007-08-30 20:10:57 +00003430{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3431echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003432# On Suns, sometimes $CPP names a directory.
3433if test -n "$CPP" && test -d "$CPP"; then
3434 CPP=
3435fi
3436if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 if test "${ac_cv_prog_CPP+set}" = set; then
3438 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003439else
Martin v. Löwis11437992002-04-12 09:54:03 +00003440 # Double quotes because CPP needs to be expanded
3441 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3442 do
3443 ac_preproc_ok=false
3444for ac_c_preproc_warn_flag in '' yes
3445do
3446 # Use a header file that comes with gcc, so configuring glibc
3447 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003448 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3449 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003450 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 # not just through cpp. "Syntax error" is here to catch this case.
3452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003453/* confdefs.h. */
3454_ACEOF
3455cat confdefs.h >>conftest.$ac_ext
3456cat >>conftest.$ac_ext <<_ACEOF
3457/* end confdefs.h. */
3458#ifdef __STDC__
3459# include <limits.h>
3460#else
3461# include <assert.h>
3462#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003463 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003464_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003465if { (ac_try="$ac_cpp conftest.$ac_ext"
3466case "(($ac_try" in
3467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3468 *) ac_try_echo=$ac_try;;
3469esac
3470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3471 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003472 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003473 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003474 rm -f conftest.er1
3475 cat conftest.err >&5
3476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003477 (exit $ac_status); } >/dev/null && {
3478 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3479 test ! -s conftest.err
3480 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003481 :
3482else
Martin v. Löwis11437992002-04-12 09:54:03 +00003483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003484sed 's/^/| /' conftest.$ac_ext >&5
3485
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 # Broken: fails on valid input.
3487continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003489
Martin v. Löwis11437992002-04-12 09:54:03 +00003490rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003491
Martin v. Löwiseba40652007-08-30 20:10:57 +00003492 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 # can be detected and how.
3494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003495/* confdefs.h. */
3496_ACEOF
3497cat confdefs.h >>conftest.$ac_ext
3498cat >>conftest.$ac_ext <<_ACEOF
3499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003500#include <ac_nonexistent.h>
3501_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502if { (ac_try="$ac_cpp conftest.$ac_ext"
3503case "(($ac_try" in
3504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505 *) ac_try_echo=$ac_try;;
3506esac
3507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3508 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003509 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003510 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003511 rm -f conftest.er1
3512 cat conftest.err >&5
3513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003514 (exit $ac_status); } >/dev/null && {
3515 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3516 test ! -s conftest.err
3517 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003518 # Broken: success on invalid input.
3519continue
3520else
3521 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003522sed 's/^/| /' conftest.$ac_ext >&5
3523
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 # Passes both tests.
3525ac_preproc_ok=:
3526break
3527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528
Martin v. Löwis11437992002-04-12 09:54:03 +00003529rm -f conftest.err conftest.$ac_ext
3530
3531done
3532# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3533rm -f conftest.err conftest.$ac_ext
3534if $ac_preproc_ok; then
3535 break
3536fi
3537
3538 done
3539 ac_cv_prog_CPP=$CPP
3540
3541fi
3542 CPP=$ac_cv_prog_CPP
3543else
3544 ac_cv_prog_CPP=$CPP
3545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003546{ echo "$as_me:$LINENO: result: $CPP" >&5
3547echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003548ac_preproc_ok=false
3549for ac_c_preproc_warn_flag in '' yes
3550do
3551 # Use a header file that comes with gcc, so configuring glibc
3552 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003553 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3554 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003555 # On the NeXT, cc -E runs the code through the compiler's parser,
3556 # not just through cpp. "Syntax error" is here to catch this case.
3557 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003558/* confdefs.h. */
3559_ACEOF
3560cat confdefs.h >>conftest.$ac_ext
3561cat >>conftest.$ac_ext <<_ACEOF
3562/* end confdefs.h. */
3563#ifdef __STDC__
3564# include <limits.h>
3565#else
3566# include <assert.h>
3567#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003568 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003569_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003570if { (ac_try="$ac_cpp conftest.$ac_ext"
3571case "(($ac_try" in
3572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3573 *) ac_try_echo=$ac_try;;
3574esac
3575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3576 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003578 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003579 rm -f conftest.er1
3580 cat conftest.err >&5
3581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003582 (exit $ac_status); } >/dev/null && {
3583 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3584 test ! -s conftest.err
3585 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 :
3587else
3588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003589sed 's/^/| /' conftest.$ac_ext >&5
3590
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 # Broken: fails on valid input.
3592continue
3593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595rm -f conftest.err conftest.$ac_ext
3596
Martin v. Löwiseba40652007-08-30 20:10:57 +00003597 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003598 # can be detected and how.
3599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003600/* confdefs.h. */
3601_ACEOF
3602cat confdefs.h >>conftest.$ac_ext
3603cat >>conftest.$ac_ext <<_ACEOF
3604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003605#include <ac_nonexistent.h>
3606_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003607if { (ac_try="$ac_cpp conftest.$ac_ext"
3608case "(($ac_try" in
3609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3610 *) ac_try_echo=$ac_try;;
3611esac
3612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3613 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003615 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003616 rm -f conftest.er1
3617 cat conftest.err >&5
3618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003619 (exit $ac_status); } >/dev/null && {
3620 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3621 test ! -s conftest.err
3622 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 # Broken: success on invalid input.
3624continue
3625else
3626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003627sed 's/^/| /' conftest.$ac_ext >&5
3628
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 # Passes both tests.
3630ac_preproc_ok=:
3631break
3632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003633
Martin v. Löwis11437992002-04-12 09:54:03 +00003634rm -f conftest.err conftest.$ac_ext
3635
3636done
3637# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3638rm -f conftest.err conftest.$ac_ext
3639if $ac_preproc_ok; then
3640 :
3641else
Skip Montanaro6dead952003-09-25 14:50:04 +00003642 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3643See \`config.log' for more details." >&5
3644echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3645See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 { (exit 1); exit 1; }; }
3647fi
3648
3649ac_ext=c
3650ac_cpp='$CPP $CPPFLAGS'
3651ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3652ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3653ac_compiler_gnu=$ac_cv_c_compiler_gnu
3654
3655
Martin v. Löwiseba40652007-08-30 20:10:57 +00003656{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3657echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3658if test "${ac_cv_path_GREP+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003659 echo $ECHO_N "(cached) $ECHO_C" >&6
3660else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003661 # Extract the first word of "grep ggrep" to use in msg output
3662if test -z "$GREP"; then
3663set dummy grep ggrep; ac_prog_name=$2
3664if test "${ac_cv_path_GREP+set}" = set; then
3665 echo $ECHO_N "(cached) $ECHO_C" >&6
3666else
3667 ac_path_GREP_found=false
3668# Loop through the user's path and test for each of PROGNAME-LIST
3669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3670for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3671do
3672 IFS=$as_save_IFS
3673 test -z "$as_dir" && as_dir=.
3674 for ac_prog in grep ggrep; do
3675 for ac_exec_ext in '' $ac_executable_extensions; do
3676 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3677 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3678 # Check for GNU ac_path_GREP and select it if it is found.
3679 # Check for GNU $ac_path_GREP
3680case `"$ac_path_GREP" --version 2>&1` in
3681*GNU*)
3682 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3683*)
3684 ac_count=0
3685 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3686 while :
3687 do
3688 cat "conftest.in" "conftest.in" >"conftest.tmp"
3689 mv "conftest.tmp" "conftest.in"
3690 cp "conftest.in" "conftest.nl"
3691 echo 'GREP' >> "conftest.nl"
3692 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3693 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3694 ac_count=`expr $ac_count + 1`
3695 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3696 # Best one so far, save it but keep looking for a better one
3697 ac_cv_path_GREP="$ac_path_GREP"
3698 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003699 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003700 # 10*(2^10) chars as input seems more than enough
3701 test $ac_count -gt 10 && break
3702 done
3703 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3704esac
3705
3706
3707 $ac_path_GREP_found && break 3
3708 done
3709done
3710
3711done
3712IFS=$as_save_IFS
3713
3714
Skip Montanaro6dead952003-09-25 14:50:04 +00003715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003716
3717GREP="$ac_cv_path_GREP"
3718if test -z "$GREP"; then
3719 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3720echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3721 { (exit 1); exit 1; }; }
3722fi
3723
3724else
3725 ac_cv_path_GREP=$GREP
3726fi
3727
3728
3729fi
3730{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3731echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3732 GREP="$ac_cv_path_GREP"
3733
3734
3735{ echo "$as_me:$LINENO: checking for egrep" >&5
3736echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3737if test "${ac_cv_path_EGREP+set}" = set; then
3738 echo $ECHO_N "(cached) $ECHO_C" >&6
3739else
3740 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3741 then ac_cv_path_EGREP="$GREP -E"
3742 else
3743 # Extract the first word of "egrep" to use in msg output
3744if test -z "$EGREP"; then
3745set dummy egrep; ac_prog_name=$2
3746if test "${ac_cv_path_EGREP+set}" = set; then
3747 echo $ECHO_N "(cached) $ECHO_C" >&6
3748else
3749 ac_path_EGREP_found=false
3750# Loop through the user's path and test for each of PROGNAME-LIST
3751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3752for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3753do
3754 IFS=$as_save_IFS
3755 test -z "$as_dir" && as_dir=.
3756 for ac_prog in egrep; do
3757 for ac_exec_ext in '' $ac_executable_extensions; do
3758 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3759 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3760 # Check for GNU ac_path_EGREP and select it if it is found.
3761 # Check for GNU $ac_path_EGREP
3762case `"$ac_path_EGREP" --version 2>&1` in
3763*GNU*)
3764 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3765*)
3766 ac_count=0
3767 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3768 while :
3769 do
3770 cat "conftest.in" "conftest.in" >"conftest.tmp"
3771 mv "conftest.tmp" "conftest.in"
3772 cp "conftest.in" "conftest.nl"
3773 echo 'EGREP' >> "conftest.nl"
3774 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3775 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3776 ac_count=`expr $ac_count + 1`
3777 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3778 # Best one so far, save it but keep looking for a better one
3779 ac_cv_path_EGREP="$ac_path_EGREP"
3780 ac_path_EGREP_max=$ac_count
3781 fi
3782 # 10*(2^10) chars as input seems more than enough
3783 test $ac_count -gt 10 && break
3784 done
3785 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3786esac
3787
3788
3789 $ac_path_EGREP_found && break 3
3790 done
3791done
3792
3793done
3794IFS=$as_save_IFS
3795
3796
3797fi
3798
3799EGREP="$ac_cv_path_EGREP"
3800if test -z "$EGREP"; then
3801 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3802echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3803 { (exit 1); exit 1; }; }
3804fi
3805
3806else
3807 ac_cv_path_EGREP=$EGREP
3808fi
3809
3810
3811 fi
3812fi
3813{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3814echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3815 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003816
3817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818
Martin v. Löwiseba40652007-08-30 20:10:57 +00003819{ echo "$as_me:$LINENO: checking for AIX" >&5
3820echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003821cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003822/* confdefs.h. */
3823_ACEOF
3824cat confdefs.h >>conftest.$ac_ext
3825cat >>conftest.$ac_ext <<_ACEOF
3826/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003827#ifdef _AIX
3828 yes
3829#endif
3830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003833 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003834 { echo "$as_me:$LINENO: result: yes" >&5
3835echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003836cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003837#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003838_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003839
3840else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003841 { echo "$as_me:$LINENO: result: no" >&5
3842echo "${ECHO_T}no" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003843fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +00003844rm -f -r conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003845
Michael W. Hudson54241132001-12-07 15:38:26 +00003846
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003847
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003848# Check for unsupported systems
3849case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003850atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003851 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3852 echo See README for details.
3853 exit 1;;
3854esac
3855
Michael W. Hudson54241132001-12-07 15:38:26 +00003856
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3858echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003859
Martin v. Löwiseba40652007-08-30 20:10:57 +00003860# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003861if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003862 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003863 case $withval in
3864 no) EXEEXT=;;
3865 yes) EXEEXT=.exe;;
3866 *) EXEEXT=$withval;;
3867 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003868fi
3869
3870{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3871echo "${ECHO_T}$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003872
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003873# Test whether we're running on a non-case-sensitive system, in which
3874# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003875
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3877echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00003878if test ! -d CaseSensitiveTestDir; then
3879mkdir CaseSensitiveTestDir
3880fi
3881
3882if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003883then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003884 { echo "$as_me:$LINENO: result: yes" >&5
3885echo "${ECHO_T}yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00003886 BUILDEXEEXT=.exe
3887else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003888 { echo "$as_me:$LINENO: result: no" >&5
3889echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003890 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003891fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003892rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003893
Guido van Rossumdd997f71998-10-07 19:58:26 +00003894case $MACHDEP in
3895bsdos*)
3896 case $CC in
3897 gcc) CC="$CC -D_HAVE_BSDI";;
3898 esac;;
3899esac
3900
Guido van Rossum24b1e751997-08-21 02:29:16 +00003901case $ac_sys_system in
3902hp*|HP*)
3903 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003904 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003905 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003906Monterey*)
3907 case $CC in
3908 cc) CC="$CC -Wl,-Bexport";;
3909 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003910SunOS*)
3911 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003912
3913cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003914#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003915_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003916
3917 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003918esac
3919
Michael W. Hudson54241132001-12-07 15:38:26 +00003920
3921
Martin v. Löwiseba40652007-08-30 20:10:57 +00003922{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3923echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003924if test -z "$LIBRARY"
3925then
3926 LIBRARY='libpython$(VERSION).a'
3927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003928{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3929echo "${ECHO_T}$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003930
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003931# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003932# name of the library into which to insert object files). BLDLIBRARY is also
3933# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3934# is blank as the main program is not linked directly against LDLIBRARY.
3935# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3936# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3937# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3938# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003939#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003940# RUNSHARED is used to run shared python without installed libraries
3941#
3942# INSTSONAME is the name of the shared library that will be use to install
3943# on the system - some systems like version suffix, others don't
3944
3945
Michael W. Hudson54241132001-12-07 15:38:26 +00003946
3947
3948
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003949
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003950LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003951BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003952INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003953DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003954LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003955RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003956
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003957# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003958# If CXX is set, and if it is needed to link a main function that was
3959# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3960# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003961# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003962# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003963
Martin v. Löwiseba40652007-08-30 20:10:57 +00003964{ echo "$as_me:$LINENO: checking LINKCC" >&5
3965echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003966if test -z "$LINKCC"
3967then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003968 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003969 case $ac_sys_system in
3970 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003971 exp_extra="\"\""
3972 if test $ac_sys_release -ge 5 -o \
3973 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3974 exp_extra="."
3975 fi
3976 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003977 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003978 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003979 QNX*)
3980 # qcc must be used because the other compilers do not
3981 # support -N.
3982 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003983 esac
3984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003985{ echo "$as_me:$LINENO: result: $LINKCC" >&5
3986echo "${ECHO_T}$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003987
Martin v. Löwiseba40652007-08-30 20:10:57 +00003988{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
3989echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
3990# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003991if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003992 enableval=$enable_shared;
3993fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003994
Martin v. Löwis1142de32002-03-29 16:28:31 +00003995
3996if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003997then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003998 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003999 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004000 enable_shared="yes";;
4001 *)
4002 enable_shared="no";;
4003 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004004fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4006echo "${ECHO_T}$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004007
Martin v. Löwiseba40652007-08-30 20:10:57 +00004008{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4009echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
4010# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004011if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004012 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004013 CC="$CC -pg"
4014 if test "$cross_compiling" = yes; then
4015 ac_enable_profiling="no"
4016else
4017 cat >conftest.$ac_ext <<_ACEOF
4018/* confdefs.h. */
4019_ACEOF
4020cat confdefs.h >>conftest.$ac_ext
4021cat >>conftest.$ac_ext <<_ACEOF
4022/* end confdefs.h. */
4023int main() { return 0; }
4024_ACEOF
4025rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004026if { (ac_try="$ac_link"
4027case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
4031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4032 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004033 ac_status=$?
4034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4035 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004036 { (case "(($ac_try" in
4037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038 *) ac_try_echo=$ac_try;;
4039esac
4040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4041 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004042 ac_status=$?
4043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); }; }; then
4045 ac_enable_profiling="yes"
4046else
4047 echo "$as_me: program exited with status $ac_status" >&5
4048echo "$as_me: failed program was:" >&5
4049sed 's/^/| /' conftest.$ac_ext >&5
4050
4051( exit $ac_status )
4052ac_enable_profiling="no"
4053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004054rm -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 +00004055fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004056
4057
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004058 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004059fi
4060
4061{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4062echo "${ECHO_T}$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004063
4064case "$ac_enable_profiling" in
4065 "yes")
4066 BASECFLAGS="-pg $BASECFLAGS"
4067 LDFLAGS="-pg $LDFLAGS"
4068 ;;
4069esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004070
Martin v. Löwiseba40652007-08-30 20:10:57 +00004071{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4072echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004073
Guido van Rossumb8552162001-09-05 14:58:11 +00004074# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4075# library that we build, but we do not want to link against it (we
4076# will find it with a -framework option). For this reason there is an
4077# extra variable BLDLIBRARY against which Python and the extension
4078# modules are linked, BLDLIBRARY. This is normally the same as
4079# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004080if test "$enable_framework"
4081then
4082 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004083 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004084 BLDLIBRARY=''
4085else
4086 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004087fi
Jack Jansene578a632001-08-15 01:27:14 +00004088
Martin v. Löwis1142de32002-03-29 16:28:31 +00004089# Other platforms follow
4090if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004091
4092cat >>confdefs.h <<\_ACEOF
4093#define Py_ENABLE_SHARED 1
4094_ACEOF
4095
Martin v. Löwis1142de32002-03-29 16:28:31 +00004096 case $ac_sys_system in
4097 BeOS*)
4098 LDLIBRARY='libpython$(VERSION).so'
4099 ;;
4100 CYGWIN*)
4101 LDLIBRARY='libpython$(VERSION).dll.a'
4102 DLLLIBRARY='libpython$(VERSION).dll'
4103 ;;
4104 SunOS*)
4105 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004106 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004107 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004108 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004109 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004110 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004111 LDLIBRARY='libpython$(VERSION).so'
4112 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004113 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004114 case $ac_sys_system in
4115 FreeBSD*)
4116 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4117 ;;
4118 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004119 INSTSONAME="$LDLIBRARY".$SOVERSION
4120 ;;
4121 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004122 case `uname -m` in
4123 ia64)
4124 LDLIBRARY='libpython$(VERSION).so'
4125 ;;
4126 *)
4127 LDLIBRARY='libpython$(VERSION).sl'
4128 ;;
4129 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004130 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004131 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004132 ;;
4133 OSF*)
4134 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004135 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004136 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004137 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004138 atheos*)
4139 LDLIBRARY='libpython$(VERSION).so'
4140 BLDLIBRARY='-L. -lpython$(VERSION)'
4141 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4142 ;;
Ronald Oussorene9cce8e2009-01-02 10:46:42 +00004143 Darwin*)
4144 LDLIBRARY='libpython$(VERSION).dylib'
4145 BLDLIBRARY='-L. -lpython$(VERSION)'
4146 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4147 ;;
4148
Martin v. Löwis1142de32002-03-29 16:28:31 +00004149 esac
Jason Tishler30765592003-09-04 11:04:06 +00004150else # shared is disabled
4151 case $ac_sys_system in
4152 CYGWIN*)
4153 BLDLIBRARY='$(LIBRARY)'
4154 LDLIBRARY='libpython$(VERSION).dll.a'
4155 ;;
4156 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004157fi
4158
Martin v. Löwiseba40652007-08-30 20:10:57 +00004159{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4160echo "${ECHO_T}$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004161
Martin v. Löwis11437992002-04-12 09:54:03 +00004162if test -n "$ac_tool_prefix"; then
4163 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4164set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004165{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4166echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004167if test "${ac_cv_prog_RANLIB+set}" = set; then
4168 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004169else
4170 if test -n "$RANLIB"; then
4171 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4172else
Martin v. Löwis11437992002-04-12 09:54:03 +00004173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179 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 +00004180 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4182 break 2
4183 fi
4184done
4185done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004186IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004187
Guido van Rossum627b2d71993-12-24 10:39:16 +00004188fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004190RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191if test -n "$RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4193echo "${ECHO_T}$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004194else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004195 { echo "$as_me:$LINENO: result: no" >&5
4196echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004197fi
4198
Martin v. Löwiseba40652007-08-30 20:10:57 +00004199
Martin v. Löwis11437992002-04-12 09:54:03 +00004200fi
4201if test -z "$ac_cv_prog_RANLIB"; then
4202 ac_ct_RANLIB=$RANLIB
4203 # Extract the first word of "ranlib", so it can be a program name with args.
4204set dummy ranlib; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004205{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4206echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004207if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4208 echo $ECHO_N "(cached) $ECHO_C" >&6
4209else
4210 if test -n "$ac_ct_RANLIB"; then
4211 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4212else
4213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4214for as_dir in $PATH
4215do
4216 IFS=$as_save_IFS
4217 test -z "$as_dir" && as_dir=.
4218 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004219 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 +00004220 ac_cv_prog_ac_ct_RANLIB="ranlib"
4221 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4222 break 2
4223 fi
4224done
4225done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004226IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004227
Martin v. Löwis11437992002-04-12 09:54:03 +00004228fi
4229fi
4230ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4231if test -n "$ac_ct_RANLIB"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004232 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4233echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004234else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004235 { echo "$as_me:$LINENO: result: no" >&5
4236echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004237fi
4238
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 if test "x$ac_ct_RANLIB" = x; then
4240 RANLIB=":"
4241 else
4242 case $cross_compiling:$ac_tool_warned in
4243yes:)
4244{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4245whose name does not start with the host triplet. If you think this
4246configuration is useful to you, please write to autoconf@gnu.org." >&5
4247echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4248whose name does not start with the host triplet. If you think this
4249configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4250ac_tool_warned=yes ;;
4251esac
4252 RANLIB=$ac_ct_RANLIB
4253 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004254else
4255 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004257
4258
Guido van Rossum7f43da71994-08-01 12:15:30 +00004259for ac_prog in ar aal
4260do
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004263{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4264echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004265if test "${ac_cv_prog_AR+set}" = set; then
4266 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267else
4268 if test -n "$AR"; then
4269 ac_cv_prog_AR="$AR" # Let the user override the test.
4270else
Martin v. Löwis11437992002-04-12 09:54:03 +00004271as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4272for as_dir in $PATH
4273do
4274 IFS=$as_save_IFS
4275 test -z "$as_dir" && as_dir=.
4276 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004277 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 +00004278 ac_cv_prog_AR="$ac_prog"
4279 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4280 break 2
4281 fi
4282done
4283done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004284IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004285
Guido van Rossum7f43da71994-08-01 12:15:30 +00004286fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004288AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289if test -n "$AR"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004290 { echo "$as_me:$LINENO: result: $AR" >&5
4291echo "${ECHO_T}$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004292else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004293 { echo "$as_me:$LINENO: result: no" >&5
4294echo "${ECHO_T}no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004296
Martin v. Löwiseba40652007-08-30 20:10:57 +00004297
Martin v. Löwis11437992002-04-12 09:54:03 +00004298 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004299done
4300test -n "$AR" || AR="ar"
4301
Michael W. Hudson54241132001-12-07 15:38:26 +00004302
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004303
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004304# Extract the first word of "svnversion", so it can be a program name with args.
4305set dummy svnversion; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004308if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4309 echo $ECHO_N "(cached) $ECHO_C" >&6
4310else
4311 if test -n "$SVNVERSION"; then
4312 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4313else
4314as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4315for as_dir in $PATH
4316do
4317 IFS=$as_save_IFS
4318 test -z "$as_dir" && as_dir=.
4319 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004320 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 +00004321 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004322 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4323 break 2
4324 fi
4325done
4326done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004327IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004328
Martin v. Löwisff600232006-04-03 19:12:32 +00004329 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004330fi
4331fi
4332SVNVERSION=$ac_cv_prog_SVNVERSION
4333if test -n "$SVNVERSION"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4335echo "${ECHO_T}$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004336else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004337 { echo "$as_me:$LINENO: result: no" >&5
4338echo "${ECHO_T}no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004339fi
4340
Martin v. Löwiseba40652007-08-30 20:10:57 +00004341
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004342if test $SVNVERSION = found
4343then
4344 SVNVERSION="svnversion \$(srcdir)"
4345else
Benjamin Peterson2eb65452009-05-23 19:35:33 +00004346 SVNVERSION="echo Unversioned directory"
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004347fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004348
Neil Schemenauera42c8272001-03-31 00:01:55 +00004349case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004350bsdos*|hp*|HP*)
4351 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004352 if test -z "$INSTALL"
4353 then
4354 INSTALL="${srcdir}/install-sh -c"
4355 fi
4356esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004357ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004358for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4359 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004360 ac_aux_dir=$ac_dir
4361 ac_install_sh="$ac_aux_dir/install-sh -c"
4362 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004363 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004364 ac_aux_dir=$ac_dir
4365 ac_install_sh="$ac_aux_dir/install.sh -c"
4366 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004367 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004368 ac_aux_dir=$ac_dir
4369 ac_install_sh="$ac_aux_dir/shtool install -c"
4370 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004371 fi
4372done
4373if test -z "$ac_aux_dir"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004374 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4375echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004376 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004378
4379# These three variables are undocumented and unsupported,
4380# and are intended to be withdrawn in a future Autoconf release.
4381# They can cause serious problems if a builder's source tree is in a directory
4382# whose full name contains unusual characters.
4383ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4384ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4385ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4386
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004387
4388# Find a good install program. We prefer a C program (faster),
4389# so one script is as good as another. But avoid the broken or
4390# incompatible versions:
4391# SysV /etc/install, /usr/sbin/install
4392# SunOS /usr/etc/install
4393# IRIX /sbin/install
4394# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00004395# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004396# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4397# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4398# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00004399# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004400# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004401{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4402echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004403if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004404if test "${ac_cv_path_install+set}" = set; then
4405 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004406else
Martin v. Löwis11437992002-04-12 09:54:03 +00004407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4408for as_dir in $PATH
4409do
4410 IFS=$as_save_IFS
4411 test -z "$as_dir" && as_dir=.
4412 # Account for people who put trailing slashes in PATH elements.
4413case $as_dir/ in
4414 ./ | .// | /cC/* | \
4415 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004416 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00004417 /usr/ucb/* ) ;;
4418 *)
4419 # OSF1 and SCO ODT 3.0 have their own names for install.
4420 # Don't use installbsd from OSF since it installs stuff as root
4421 # by default.
4422 for ac_prog in ginstall scoinst install; do
4423 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004424 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 +00004425 if test $ac_prog = install &&
4426 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4427 # AIX install. It has an incompatible calling convention.
4428 :
4429 elif test $ac_prog = install &&
4430 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4431 # program-specific install script used by HP pwplus--don't use.
4432 :
4433 else
4434 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4435 break 3
4436 fi
4437 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004438 done
Martin v. Löwis11437992002-04-12 09:54:03 +00004439 done
4440 ;;
4441esac
4442done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004443IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004444
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004445
4446fi
4447 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004448 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004449 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450 # As a last resort, use the slow shell script. Don't cache a
4451 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004452 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00004453 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00004454 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004455 fi
4456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004457{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4458echo "${ECHO_T}$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004459
4460# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4461# It thinks the first close brace ends the variable substitution.
4462test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4463
Martin v. Löwis11437992002-04-12 09:54:03 +00004464test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004465
4466test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4467
Michael W. Hudson54241132001-12-07 15:38:26 +00004468
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004469# Not every filesystem supports hard links
4470
4471if test -z "$LN" ; then
4472 case $ac_sys_system in
4473 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00004474 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004475 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004476 *) LN=ln;;
4477 esac
4478fi
4479
Fred Drake109d9862001-07-11 06:27:56 +00004480# Check for --with-pydebug
Martin v. Löwiseba40652007-08-30 20:10:57 +00004481{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4482echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004483
Martin v. Löwiseba40652007-08-30 20:10:57 +00004484# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00004485if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004486 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00004487if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00004488then
4489
4490cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00004491#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004492_ACEOF
4493
Martin v. Löwiseba40652007-08-30 20:10:57 +00004494 { echo "$as_me:$LINENO: result: yes" >&5
4495echo "${ECHO_T}yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004496 Py_DEBUG='true'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004497else { echo "$as_me:$LINENO: result: no" >&5
4498echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00004499fi
4500else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004501 { echo "$as_me:$LINENO: result: no" >&5
4502echo "${ECHO_T}no" >&6; }
4503fi
4504
Fred Drake109d9862001-07-11 06:27:56 +00004505
Skip Montanarodecc6a42003-01-01 20:07:49 +00004506# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4507# merged with this chunk of code?
4508
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004509# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00004510# ------------------------
4511# (The following bit of code is complicated enough - please keep things
4512# indented properly. Just pretend you're editing Python code. ;-)
4513
4514# There are two parallel sets of case statements below, one that checks to
4515# see if OPT was set and one that does BASECFLAGS setting based upon
4516# compiler and platform. BASECFLAGS tweaks need to be made even if the
4517# user set OPT.
4518
4519# tweak OPT based on compiler and platform, only if the user didn't set
4520# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004521
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004522if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004523then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004524 case $GCC in
4525 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004526 if test "$CC" != 'g++' ; then
4527 STRICT_PROTO="-Wstrict-prototypes"
4528 fi
Thomas Hellere5529592007-12-13 21:20:29 +00004529 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4530 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4531 WRAP="-fwrapv"
4532 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00004533 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004534 yes)
Fred Drake109d9862001-07-11 06:27:56 +00004535 if test "$Py_DEBUG" = 'true' ; then
4536 # Optimization messes up debuggers, so turn it off for
4537 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00004538 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00004539 else
Thomas Hellere5529592007-12-13 21:20:29 +00004540 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004541 fi
4542 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004543 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00004544 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00004545 ;;
Fred Drake109d9862001-07-11 06:27:56 +00004546 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00004547 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004548 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4549 ;;
4550 esac
Fred Drake109d9862001-07-11 06:27:56 +00004551 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004552
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004553 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00004554 OPT="-O"
4555 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004556 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004557
4558 # The current (beta) Monterey compiler dies with optimizations
4559 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00004560 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004561 Monterey*)
4562 OPT=""
4563 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00004564 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00004565
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004566fi
4567
Skip Montanarodecc6a42003-01-01 20:07:49 +00004568
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004569
4570# The -arch flags for universal builds on OSX
4571UNIVERSAL_ARCH_FLAGS=
4572
4573
Skip Montanarodecc6a42003-01-01 20:07:49 +00004574# tweak BASECFLAGS based on compiler and platform
4575case $GCC in
4576yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004577 # Python violates C99 rules, by casting between incompatible
4578 # pointer types. GCC may generate bad code as a result of that,
4579 # so use -fno-strict-aliasing if supported.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004580 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4581echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004582 ac_save_cc="$CC"
4583 CC="$CC -fno-strict-aliasing"
4584 if test "$cross_compiling" = yes; then
4585 ac_cv_no_strict_aliasing_ok=no
4586else
4587 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004588/* confdefs.h. */
4589_ACEOF
4590cat confdefs.h >>conftest.$ac_ext
4591cat >>conftest.$ac_ext <<_ACEOF
4592/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004593int main() { return 0; }
4594_ACEOF
4595rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004596if { (ac_try="$ac_link"
4597case "(($ac_try" in
4598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4599 *) ac_try_echo=$ac_try;;
4600esac
4601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4602 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004603 ac_status=$?
4604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4605 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004606 { (case "(($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_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004612 ac_status=$?
4613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4614 (exit $ac_status); }; }; then
4615 ac_cv_no_strict_aliasing_ok=yes
4616else
4617 echo "$as_me: program exited with status $ac_status" >&5
4618echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004619sed 's/^/| /' conftest.$ac_ext >&5
4620
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004621( exit $ac_status )
4622ac_cv_no_strict_aliasing_ok=no
4623fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004624rm -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 +00004625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004626
4627
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004628 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004629 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4630echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00004631 if test $ac_cv_no_strict_aliasing_ok = yes
4632 then
4633 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4634 fi
Mark Dickinson65134662008-04-25 16:11:04 +00004635
4636 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4637 # support. Without this, treatment of subnormals doesn't follow
4638 # the standard.
4639 case $ac_sys_machine in
4640 alpha*)
4641 BASECFLAGS="$BASECFLAGS -mieee"
4642 ;;
4643 esac
4644
Skip Montanarodecc6a42003-01-01 20:07:49 +00004645 case $ac_sys_system in
4646 SCO_SV*)
4647 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4648 ;;
4649 # is there any other compiler on Darwin besides gcc?
4650 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00004651 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4652 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00004653
4654
Ronald Oussoren988117f2006-04-29 11:31:35 +00004655 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004656 UNIVERSAL_ARCH_FLAGS=""
4657 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4658 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00004659 ARCH_RUN_32BIT=""
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004660
4661 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4662 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren7ab74352009-09-08 07:10:07 +00004663 ARCH_RUN_32BIT="true"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004664
4665 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4666 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorena4cb4722008-08-12 12:29:13 +00004667 ARCH_RUN_32BIT="arch -i386 -ppc"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004668
Ronald Oussoren7ab74352009-09-08 07:10:07 +00004669 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4670 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4671 ARCH_RUN_32BIT="arch -i386"
4672
4673 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4674 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4675 ARCH_RUN_32BIT="arch -i386 -ppc"
4676
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004677 else
Ronald Oussorenba0aa6b2009-09-20 20:16:38 +00004678 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4679echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Ronald Oussoren5640ce22008-06-05 12:58:24 +00004680 { (exit 1); exit 1; }; }
4681
4682 fi
4683
4684
4685 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
Ronald Oussoren5a849d42008-07-22 07:06:00 +00004686 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Benjamin Peterson4347c442008-07-17 15:59:24 +00004687 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4688 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4689 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00004690 fi
4691
Benjamin Peterson4347c442008-07-17 15:59:24 +00004692 # Calculate the right deployment target for this build.
4693 #
4694 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4695 if test ${cur_target} '>' 10.2; then
4696 cur_target=10.3
Ronald Oussoren7ab74352009-09-08 07:10:07 +00004697 if test ${enable_universalsdk}; then
4698 if test "${UNIVERSAL_ARCHS}" = "all"; then
4699 # Ensure that the default platform for a
4700 # 4-way universal build is OSX 10.5,
4701 # that's the first OS release where
4702 # 4-way builds make sense.
4703 cur_target='10.5'
4704
4705 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4706 cur_target='10.5'
4707
4708 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4709 cur_target='10.5'
4710
4711 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4712 cur_target='10.5'
4713 fi
4714 else
4715 if test `arch` = "i386"; then
4716 # On Intel macs default to a deployment
4717 # target of 10.4, that's the first OSX
4718 # release with Intel support.
4719 cur_target="10.4"
4720 fi
4721 fi
Benjamin Peterson4347c442008-07-17 15:59:24 +00004722 fi
4723 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4724
4725 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4726 # environment with a value that is the same as what we'll use
4727 # in the Makefile to ensure that we'll get the same compiler
4728 # environment during configure and build time.
4729 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4730 export MACOSX_DEPLOYMENT_TARGET
4731 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4732
Skip Montanarodecc6a42003-01-01 20:07:49 +00004733 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00004734 OSF*)
4735 BASECFLAGS="$BASECFLAGS -mieee"
4736 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004737 esac
4738 ;;
4739
4740*)
4741 case $ac_sys_system in
4742 OpenUNIX*|UnixWare*)
4743 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4744 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00004745 OSF*)
4746 BASECFLAGS="$BASECFLAGS -ieee -std"
4747 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00004748 SCO_SV*)
4749 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4750 ;;
4751 esac
4752 ;;
4753esac
4754
Fred Drakee1ceaa02001-12-04 20:55:47 +00004755if test "$Py_DEBUG" = 'true'; then
4756 :
4757else
4758 OPT="-DNDEBUG $OPT"
4759fi
4760
Guido van Rossum563e7081996-09-10 18:20:48 +00004761if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004762then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004763 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00004764fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00004765
Neal Norwitz020c46a2006-01-07 21:39:28 +00004766# disable check for icc since it seems to pass, but generates a warning
4767if test "$CC" = icc
4768then
4769 ac_cv_opt_olimit_ok=no
4770fi
4771
Martin v. Löwiseba40652007-08-30 20:10:57 +00004772{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4773echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004774if test "${ac_cv_opt_olimit_ok+set}" = set; then
4775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00004776else
4777 ac_save_cc="$CC"
4778CC="$CC -OPT:Olimit=0"
4779if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004780 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004781else
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004783/* confdefs.h. */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00004788int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004789_ACEOF
4790rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004791if { (ac_try="$ac_link"
4792case "(($ac_try" in
4793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794 *) ac_try_echo=$ac_try;;
4795esac
4796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4797 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004798 ac_status=$?
4799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004801 { (case "(($ac_try" in
4802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4803 *) ac_try_echo=$ac_try;;
4804esac
4805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4806 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00004810 ac_cv_opt_olimit_ok=yes
4811else
Martin v. Löwis11437992002-04-12 09:54:03 +00004812 echo "$as_me: program exited with status $ac_status" >&5
4813echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004814sed 's/^/| /' conftest.$ac_ext >&5
4815
Martin v. Löwis11437992002-04-12 09:54:03 +00004816( exit $ac_status )
4817ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00004818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004819rm -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 +00004820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004821
4822
Guido van Rossum91922671997-10-09 20:24:13 +00004823CC="$ac_save_cc"
4824fi
4825
Martin v. Löwiseba40652007-08-30 20:10:57 +00004826{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4827echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00004828if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00004829 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00004830 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4831 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4832 # environment?
4833 Darwin*)
4834 ;;
4835 *)
4836 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4837 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004838 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004839else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004840 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4841echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004842 if test "${ac_cv_olimit_ok+set}" = set; then
4843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004844else
4845 ac_save_cc="$CC"
4846 CC="$CC -Olimit 1500"
4847 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004848 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004849else
Martin v. Löwis11437992002-04-12 09:54:03 +00004850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004851/* confdefs.h. */
4852_ACEOF
4853cat confdefs.h >>conftest.$ac_ext
4854cat >>conftest.$ac_ext <<_ACEOF
4855/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004856int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004857_ACEOF
4858rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004859if { (ac_try="$ac_link"
4860case "(($ac_try" in
4861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4862 *) ac_try_echo=$ac_try;;
4863esac
4864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4865 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 ac_status=$?
4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4868 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004869 { (case "(($ac_try" in
4870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4871 *) ac_try_echo=$ac_try;;
4872esac
4873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4874 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 ac_status=$?
4876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004878 ac_cv_olimit_ok=yes
4879else
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 echo "$as_me: program exited with status $ac_status" >&5
4881echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004882sed 's/^/| /' conftest.$ac_ext >&5
4883
Martin v. Löwis11437992002-04-12 09:54:03 +00004884( exit $ac_status )
4885ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887rm -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 +00004888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004889
4890
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004891 CC="$ac_save_cc"
4892fi
4893
Martin v. Löwiseba40652007-08-30 20:10:57 +00004894 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4895echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004896 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004897 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004898 fi
4899fi
4900
Martin v. Löwisaac13162006-10-19 10:58:46 +00004901# Check whether GCC supports PyArg_ParseTuple format
4902if test "$GCC" = "yes"
4903then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4905echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004906 save_CFLAGS=$CFLAGS
4907 CFLAGS="$CFLAGS -Werror"
4908 cat >conftest.$ac_ext <<_ACEOF
4909/* confdefs.h. */
4910_ACEOF
4911cat confdefs.h >>conftest.$ac_ext
4912cat >>conftest.$ac_ext <<_ACEOF
4913/* end confdefs.h. */
4914
4915 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4916
4917int
4918main ()
4919{
4920
4921 ;
4922 return 0;
4923}
4924_ACEOF
4925rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926if { (ac_try="$ac_compile"
4927case "(($ac_try" in
4928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4929 *) ac_try_echo=$ac_try;;
4930esac
4931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004933 ac_status=$?
4934 grep -v '^ *+' conftest.er1 >conftest.err
4935 rm -f conftest.er1
4936 cat conftest.err >&5
4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004938 (exit $ac_status); } && {
4939 test -z "$ac_c_werror_flag" ||
4940 test ! -s conftest.err
4941 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004942
4943cat >>confdefs.h <<\_ACEOF
4944#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4945_ACEOF
4946
Martin v. Löwiseba40652007-08-30 20:10:57 +00004947 { echo "$as_me:$LINENO: result: yes" >&5
4948echo "${ECHO_T}yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004949else
4950 echo "$as_me: failed program was:" >&5
4951sed 's/^/| /' conftest.$ac_ext >&5
4952
Martin v. Löwiseba40652007-08-30 20:10:57 +00004953 { echo "$as_me:$LINENO: result: no" >&5
4954echo "${ECHO_T}no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00004955
4956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004957
4958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004959 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004960fi
4961
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004962# On some compilers, pthreads are available without further options
4963# (e.g. MacOS X). On some of these systems, the compiler will not
4964# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4965# So we have to see first whether pthreads are available without
4966# options before we can check whether -Kpthread improves anything.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4968echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004969if test "${ac_cv_pthread_is_default+set}" = set; then
4970 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004971else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004972 if test "$cross_compiling" = yes; then
4973 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004974else
Martin v. Löwis11437992002-04-12 09:54:03 +00004975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004976/* confdefs.h. */
4977_ACEOF
4978cat confdefs.h >>conftest.$ac_ext
4979cat >>conftest.$ac_ext <<_ACEOF
4980/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004981
Martin v. Löwis130fb172001-07-19 11:00:41 +00004982#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004983
4984void* routine(void* p){return NULL;}
4985
4986int main(){
4987 pthread_t p;
4988 if(pthread_create(&p,NULL,routine,NULL)!=0)
4989 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004990 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004991 return 0;
4992}
4993
Martin v. Löwis11437992002-04-12 09:54:03 +00004994_ACEOF
4995rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004996if { (ac_try="$ac_link"
4997case "(($ac_try" in
4998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4999 *) ac_try_echo=$ac_try;;
5000esac
5001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5002 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005003 ac_status=$?
5004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005006 { (case "(($ac_try" in
5007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5008 *) ac_try_echo=$ac_try;;
5009esac
5010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5011 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005012 ac_status=$?
5013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5014 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00005015
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005016 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00005017 ac_cv_kthread=no
5018 ac_cv_pthread=no
5019
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005020else
Martin v. Löwis11437992002-04-12 09:54:03 +00005021 echo "$as_me: program exited with status $ac_status" >&5
5022echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005023sed 's/^/| /' conftest.$ac_ext >&5
5024
Martin v. Löwis11437992002-04-12 09:54:03 +00005025( exit $ac_status )
5026ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005028rm -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 +00005029fi
5030
Martin v. Löwiseba40652007-08-30 20:10:57 +00005031
5032
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005033fi
5034
Martin v. Löwiseba40652007-08-30 20:10:57 +00005035{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5036echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005037
Michael W. Hudson54241132001-12-07 15:38:26 +00005038
Martin v. Löwis11437992002-04-12 09:54:03 +00005039if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005040then
5041 ac_cv_kpthread=no
5042else
5043# -Kpthread, if available, provides the right #defines
5044# and linker options to make pthread_create available
5045# Some compilers won't report that they do not support -Kpthread,
5046# so we need to run a program to see whether it really made the
5047# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005048{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5049echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005050if test "${ac_cv_kpthread+set}" = set; then
5051 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005052else
5053 ac_save_cc="$CC"
5054CC="$CC -Kpthread"
5055if test "$cross_compiling" = yes; then
5056 ac_cv_kpthread=no
5057else
Martin v. Löwis11437992002-04-12 09:54:03 +00005058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005059/* confdefs.h. */
5060_ACEOF
5061cat confdefs.h >>conftest.$ac_ext
5062cat >>conftest.$ac_ext <<_ACEOF
5063/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005064
5065#include <pthread.h>
5066
5067void* routine(void* p){return NULL;}
5068
5069int main(){
5070 pthread_t p;
5071 if(pthread_create(&p,NULL,routine,NULL)!=0)
5072 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005073 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005074 return 0;
5075}
5076
Martin v. Löwis11437992002-04-12 09:54:03 +00005077_ACEOF
5078rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005079if { (ac_try="$ac_link"
5080case "(($ac_try" in
5081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5082 *) ac_try_echo=$ac_try;;
5083esac
5084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5085 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005086 ac_status=$?
5087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005089 { (case "(($ac_try" in
5090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5091 *) ac_try_echo=$ac_try;;
5092esac
5093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5094 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005095 ac_status=$?
5096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5097 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005098 ac_cv_kpthread=yes
5099else
Martin v. Löwis11437992002-04-12 09:54:03 +00005100 echo "$as_me: program exited with status $ac_status" >&5
5101echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005102sed 's/^/| /' conftest.$ac_ext >&5
5103
Martin v. Löwis11437992002-04-12 09:54:03 +00005104( exit $ac_status )
5105ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005107rm -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 +00005108fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005109
5110
Martin v. Löwis130fb172001-07-19 11:00:41 +00005111CC="$ac_save_cc"
5112fi
5113
Martin v. Löwiseba40652007-08-30 20:10:57 +00005114{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5115echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005116fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005117
Skip Montanarod8d39a02003-07-10 20:44:10 +00005118if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005119then
5120# -Kthread, if available, provides the right #defines
5121# and linker options to make pthread_create available
5122# Some compilers won't report that they do not support -Kthread,
5123# so we need to run a program to see whether it really made the
5124# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005125{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5126echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005127if test "${ac_cv_kthread+set}" = set; then
5128 echo $ECHO_N "(cached) $ECHO_C" >&6
5129else
5130 ac_save_cc="$CC"
5131CC="$CC -Kthread"
5132if test "$cross_compiling" = yes; then
5133 ac_cv_kthread=no
5134else
5135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005136/* confdefs.h. */
5137_ACEOF
5138cat confdefs.h >>conftest.$ac_ext
5139cat >>conftest.$ac_ext <<_ACEOF
5140/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005141
5142#include <pthread.h>
5143
5144void* routine(void* p){return NULL;}
5145
5146int main(){
5147 pthread_t p;
5148 if(pthread_create(&p,NULL,routine,NULL)!=0)
5149 return 1;
5150 (void)pthread_detach(p);
5151 return 0;
5152}
5153
5154_ACEOF
5155rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005156if { (ac_try="$ac_link"
5157case "(($ac_try" in
5158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5159 *) ac_try_echo=$ac_try;;
5160esac
5161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5162 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005163 ac_status=$?
5164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005166 { (case "(($ac_try" in
5167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5168 *) ac_try_echo=$ac_try;;
5169esac
5170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5171 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); }; }; then
5175 ac_cv_kthread=yes
5176else
5177 echo "$as_me: program exited with status $ac_status" >&5
5178echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005179sed 's/^/| /' conftest.$ac_ext >&5
5180
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005181( exit $ac_status )
5182ac_cv_kthread=no
5183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005184rm -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 +00005185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005186
5187
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005188CC="$ac_save_cc"
5189fi
5190
Martin v. Löwiseba40652007-08-30 20:10:57 +00005191{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5192echo "${ECHO_T}$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005193fi
5194
Skip Montanarod8d39a02003-07-10 20:44:10 +00005195if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005196then
5197# -pthread, if available, provides the right #defines
5198# and linker options to make pthread_create available
5199# Some compilers won't report that they do not support -pthread,
5200# so we need to run a program to see whether it really made the
5201# function available.
Martin v. Löwiseba40652007-08-30 20:10:57 +00005202{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5203echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005204if test "${ac_cv_thread+set}" = set; then
5205 echo $ECHO_N "(cached) $ECHO_C" >&6
5206else
5207 ac_save_cc="$CC"
5208CC="$CC -pthread"
5209if test "$cross_compiling" = yes; then
5210 ac_cv_pthread=no
5211else
5212 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005213/* confdefs.h. */
5214_ACEOF
5215cat confdefs.h >>conftest.$ac_ext
5216cat >>conftest.$ac_ext <<_ACEOF
5217/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005218
5219#include <pthread.h>
5220
5221void* routine(void* p){return NULL;}
5222
5223int main(){
5224 pthread_t p;
5225 if(pthread_create(&p,NULL,routine,NULL)!=0)
5226 return 1;
5227 (void)pthread_detach(p);
5228 return 0;
5229}
5230
5231_ACEOF
5232rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005233if { (ac_try="$ac_link"
5234case "(($ac_try" in
5235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5236 *) ac_try_echo=$ac_try;;
5237esac
5238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5239 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005240 ac_status=$?
5241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5242 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005243 { (case "(($ac_try" in
5244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5245 *) ac_try_echo=$ac_try;;
5246esac
5247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5248 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005249 ac_status=$?
5250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5251 (exit $ac_status); }; }; then
5252 ac_cv_pthread=yes
5253else
5254 echo "$as_me: program exited with status $ac_status" >&5
5255echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005256sed 's/^/| /' conftest.$ac_ext >&5
5257
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005258( exit $ac_status )
5259ac_cv_pthread=no
5260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005261rm -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 +00005262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005263
5264
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005265CC="$ac_save_cc"
5266fi
5267
Martin v. Löwiseba40652007-08-30 20:10:57 +00005268{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5269echo "${ECHO_T}$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005270fi
5271
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005272# If we have set a CC compiler flag for thread support then
5273# check if it works for CXX, too.
5274ac_cv_cxx_thread=no
5275if test ! -z "$CXX"
5276then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005277{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5278echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005279ac_save_cxx="$CXX"
5280
5281if test "$ac_cv_kpthread" = "yes"
5282then
5283 CXX="$CXX -Kpthread"
5284 ac_cv_cxx_thread=yes
5285elif test "$ac_cv_kthread" = "yes"
5286then
5287 CXX="$CXX -Kthread"
5288 ac_cv_cxx_thread=yes
5289elif test "$ac_cv_pthread" = "yes"
5290then
5291 CXX="$CXX -pthread"
5292 ac_cv_cxx_thread=yes
5293fi
5294
5295if test $ac_cv_cxx_thread = yes
5296then
5297 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5298 $CXX -c conftest.$ac_ext 2>&5
5299 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5300 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5301 then
5302 ac_cv_cxx_thread=yes
5303 else
5304 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005305 fi
5306 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005308{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5309echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005310fi
5311CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005312
Michael W. Hudson54241132001-12-07 15:38:26 +00005313
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005314# checks for header files
Martin v. Löwiseba40652007-08-30 20:10:57 +00005315{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5316echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005317if test "${ac_cv_header_stdc+set}" = set; then
5318 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319else
Martin v. Löwis11437992002-04-12 09:54:03 +00005320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005321/* confdefs.h. */
5322_ACEOF
5323cat confdefs.h >>conftest.$ac_ext
5324cat >>conftest.$ac_ext <<_ACEOF
5325/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005326#include <stdlib.h>
5327#include <stdarg.h>
5328#include <string.h>
5329#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005330
Skip Montanaro6dead952003-09-25 14:50:04 +00005331int
5332main ()
5333{
5334
5335 ;
5336 return 0;
5337}
Martin v. Löwis11437992002-04-12 09:54:03 +00005338_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005339rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005340if { (ac_try="$ac_compile"
5341case "(($ac_try" in
5342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5343 *) ac_try_echo=$ac_try;;
5344esac
5345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005348 grep -v '^ *+' conftest.er1 >conftest.err
5349 rm -f conftest.er1
5350 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005352 (exit $ac_status); } && {
5353 test -z "$ac_c_werror_flag" ||
5354 test ! -s conftest.err
5355 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005356 ac_cv_header_stdc=yes
5357else
Martin v. Löwis11437992002-04-12 09:54:03 +00005358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005359sed 's/^/| /' conftest.$ac_ext >&5
5360
Martin v. Löwiseba40652007-08-30 20:10:57 +00005361 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005363
5364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005365
5366if test $ac_cv_header_stdc = yes; then
5367 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005369/* confdefs.h. */
5370_ACEOF
5371cat confdefs.h >>conftest.$ac_ext
5372cat >>conftest.$ac_ext <<_ACEOF
5373/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005374#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005375
5376_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005377if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005378 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005379 :
5380else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005381 ac_cv_header_stdc=no
5382fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005383rm -f -r conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005384
5385fi
5386
5387if test $ac_cv_header_stdc = yes; then
5388 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00005389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005390/* confdefs.h. */
5391_ACEOF
5392cat confdefs.h >>conftest.$ac_ext
5393cat >>conftest.$ac_ext <<_ACEOF
5394/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005396
5397_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005399 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005400 :
5401else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005402 ac_cv_header_stdc=no
5403fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005404rm -f -r conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005405
5406fi
5407
5408if test $ac_cv_header_stdc = yes; then
5409 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00005410 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005411 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005412else
Martin v. Löwis11437992002-04-12 09:54:03 +00005413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005414/* confdefs.h. */
5415_ACEOF
5416cat confdefs.h >>conftest.$ac_ext
5417cat >>conftest.$ac_ext <<_ACEOF
5418/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005419#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00005420#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005421#if ((' ' & 0x0FF) == 0x020)
5422# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5423# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5424#else
Skip Montanaro6dead952003-09-25 14:50:04 +00005425# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005426 (('a' <= (c) && (c) <= 'i') \
5427 || ('j' <= (c) && (c) <= 'r') \
5428 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00005429# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5430#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005431
Martin v. Löwis11437992002-04-12 09:54:03 +00005432#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5433int
5434main ()
5435{
5436 int i;
5437 for (i = 0; i < 256; i++)
5438 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00005439 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00005440 return 2;
5441 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00005442}
5443_ACEOF
5444rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005445if { (ac_try="$ac_link"
5446case "(($ac_try" in
5447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5448 *) ac_try_echo=$ac_try;;
5449esac
5450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5451 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005452 ac_status=$?
5453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005455 { (case "(($ac_try" in
5456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5457 *) ac_try_echo=$ac_try;;
5458esac
5459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5460 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005461 ac_status=$?
5462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5463 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005464 :
5465else
Martin v. Löwis11437992002-04-12 09:54:03 +00005466 echo "$as_me: program exited with status $ac_status" >&5
5467echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005468sed 's/^/| /' conftest.$ac_ext >&5
5469
Martin v. Löwis11437992002-04-12 09:54:03 +00005470( exit $ac_status )
5471ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5474fi
5475
5476
Michael W. Hudson54241132001-12-07 15:38:26 +00005477fi
5478fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005479{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5480echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00005481if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005482
5483cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005485_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005486
5487fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005488
Skip Montanarob9820a32004-01-17 00:16:12 +00005489# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005500 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00005501do
5502as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005503{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5504echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5505if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005506 echo $ECHO_N "(cached) $ECHO_C" >&6
5507else
5508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00005509/* confdefs.h. */
5510_ACEOF
5511cat confdefs.h >>conftest.$ac_ext
5512cat >>conftest.$ac_ext <<_ACEOF
5513/* end confdefs.h. */
5514$ac_includes_default
5515
5516#include <$ac_header>
5517_ACEOF
5518rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005519if { (ac_try="$ac_compile"
5520case "(($ac_try" in
5521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5522 *) ac_try_echo=$ac_try;;
5523esac
5524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5525 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00005526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005527 grep -v '^ *+' conftest.er1 >conftest.err
5528 rm -f conftest.er1
5529 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00005530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005531 (exit $ac_status); } && {
5532 test -z "$ac_c_werror_flag" ||
5533 test ! -s conftest.err
5534 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00005535 eval "$as_ac_Header=yes"
5536else
5537 echo "$as_me: failed program was:" >&5
5538sed 's/^/| /' conftest.$ac_ext >&5
5539
Martin v. Löwiseba40652007-08-30 20:10:57 +00005540 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00005541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005542
5543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00005544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005545ac_res=`eval echo '${'$as_ac_Header'}'`
5546 { echo "$as_me:$LINENO: result: $ac_res" >&5
5547echo "${ECHO_T}$ac_res" >&6; }
Skip Montanarob9820a32004-01-17 00:16:12 +00005548if test `eval echo '${'$as_ac_Header'}'` = yes; then
5549 cat >>confdefs.h <<_ACEOF
5550#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5551_ACEOF
5552
5553fi
5554
5555done
5556
5557
Martin v. Löwis11437992002-04-12 09:54:03 +00005558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
Anthony Baxter8a560de2004-10-13 15:30:56 +00005594
Martin v. Löwisc3001752005-01-23 09:27:24 +00005595
Martin v. Löwis11017b12006-01-14 18:12:57 +00005596
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005597
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005598
5599
5600
5601
5602
5603
5604
5605
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005606
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005607
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005608
5609
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005610
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005611
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005612for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5613fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005614ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005615shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005616unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005617sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5618sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005619sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005620sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005621sys/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 +00005622sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005623bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005624do
Martin v. Löwis11437992002-04-12 09:54:03 +00005625as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005626if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5627 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5628echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5629if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005630 echo $ECHO_N "(cached) $ECHO_C" >&6
5631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005632ac_res=`eval echo '${'$as_ac_Header'}'`
5633 { echo "$as_me:$LINENO: result: $ac_res" >&5
5634echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635else
Martin v. Löwis11437992002-04-12 09:54:03 +00005636 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005637{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5638echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005639cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005640/* confdefs.h. */
5641_ACEOF
5642cat confdefs.h >>conftest.$ac_ext
5643cat >>conftest.$ac_ext <<_ACEOF
5644/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005645$ac_includes_default
5646#include <$ac_header>
5647_ACEOF
5648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005649if { (ac_try="$ac_compile"
5650case "(($ac_try" in
5651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5652 *) ac_try_echo=$ac_try;;
5653esac
5654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005657 grep -v '^ *+' conftest.er1 >conftest.err
5658 rm -f conftest.er1
5659 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005661 (exit $ac_status); } && {
5662 test -z "$ac_c_werror_flag" ||
5663 test ! -s conftest.err
5664 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005665 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005666else
Martin v. Löwis11437992002-04-12 09:54:03 +00005667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005668sed 's/^/| /' conftest.$ac_ext >&5
5669
Martin v. Löwiseba40652007-08-30 20:10:57 +00005670 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005672
5673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5674{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5675echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005676
5677# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00005678{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5679echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005681/* confdefs.h. */
5682_ACEOF
5683cat confdefs.h >>conftest.$ac_ext
5684cat >>conftest.$ac_ext <<_ACEOF
5685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005686#include <$ac_header>
5687_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005688if { (ac_try="$ac_cpp conftest.$ac_ext"
5689case "(($ac_try" in
5690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5691 *) ac_try_echo=$ac_try;;
5692esac
5693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005695 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005696 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005697 rm -f conftest.er1
5698 cat conftest.err >&5
5699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005700 (exit $ac_status); } >/dev/null && {
5701 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5702 test ! -s conftest.err
5703 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005704 ac_header_preproc=yes
5705else
5706 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005707sed 's/^/| /' conftest.$ac_ext >&5
5708
Martin v. Löwis11437992002-04-12 09:54:03 +00005709 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005711
Martin v. Löwis11437992002-04-12 09:54:03 +00005712rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005713{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5714echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005715
5716# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005717case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5718 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00005719 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5720echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005721 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5722echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5723 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005724 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005725 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005726 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5727echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005728 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5729echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5730 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5731echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5732 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5733echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005734 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5735echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005736 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5737echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005738 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005739## ------------------------------------------------ ##
5740## Report this to http://www.python.org/python-bugs ##
5741## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005742_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005743 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005744 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005745esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00005746{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5747echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5748if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005749 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005750else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005751 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005753ac_res=`eval echo '${'$as_ac_Header'}'`
5754 { echo "$as_me:$LINENO: result: $ac_res" >&5
5755echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005756
5757fi
5758if test `eval echo '${'$as_ac_Header'}'` = yes; then
5759 cat >>confdefs.h <<_ACEOF
5760#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5761_ACEOF
5762
5763fi
5764
Guido van Rossum627b2d71993-12-24 10:39:16 +00005765done
5766
Martin v. Löwis11437992002-04-12 09:54:03 +00005767
5768
5769
5770
5771
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005772ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005773for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
5774 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005775{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5776echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
5777if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005778 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005779else
Martin v. Löwis11437992002-04-12 09:54:03 +00005780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005781/* confdefs.h. */
5782_ACEOF
5783cat confdefs.h >>conftest.$ac_ext
5784cat >>conftest.$ac_ext <<_ACEOF
5785/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786#include <sys/types.h>
5787#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005788
Martin v. Löwis11437992002-04-12 09:54:03 +00005789int
5790main ()
5791{
5792if ((DIR *) 0)
5793return 0;
5794 ;
5795 return 0;
5796}
5797_ACEOF
5798rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005799if { (ac_try="$ac_compile"
5800case "(($ac_try" in
5801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5802 *) ac_try_echo=$ac_try;;
5803esac
5804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005807 grep -v '^ *+' conftest.er1 >conftest.err
5808 rm -f conftest.er1
5809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005811 (exit $ac_status); } && {
5812 test -z "$ac_c_werror_flag" ||
5813 test ! -s conftest.err
5814 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005815 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005816else
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005818sed 's/^/| /' conftest.$ac_ext >&5
5819
Martin v. Löwiseba40652007-08-30 20:10:57 +00005820 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005822
5823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005824fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005825ac_res=`eval echo '${'$as_ac_Header'}'`
5826 { echo "$as_me:$LINENO: result: $ac_res" >&5
5827echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005828if test `eval echo '${'$as_ac_Header'}'` = yes; then
5829 cat >>confdefs.h <<_ACEOF
5830#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
5831_ACEOF
5832
5833ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005834fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005835
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005836done
5837# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5838if test $ac_header_dirent = dirent.h; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5840echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005841if test "${ac_cv_search_opendir+set}" = set; then
5842 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005843else
Martin v. Löwis11437992002-04-12 09:54:03 +00005844 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005846/* confdefs.h. */
5847_ACEOF
5848cat confdefs.h >>conftest.$ac_ext
5849cat >>conftest.$ac_ext <<_ACEOF
5850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005851
Martin v. Löwiseba40652007-08-30 20:10:57 +00005852/* Override any GCC internal prototype to avoid an error.
5853 Use char because int might match the return type of a GCC
5854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005855#ifdef __cplusplus
5856extern "C"
5857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005858char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005859int
5860main ()
5861{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005863 ;
5864 return 0;
5865}
5866_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005867for ac_lib in '' dir; do
5868 if test -z "$ac_lib"; then
5869 ac_res="none required"
5870 else
5871 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005872 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005873 fi
5874 rm -f conftest.$ac_objext conftest$ac_exeext
5875if { (ac_try="$ac_link"
5876case "(($ac_try" in
5877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5878 *) ac_try_echo=$ac_try;;
5879esac
5880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5881 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005882 ac_status=$?
5883 grep -v '^ *+' conftest.er1 >conftest.err
5884 rm -f conftest.er1
5885 cat conftest.err >&5
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005887 (exit $ac_status); } && {
5888 test -z "$ac_c_werror_flag" ||
5889 test ! -s conftest.err
5890 } && test -s conftest$ac_exeext &&
5891 $as_test_x conftest$ac_exeext; then
5892 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005893else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005894 echo "$as_me: failed program was:" >&5
5895sed 's/^/| /' conftest.$ac_ext >&5
5896
Martin v. Löwiseba40652007-08-30 20:10:57 +00005897
Brett Cannon19fab762007-06-02 03:02:29 +00005898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005899
5900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5901 conftest$ac_exeext
5902 if test "${ac_cv_search_opendir+set}" = set; then
5903 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005905done
5906if test "${ac_cv_search_opendir+set}" = set; then
5907 :
5908else
5909 ac_cv_search_opendir=no
5910fi
5911rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005912LIBS=$ac_func_search_save_LIBS
5913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5915echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
5916ac_res=$ac_cv_search_opendir
5917if test "$ac_res" != no; then
5918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005919
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005920fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005921
Michael W. Hudson54241132001-12-07 15:38:26 +00005922else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005923 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5924echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005925if test "${ac_cv_search_opendir+set}" = set; then
5926 echo $ECHO_N "(cached) $ECHO_C" >&6
5927else
5928 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005929cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005930/* confdefs.h. */
5931_ACEOF
5932cat confdefs.h >>conftest.$ac_ext
5933cat >>conftest.$ac_ext <<_ACEOF
5934/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005935
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936/* Override any GCC internal prototype to avoid an error.
5937 Use char because int might match the return type of a GCC
5938 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005939#ifdef __cplusplus
5940extern "C"
5941#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005942char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005943int
5944main ()
5945{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005946return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005947 ;
5948 return 0;
5949}
5950_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005951for ac_lib in '' x; do
5952 if test -z "$ac_lib"; then
5953 ac_res="none required"
5954 else
5955 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005957 fi
5958 rm -f conftest.$ac_objext conftest$ac_exeext
5959if { (ac_try="$ac_link"
5960case "(($ac_try" in
5961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5962 *) ac_try_echo=$ac_try;;
5963esac
5964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5965 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005966 ac_status=$?
5967 grep -v '^ *+' conftest.er1 >conftest.err
5968 rm -f conftest.er1
5969 cat conftest.err >&5
5970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005971 (exit $ac_status); } && {
5972 test -z "$ac_c_werror_flag" ||
5973 test ! -s conftest.err
5974 } && test -s conftest$ac_exeext &&
5975 $as_test_x conftest$ac_exeext; then
5976 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005977else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005978 echo "$as_me: failed program was:" >&5
5979sed 's/^/| /' conftest.$ac_ext >&5
5980
Martin v. Löwiseba40652007-08-30 20:10:57 +00005981
Brett Cannon19fab762007-06-02 03:02:29 +00005982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005983
5984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5985 conftest$ac_exeext
5986 if test "${ac_cv_search_opendir+set}" = set; then
5987 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005988fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989done
5990if test "${ac_cv_search_opendir+set}" = set; then
5991 :
5992else
5993 ac_cv_search_opendir=no
5994fi
5995rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005996LIBS=$ac_func_search_save_LIBS
5997fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005998{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5999echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
6000ac_res=$ac_cv_search_opendir
6001if test "$ac_res" != no; then
6002 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006004fi
6005
6006fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6009echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006010if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
6011 echo $ECHO_N "(cached) $ECHO_C" >&6
6012else
6013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006014/* confdefs.h. */
6015_ACEOF
6016cat confdefs.h >>conftest.$ac_ext
6017cat >>conftest.$ac_ext <<_ACEOF
6018/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006019#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006020int
6021main ()
6022{
6023return makedev(0, 0);
6024 ;
6025 return 0;
6026}
6027_ACEOF
6028rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006029if { (ac_try="$ac_link"
6030case "(($ac_try" in
6031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6032 *) ac_try_echo=$ac_try;;
6033esac
6034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6035 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006037 grep -v '^ *+' conftest.er1 >conftest.err
6038 rm -f conftest.er1
6039 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006041 (exit $ac_status); } && {
6042 test -z "$ac_c_werror_flag" ||
6043 test ! -s conftest.err
6044 } && test -s conftest$ac_exeext &&
6045 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006046 ac_cv_header_sys_types_h_makedev=yes
6047else
6048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006049sed 's/^/| /' conftest.$ac_ext >&5
6050
Martin v. Löwiseba40652007-08-30 20:10:57 +00006051 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006053
6054rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006056
6057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006058{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6059echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006060
6061if test $ac_cv_header_sys_types_h_makedev = no; then
6062if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006063 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6064echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6066 echo $ECHO_N "(cached) $ECHO_C" >&6
6067fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006068{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6069echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006070else
6071 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6073echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006075/* confdefs.h. */
6076_ACEOF
6077cat confdefs.h >>conftest.$ac_ext
6078cat >>conftest.$ac_ext <<_ACEOF
6079/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006080$ac_includes_default
6081#include <sys/mkdev.h>
6082_ACEOF
6083rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006084if { (ac_try="$ac_compile"
6085case "(($ac_try" in
6086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6087 *) ac_try_echo=$ac_try;;
6088esac
6089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006092 grep -v '^ *+' conftest.er1 >conftest.err
6093 rm -f conftest.er1
6094 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006096 (exit $ac_status); } && {
6097 test -z "$ac_c_werror_flag" ||
6098 test ! -s conftest.err
6099 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006100 ac_header_compiler=yes
6101else
6102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006103sed 's/^/| /' conftest.$ac_ext >&5
6104
Martin v. Löwiseba40652007-08-30 20:10:57 +00006105 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006106fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006107
6108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6109{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6110echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006111
6112# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6114echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006115cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006116/* confdefs.h. */
6117_ACEOF
6118cat confdefs.h >>conftest.$ac_ext
6119cat >>conftest.$ac_ext <<_ACEOF
6120/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006121#include <sys/mkdev.h>
6122_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006123if { (ac_try="$ac_cpp conftest.$ac_ext"
6124case "(($ac_try" in
6125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6126 *) ac_try_echo=$ac_try;;
6127esac
6128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6129 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006131 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006132 rm -f conftest.er1
6133 cat conftest.err >&5
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006135 (exit $ac_status); } >/dev/null && {
6136 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6137 test ! -s conftest.err
6138 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006139 ac_header_preproc=yes
6140else
6141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006142sed 's/^/| /' conftest.$ac_ext >&5
6143
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006144 ac_header_preproc=no
6145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006146
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006148{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6149echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006150
6151# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006152case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6153 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006154 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6155echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006156 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6157echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
6158 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006159 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006160 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006161 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6162echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006163 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6164echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6165 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6166echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6167 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6168echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006169 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6170echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006171 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6172echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006173 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006174## ------------------------------------------------ ##
6175## Report this to http://www.python.org/python-bugs ##
6176## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006177_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006179 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006180esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006181{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6182echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
6184 echo $ECHO_N "(cached) $ECHO_C" >&6
6185else
6186 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006188{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6189echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006190
6191fi
6192if test $ac_cv_header_sys_mkdev_h = yes; then
6193
6194cat >>confdefs.h <<\_ACEOF
6195#define MAJOR_IN_MKDEV 1
6196_ACEOF
6197
6198fi
6199
6200
6201
6202 if test $ac_cv_header_sys_mkdev_h = no; then
6203 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006204 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6205echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006206if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6207 echo $ECHO_N "(cached) $ECHO_C" >&6
6208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006209{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6210echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211else
6212 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006213{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6214echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006216/* confdefs.h. */
6217_ACEOF
6218cat confdefs.h >>conftest.$ac_ext
6219cat >>conftest.$ac_ext <<_ACEOF
6220/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006221$ac_includes_default
6222#include <sys/sysmacros.h>
6223_ACEOF
6224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006225if { (ac_try="$ac_compile"
6226case "(($ac_try" in
6227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6228 *) ac_try_echo=$ac_try;;
6229esac
6230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006233 grep -v '^ *+' conftest.er1 >conftest.err
6234 rm -f conftest.er1
6235 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006237 (exit $ac_status); } && {
6238 test -z "$ac_c_werror_flag" ||
6239 test ! -s conftest.err
6240 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006241 ac_header_compiler=yes
6242else
6243 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006244sed 's/^/| /' conftest.$ac_ext >&5
6245
Martin v. Löwiseba40652007-08-30 20:10:57 +00006246 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006248
6249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6250{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6251echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252
6253# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +00006254{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6255echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006257/* confdefs.h. */
6258_ACEOF
6259cat confdefs.h >>conftest.$ac_ext
6260cat >>conftest.$ac_ext <<_ACEOF
6261/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006262#include <sys/sysmacros.h>
6263_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006264if { (ac_try="$ac_cpp conftest.$ac_ext"
6265case "(($ac_try" in
6266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6267 *) ac_try_echo=$ac_try;;
6268esac
6269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6270 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006272 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006273 rm -f conftest.er1
6274 cat conftest.err >&5
6275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006276 (exit $ac_status); } >/dev/null && {
6277 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6278 test ! -s conftest.err
6279 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006280 ac_header_preproc=yes
6281else
6282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006283sed 's/^/| /' conftest.$ac_ext >&5
6284
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006285 ac_header_preproc=no
6286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006287
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006288rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006289{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6290echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006291
6292# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006293case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6294 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006295 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6296echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006297 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6298echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
6299 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006300 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006301 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006302 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6303echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006304 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6305echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6306 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6307echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6308 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6309echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006310 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6311echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006312 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6313echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006314 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006315## ------------------------------------------------ ##
6316## Report this to http://www.python.org/python-bugs ##
6317## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006318_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006319 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006320 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006321esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00006322{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6323echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006324if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
6325 echo $ECHO_N "(cached) $ECHO_C" >&6
6326else
6327 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6328fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006329{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6330echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006331
6332fi
6333if test $ac_cv_header_sys_sysmacros_h = yes; then
6334
6335cat >>confdefs.h <<\_ACEOF
6336#define MAJOR_IN_SYSMACROS 1
6337_ACEOF
6338
6339fi
6340
6341
6342 fi
6343fi
6344
Michael W. Hudson54241132001-12-07 15:38:26 +00006345
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006346# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006347
6348for ac_header in term.h
6349do
6350as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006351{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6352echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6353if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006354 echo $ECHO_N "(cached) $ECHO_C" >&6
6355else
6356 cat >conftest.$ac_ext <<_ACEOF
6357/* confdefs.h. */
6358_ACEOF
6359cat confdefs.h >>conftest.$ac_ext
6360cat >>conftest.$ac_ext <<_ACEOF
6361/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006362
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006363#ifdef HAVE_CURSES_H
6364#include <curses.h>
6365#endif
6366
6367
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006368#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006369_ACEOF
6370rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006371if { (ac_try="$ac_compile"
6372case "(($ac_try" in
6373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6374 *) ac_try_echo=$ac_try;;
6375esac
6376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006378 ac_status=$?
6379 grep -v '^ *+' conftest.er1 >conftest.err
6380 rm -f conftest.er1
6381 cat conftest.err >&5
6382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006383 (exit $ac_status); } && {
6384 test -z "$ac_c_werror_flag" ||
6385 test ! -s conftest.err
6386 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006387 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388else
6389 echo "$as_me: failed program was:" >&5
6390sed 's/^/| /' conftest.$ac_ext >&5
6391
Martin v. Löwiseba40652007-08-30 20:10:57 +00006392 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006394
6395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006397ac_res=`eval echo '${'$as_ac_Header'}'`
6398 { echo "$as_me:$LINENO: result: $ac_res" >&5
6399echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006400if test `eval echo '${'$as_ac_Header'}'` = yes; then
6401 cat >>confdefs.h <<_ACEOF
6402#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6403_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006404
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006405fi
6406
6407done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006408
6409
Martin v. Löwis11017b12006-01-14 18:12:57 +00006410# On Linux, netlink.h requires asm/types.h
6411
6412for ac_header in linux/netlink.h
6413do
6414as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006415{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6416echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6417if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006418 echo $ECHO_N "(cached) $ECHO_C" >&6
6419else
6420 cat >conftest.$ac_ext <<_ACEOF
6421/* confdefs.h. */
6422_ACEOF
6423cat confdefs.h >>conftest.$ac_ext
6424cat >>conftest.$ac_ext <<_ACEOF
6425/* end confdefs.h. */
6426
6427#ifdef HAVE_ASM_TYPES_H
6428#include <asm/types.h>
6429#endif
6430#ifdef HAVE_SYS_SOCKET_H
6431#include <sys/socket.h>
6432#endif
6433
6434
6435#include <$ac_header>
6436_ACEOF
6437rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006438if { (ac_try="$ac_compile"
6439case "(($ac_try" in
6440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6441 *) ac_try_echo=$ac_try;;
6442esac
6443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006445 ac_status=$?
6446 grep -v '^ *+' conftest.er1 >conftest.err
6447 rm -f conftest.er1
6448 cat conftest.err >&5
6449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006450 (exit $ac_status); } && {
6451 test -z "$ac_c_werror_flag" ||
6452 test ! -s conftest.err
6453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006454 eval "$as_ac_Header=yes"
6455else
6456 echo "$as_me: failed program was:" >&5
6457sed 's/^/| /' conftest.$ac_ext >&5
6458
Martin v. Löwiseba40652007-08-30 20:10:57 +00006459 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006460fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006461
6462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006464ac_res=`eval echo '${'$as_ac_Header'}'`
6465 { echo "$as_me:$LINENO: result: $ac_res" >&5
6466echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11017b12006-01-14 18:12:57 +00006467if test `eval echo '${'$as_ac_Header'}'` = yes; then
6468 cat >>confdefs.h <<_ACEOF
6469#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6470_ACEOF
6471
6472fi
6473
6474done
6475
6476
Guido van Rossum627b2d71993-12-24 10:39:16 +00006477# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006478was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +00006479{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6480echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006481cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006482/* confdefs.h. */
6483_ACEOF
6484cat confdefs.h >>conftest.$ac_ext
6485cat >>conftest.$ac_ext <<_ACEOF
6486/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006487#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006488
6489_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006491 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006492 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006493else
Martin v. Löwis11437992002-04-12 09:54:03 +00006494
6495
6496cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006498_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006499
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006500
Guido van Rossum627b2d71993-12-24 10:39:16 +00006501fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +00006502rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006503
Martin v. Löwiseba40652007-08-30 20:10:57 +00006504{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6505echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506
Neal Norwitz11690112002-07-30 01:08:28 +00006507# Check whether using makedev requires defining _OSF_SOURCE
Martin v. Löwiseba40652007-08-30 20:10:57 +00006508{ echo "$as_me:$LINENO: checking for makedev" >&5
6509echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006510cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006511/* confdefs.h. */
6512_ACEOF
6513cat confdefs.h >>conftest.$ac_ext
6514cat >>conftest.$ac_ext <<_ACEOF
6515/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006516#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006517int
6518main ()
6519{
6520 makedev(0, 0)
6521 ;
6522 return 0;
6523}
6524_ACEOF
6525rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006526if { (ac_try="$ac_link"
6527case "(($ac_try" in
6528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6529 *) ac_try_echo=$ac_try;;
6530esac
6531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6532 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006534 grep -v '^ *+' conftest.er1 >conftest.err
6535 rm -f conftest.er1
6536 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006538 (exit $ac_status); } && {
6539 test -z "$ac_c_werror_flag" ||
6540 test ! -s conftest.err
6541 } && test -s conftest$ac_exeext &&
6542 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006543 ac_cv_has_makedev=yes
6544else
6545 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006546sed 's/^/| /' conftest.$ac_ext >&5
6547
Martin v. Löwiseba40652007-08-30 20:10:57 +00006548 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006550
6551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006552 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006553if test "$ac_cv_has_makedev" = "no"; then
6554 # we didn't link, try if _OSF_SOURCE will allow us to link
6555 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006556/* confdefs.h. */
6557_ACEOF
6558cat confdefs.h >>conftest.$ac_ext
6559cat >>conftest.$ac_ext <<_ACEOF
6560/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006561
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006562#define _OSF_SOURCE 1
6563#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006564
Neal Norwitz11690112002-07-30 01:08:28 +00006565int
6566main ()
6567{
6568 makedev(0, 0)
6569 ;
6570 return 0;
6571}
6572_ACEOF
6573rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006574if { (ac_try="$ac_link"
6575case "(($ac_try" in
6576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6577 *) ac_try_echo=$ac_try;;
6578esac
6579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6580 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006581 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006582 grep -v '^ *+' conftest.er1 >conftest.err
6583 rm -f conftest.er1
6584 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00006585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006586 (exit $ac_status); } && {
6587 test -z "$ac_c_werror_flag" ||
6588 test ! -s conftest.err
6589 } && test -s conftest$ac_exeext &&
6590 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006591 ac_cv_has_makedev=yes
6592else
6593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006594sed 's/^/| /' conftest.$ac_ext >&5
6595
Martin v. Löwiseba40652007-08-30 20:10:57 +00006596 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006598
6599rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006600 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006601 if test "$ac_cv_has_makedev" = "yes"; then
6602
6603cat >>confdefs.h <<\_ACEOF
6604#define _OSF_SOURCE 1
6605_ACEOF
6606
6607 fi
6608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006609{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6610echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006611if test "$ac_cv_has_makedev" = "yes"; then
6612
6613cat >>confdefs.h <<\_ACEOF
6614#define HAVE_MAKEDEV 1
6615_ACEOF
6616
6617fi
6618
Martin v. Löwis399a6892002-10-04 10:22:02 +00006619# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6620# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6621# defined, but the compiler does not support pragma redefine_extname,
6622# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6623# structures (such as rlimit64) without declaring them. As a
6624# work-around, disable LFS on such configurations
6625
6626use_lfs=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00006627{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6628echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006629cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006630/* confdefs.h. */
6631_ACEOF
6632cat confdefs.h >>conftest.$ac_ext
6633cat >>conftest.$ac_ext <<_ACEOF
6634/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006635
6636#define _LARGEFILE_SOURCE 1
6637#define _FILE_OFFSET_BITS 64
6638#include <sys/resource.h>
6639
Martin v. Löwis399a6892002-10-04 10:22:02 +00006640int
6641main ()
6642{
6643struct rlimit foo;
6644 ;
6645 return 0;
6646}
6647_ACEOF
6648rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006649if { (ac_try="$ac_compile"
6650case "(($ac_try" in
6651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6652 *) ac_try_echo=$ac_try;;
6653esac
6654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6655 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006657 grep -v '^ *+' conftest.er1 >conftest.err
6658 rm -f conftest.er1
6659 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00006660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006661 (exit $ac_status); } && {
6662 test -z "$ac_c_werror_flag" ||
6663 test ! -s conftest.err
6664 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006665 sol_lfs_bug=no
6666else
6667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006668sed 's/^/| /' conftest.$ac_ext >&5
6669
Martin v. Löwiseba40652007-08-30 20:10:57 +00006670 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006672
6673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6674{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6675echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006676if test "$sol_lfs_bug" = "yes"; then
6677 use_lfs=no
6678fi
6679
6680if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006681# Two defines needed to enable largefile support on various platforms
6682# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006683
Martin v. Löwis11437992002-04-12 09:54:03 +00006684cat >>confdefs.h <<\_ACEOF
6685#define _LARGEFILE_SOURCE 1
6686_ACEOF
6687
6688
6689cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006690#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006691_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006692
Martin v. Löwis399a6892002-10-04 10:22:02 +00006693fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006694
Guido van Rossum84e7b241996-08-19 21:59:00 +00006695# Add some code to confdefs.h so that the test for off_t works on SCO
6696cat >> confdefs.h <<\EOF
6697#if defined(SCO_DS)
6698#undef _OFF_T
6699#endif
6700EOF
6701
Guido van Rossumef2255b2000-03-10 22:30:29 +00006702# Type availability checks
Martin v. Löwiseba40652007-08-30 20:10:57 +00006703{ echo "$as_me:$LINENO: checking for mode_t" >&5
6704echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006705if test "${ac_cv_type_mode_t+set}" = set; then
6706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006707else
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006709/* confdefs.h. */
6710_ACEOF
6711cat confdefs.h >>conftest.$ac_ext
6712cat >>conftest.$ac_ext <<_ACEOF
6713/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006714$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006715typedef mode_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006716int
6717main ()
6718{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006719if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006720 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006721if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006722 return 0;
6723 ;
6724 return 0;
6725}
6726_ACEOF
6727rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006728if { (ac_try="$ac_compile"
6729case "(($ac_try" in
6730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6731 *) ac_try_echo=$ac_try;;
6732esac
6733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6734 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006735 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006736 grep -v '^ *+' conftest.er1 >conftest.err
6737 rm -f conftest.er1
6738 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006740 (exit $ac_status); } && {
6741 test -z "$ac_c_werror_flag" ||
6742 test ! -s conftest.err
6743 } && test -s conftest.$ac_objext; then
Jack Jansendd19cf82001-12-06 22:36:17 +00006744 ac_cv_type_mode_t=yes
6745else
Martin v. Löwis11437992002-04-12 09:54:03 +00006746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006747sed 's/^/| /' conftest.$ac_ext >&5
6748
Martin v. Löwiseba40652007-08-30 20:10:57 +00006749 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006751
6752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006754{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6755echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006756if test $ac_cv_type_mode_t = yes; then
6757 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006758else
Martin v. Löwis11437992002-04-12 09:54:03 +00006759
6760cat >>confdefs.h <<_ACEOF
6761#define mode_t int
6762_ACEOF
6763
6764fi
6765
Martin v. Löwiseba40652007-08-30 20:10:57 +00006766{ echo "$as_me:$LINENO: checking for off_t" >&5
6767echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006768if test "${ac_cv_type_off_t+set}" = set; then
6769 echo $ECHO_N "(cached) $ECHO_C" >&6
6770else
6771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006772/* confdefs.h. */
6773_ACEOF
6774cat confdefs.h >>conftest.$ac_ext
6775cat >>conftest.$ac_ext <<_ACEOF
6776/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006777$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006778typedef off_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006779int
6780main ()
6781{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006782if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006783 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006784if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006785 return 0;
6786 ;
6787 return 0;
6788}
6789_ACEOF
6790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006791if { (ac_try="$ac_compile"
6792case "(($ac_try" in
6793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6794 *) ac_try_echo=$ac_try;;
6795esac
6796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006799 grep -v '^ *+' conftest.er1 >conftest.err
6800 rm -f conftest.er1
6801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006803 (exit $ac_status); } && {
6804 test -z "$ac_c_werror_flag" ||
6805 test ! -s conftest.err
6806 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006807 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006808else
Martin v. Löwis11437992002-04-12 09:54:03 +00006809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006810sed 's/^/| /' conftest.$ac_ext >&5
6811
Martin v. Löwiseba40652007-08-30 20:10:57 +00006812 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006814
6815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006817{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6818echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006819if test $ac_cv_type_off_t = yes; then
6820 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006821else
Martin v. Löwis11437992002-04-12 09:54:03 +00006822
6823cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006824#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006825_ACEOF
6826
6827fi
6828
Martin v. Löwiseba40652007-08-30 20:10:57 +00006829{ echo "$as_me:$LINENO: checking for pid_t" >&5
6830echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006831if test "${ac_cv_type_pid_t+set}" = set; then
6832 echo $ECHO_N "(cached) $ECHO_C" >&6
6833else
6834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006835/* confdefs.h. */
6836_ACEOF
6837cat confdefs.h >>conftest.$ac_ext
6838cat >>conftest.$ac_ext <<_ACEOF
6839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006840$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006841typedef pid_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006842int
6843main ()
6844{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006845if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006846 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006847if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006848 return 0;
6849 ;
6850 return 0;
6851}
6852_ACEOF
6853rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006854if { (ac_try="$ac_compile"
6855case "(($ac_try" in
6856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6857 *) ac_try_echo=$ac_try;;
6858esac
6859eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6860 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006861 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006862 grep -v '^ *+' conftest.er1 >conftest.err
6863 rm -f conftest.er1
6864 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006866 (exit $ac_status); } && {
6867 test -z "$ac_c_werror_flag" ||
6868 test ! -s conftest.err
6869 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006870 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006871else
Martin v. Löwis11437992002-04-12 09:54:03 +00006872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006873sed 's/^/| /' conftest.$ac_ext >&5
6874
Martin v. Löwiseba40652007-08-30 20:10:57 +00006875 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006877
6878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006880{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6881echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006882if test $ac_cv_type_pid_t = yes; then
6883 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006884else
Martin v. Löwis11437992002-04-12 09:54:03 +00006885
6886cat >>confdefs.h <<_ACEOF
6887#define pid_t int
6888_ACEOF
6889
6890fi
6891
Martin v. Löwiseba40652007-08-30 20:10:57 +00006892{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6893echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006894if test "${ac_cv_type_signal+set}" = set; then
6895 echo $ECHO_N "(cached) $ECHO_C" >&6
6896else
6897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006898/* confdefs.h. */
6899_ACEOF
6900cat confdefs.h >>conftest.$ac_ext
6901cat >>conftest.$ac_ext <<_ACEOF
6902/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006903#include <sys/types.h>
6904#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006905
Martin v. Löwis11437992002-04-12 09:54:03 +00006906int
6907main ()
6908{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006909return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006910 ;
6911 return 0;
6912}
6913_ACEOF
6914rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006915if { (ac_try="$ac_compile"
6916case "(($ac_try" in
6917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6918 *) ac_try_echo=$ac_try;;
6919esac
6920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6921 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006923 grep -v '^ *+' conftest.er1 >conftest.err
6924 rm -f conftest.er1
6925 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006927 (exit $ac_status); } && {
6928 test -z "$ac_c_werror_flag" ||
6929 test ! -s conftest.err
6930 } && test -s conftest.$ac_objext; then
6931 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006932else
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006934sed 's/^/| /' conftest.$ac_ext >&5
6935
Martin v. Löwiseba40652007-08-30 20:10:57 +00006936 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006938
6939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006941{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6942echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006943
Martin v. Löwis11437992002-04-12 09:54:03 +00006944cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006946_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006947
Michael W. Hudson54241132001-12-07 15:38:26 +00006948
Martin v. Löwiseba40652007-08-30 20:10:57 +00006949{ echo "$as_me:$LINENO: checking for size_t" >&5
6950echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006951if test "${ac_cv_type_size_t+set}" = set; then
6952 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006953else
Martin v. Löwis11437992002-04-12 09:54:03 +00006954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006955/* confdefs.h. */
6956_ACEOF
6957cat confdefs.h >>conftest.$ac_ext
6958cat >>conftest.$ac_ext <<_ACEOF
6959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006960$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961typedef size_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00006962int
6963main ()
6964{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006965if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006966 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00006967if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 return 0;
6969 ;
6970 return 0;
6971}
6972_ACEOF
6973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006974if { (ac_try="$ac_compile"
6975case "(($ac_try" in
6976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6977 *) ac_try_echo=$ac_try;;
6978esac
6979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006982 grep -v '^ *+' conftest.er1 >conftest.err
6983 rm -f conftest.er1
6984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006986 (exit $ac_status); } && {
6987 test -z "$ac_c_werror_flag" ||
6988 test ! -s conftest.err
6989 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006990 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006991else
Martin v. Löwis11437992002-04-12 09:54:03 +00006992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006993sed 's/^/| /' conftest.$ac_ext >&5
6994
Martin v. Löwiseba40652007-08-30 20:10:57 +00006995 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006996fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006997
6998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007000{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7001echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007002if test $ac_cv_type_size_t = yes; then
7003 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007004else
Martin v. Löwis11437992002-04-12 09:54:03 +00007005
7006cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007007#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007008_ACEOF
7009
7010fi
7011
Martin v. Löwiseba40652007-08-30 20:10:57 +00007012{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7013echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007014if test "${ac_cv_type_uid_t+set}" = set; then
7015 echo $ECHO_N "(cached) $ECHO_C" >&6
7016else
7017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007018/* confdefs.h. */
7019_ACEOF
7020cat confdefs.h >>conftest.$ac_ext
7021cat >>conftest.$ac_ext <<_ACEOF
7022/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007023#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
7025_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007026if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007027 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007028 ac_cv_type_uid_t=yes
7029else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007030 ac_cv_type_uid_t=no
7031fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +00007032rm -f -r conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7036echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007037if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038
Martin v. Löwis11437992002-04-12 09:54:03 +00007039cat >>confdefs.h <<\_ACEOF
7040#define uid_t int
7041_ACEOF
7042
7043
7044cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047
7048fi
7049
Martin v. Löwiseba40652007-08-30 20:10:57 +00007050{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7051echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007052if test "${ac_cv_type_ssize_t+set}" = set; then
7053 echo $ECHO_N "(cached) $ECHO_C" >&6
7054else
7055 cat >conftest.$ac_ext <<_ACEOF
7056/* confdefs.h. */
7057_ACEOF
7058cat confdefs.h >>conftest.$ac_ext
7059cat >>conftest.$ac_ext <<_ACEOF
7060/* end confdefs.h. */
7061$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007062typedef ssize_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007063int
7064main ()
7065{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007066if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00007067 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007068if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00007069 return 0;
7070 ;
7071 return 0;
7072}
7073_ACEOF
7074rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007075if { (ac_try="$ac_compile"
7076case "(($ac_try" in
7077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7078 *) ac_try_echo=$ac_try;;
7079esac
7080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007082 ac_status=$?
7083 grep -v '^ *+' conftest.er1 >conftest.err
7084 rm -f conftest.er1
7085 cat conftest.err >&5
7086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007087 (exit $ac_status); } && {
7088 test -z "$ac_c_werror_flag" ||
7089 test ! -s conftest.err
7090 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007091 ac_cv_type_ssize_t=yes
7092else
7093 echo "$as_me: failed program was:" >&5
7094sed 's/^/| /' conftest.$ac_ext >&5
7095
Martin v. Löwiseba40652007-08-30 20:10:57 +00007096 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007098
7099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007100fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007101{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7102echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007103if test $ac_cv_type_ssize_t = yes; then
7104
7105cat >>confdefs.h <<\_ACEOF
7106#define HAVE_SSIZE_T 1
7107_ACEOF
7108
7109fi
7110
Jack Jansendd19cf82001-12-06 22:36:17 +00007111
Michael W. Hudson54241132001-12-07 15:38:26 +00007112# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007113# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007114{ echo "$as_me:$LINENO: checking for int" >&5
7115echo $ECHO_N "checking for int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007116if test "${ac_cv_type_int+set}" = set; then
7117 echo $ECHO_N "(cached) $ECHO_C" >&6
7118else
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 +00007126typedef int ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007127int
7128main ()
7129{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007130if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007131 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007132if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007133 return 0;
7134 ;
7135 return 0;
7136}
7137_ACEOF
7138rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007139if { (ac_try="$ac_compile"
7140case "(($ac_try" in
7141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7142 *) ac_try_echo=$ac_try;;
7143esac
7144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007147 grep -v '^ *+' conftest.er1 >conftest.err
7148 rm -f conftest.er1
7149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007151 (exit $ac_status); } && {
7152 test -z "$ac_c_werror_flag" ||
7153 test ! -s conftest.err
7154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007155 ac_cv_type_int=yes
7156else
7157 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007158sed 's/^/| /' conftest.$ac_ext >&5
7159
Martin v. Löwiseba40652007-08-30 20:10:57 +00007160 ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007161fi
Brett Cannon19fab762007-06-02 03:02:29 +00007162
Martin v. Löwiseba40652007-08-30 20:10:57 +00007163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7164fi
7165{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7166echo "${ECHO_T}$ac_cv_type_int" >&6; }
7167
7168# The cast to long int works around a bug in the HP C Compiler
7169# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7170# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7171# This bug is HP SR number 8606223364.
7172{ echo "$as_me:$LINENO: checking size of int" >&5
7173echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007174if test "${ac_cv_sizeof_int+set}" = set; then
7175 echo $ECHO_N "(cached) $ECHO_C" >&6
7176else
Martin v. Löwis11437992002-04-12 09:54:03 +00007177 if test "$cross_compiling" = yes; then
7178 # Depending upon the size, compute the lo and hi bounds.
7179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007180/* confdefs.h. */
7181_ACEOF
7182cat confdefs.h >>conftest.$ac_ext
7183cat >>conftest.$ac_ext <<_ACEOF
7184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007185$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007186 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007187int
7188main ()
7189{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007191test_array [0] = 0
7192
7193 ;
7194 return 0;
7195}
7196_ACEOF
7197rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007198if { (ac_try="$ac_compile"
7199case "(($ac_try" in
7200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7201 *) ac_try_echo=$ac_try;;
7202esac
7203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7204 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007206 grep -v '^ *+' conftest.er1 >conftest.err
7207 rm -f conftest.er1
7208 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007210 (exit $ac_status); } && {
7211 test -z "$ac_c_werror_flag" ||
7212 test ! -s conftest.err
7213 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007214 ac_lo=0 ac_mid=0
7215 while :; do
7216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007217/* confdefs.h. */
7218_ACEOF
7219cat confdefs.h >>conftest.$ac_ext
7220cat >>conftest.$ac_ext <<_ACEOF
7221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007222$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007223 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007224int
7225main ()
7226{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007227static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007228test_array [0] = 0
7229
7230 ;
7231 return 0;
7232}
7233_ACEOF
7234rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007235if { (ac_try="$ac_compile"
7236case "(($ac_try" in
7237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7238 *) ac_try_echo=$ac_try;;
7239esac
7240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7241 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007243 grep -v '^ *+' conftest.er1 >conftest.err
7244 rm -f conftest.er1
7245 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007247 (exit $ac_status); } && {
7248 test -z "$ac_c_werror_flag" ||
7249 test ! -s conftest.err
7250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007251 ac_hi=$ac_mid; break
7252else
7253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007254sed 's/^/| /' conftest.$ac_ext >&5
7255
Martin v. Löwiseba40652007-08-30 20:10:57 +00007256 ac_lo=`expr $ac_mid + 1`
7257 if test $ac_lo -le $ac_mid; then
7258 ac_lo= ac_hi=
7259 break
7260 fi
7261 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007262fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007263
7264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 done
7266else
7267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007268sed 's/^/| /' conftest.$ac_ext >&5
7269
Martin v. Löwiseba40652007-08-30 20:10:57 +00007270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007271/* confdefs.h. */
7272_ACEOF
7273cat confdefs.h >>conftest.$ac_ext
7274cat >>conftest.$ac_ext <<_ACEOF
7275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007276$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007277 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007278int
7279main ()
7280{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007281static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007282test_array [0] = 0
7283
7284 ;
7285 return 0;
7286}
7287_ACEOF
7288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007289if { (ac_try="$ac_compile"
7290case "(($ac_try" in
7291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7292 *) ac_try_echo=$ac_try;;
7293esac
7294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007297 grep -v '^ *+' conftest.er1 >conftest.err
7298 rm -f conftest.er1
7299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007301 (exit $ac_status); } && {
7302 test -z "$ac_c_werror_flag" ||
7303 test ! -s conftest.err
7304 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007305 ac_hi=-1 ac_mid=-1
7306 while :; do
7307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007308/* confdefs.h. */
7309_ACEOF
7310cat confdefs.h >>conftest.$ac_ext
7311cat >>conftest.$ac_ext <<_ACEOF
7312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007313$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007315int
7316main ()
7317{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007319test_array [0] = 0
7320
7321 ;
7322 return 0;
7323}
7324_ACEOF
7325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007326if { (ac_try="$ac_compile"
7327case "(($ac_try" in
7328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7329 *) ac_try_echo=$ac_try;;
7330esac
7331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007334 grep -v '^ *+' conftest.er1 >conftest.err
7335 rm -f conftest.er1
7336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007338 (exit $ac_status); } && {
7339 test -z "$ac_c_werror_flag" ||
7340 test ! -s conftest.err
7341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007342 ac_lo=$ac_mid; break
7343else
7344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007345sed 's/^/| /' conftest.$ac_ext >&5
7346
Martin v. Löwiseba40652007-08-30 20:10:57 +00007347 ac_hi=`expr '(' $ac_mid ')' - 1`
7348 if test $ac_mid -le $ac_hi; then
7349 ac_lo= ac_hi=
7350 break
7351 fi
7352 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007354
7355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007356 done
7357else
7358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007359sed 's/^/| /' conftest.$ac_ext >&5
7360
Martin v. Löwiseba40652007-08-30 20:10:57 +00007361 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007363
7364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007365fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007366
7367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007368# Binary search between lo and hi bounds.
7369while test "x$ac_lo" != "x$ac_hi"; do
7370 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7371 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007372/* confdefs.h. */
7373_ACEOF
7374cat confdefs.h >>conftest.$ac_ext
7375cat >>conftest.$ac_ext <<_ACEOF
7376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007377$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007378 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007379int
7380main ()
7381{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007382static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007383test_array [0] = 0
7384
7385 ;
7386 return 0;
7387}
7388_ACEOF
7389rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007390if { (ac_try="$ac_compile"
7391case "(($ac_try" in
7392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7393 *) ac_try_echo=$ac_try;;
7394esac
7395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007398 grep -v '^ *+' conftest.er1 >conftest.err
7399 rm -f conftest.er1
7400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007402 (exit $ac_status); } && {
7403 test -z "$ac_c_werror_flag" ||
7404 test ! -s conftest.err
7405 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007406 ac_hi=$ac_mid
7407else
7408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007409sed 's/^/| /' conftest.$ac_ext >&5
7410
Martin v. Löwiseba40652007-08-30 20:10:57 +00007411 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007413
7414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007415done
7416case $ac_lo in
7417?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007418'') if test "$ac_cv_type_int" = yes; then
7419 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007420See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007421echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007422See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007423 { (exit 77); exit 77; }; }
7424 else
7425 ac_cv_sizeof_int=0
7426 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007427esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007428else
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007430/* confdefs.h. */
7431_ACEOF
7432cat confdefs.h >>conftest.$ac_ext
7433cat >>conftest.$ac_ext <<_ACEOF
7434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007435$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007436 typedef int ac__type_sizeof_;
7437static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7438static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007439#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007440#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007441int
7442main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007443{
Martin v. Löwis11437992002-04-12 09:54:03 +00007444
7445 FILE *f = fopen ("conftest.val", "w");
7446 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007447 return 1;
7448 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007449 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007450 long int i = longval ();
7451 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7452 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007453 fprintf (f, "%ld\n", i);
7454 }
7455 else
7456 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007457 unsigned long int i = ulongval ();
7458 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7459 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007460 fprintf (f, "%lu\n", i);
7461 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007463
7464 ;
7465 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007466}
Martin v. Löwis11437992002-04-12 09:54:03 +00007467_ACEOF
7468rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007469if { (ac_try="$ac_link"
7470case "(($ac_try" in
7471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7472 *) ac_try_echo=$ac_try;;
7473esac
7474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7475 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007476 ac_status=$?
7477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7478 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007479 { (case "(($ac_try" in
7480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7481 *) ac_try_echo=$ac_try;;
7482esac
7483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7484 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007485 ac_status=$?
7486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7487 (exit $ac_status); }; }; then
7488 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007489else
Martin v. Löwis11437992002-04-12 09:54:03 +00007490 echo "$as_me: program exited with status $ac_status" >&5
7491echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007492sed 's/^/| /' conftest.$ac_ext >&5
7493
Martin v. Löwis11437992002-04-12 09:54:03 +00007494( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495if test "$ac_cv_type_int" = yes; then
7496 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007497See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007498echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007499See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007500 { (exit 77); exit 77; }; }
7501 else
7502 ac_cv_sizeof_int=0
7503 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007505rm -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 +00007506fi
7507rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007509{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7510echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
7511
7512
7513
Martin v. Löwis11437992002-04-12 09:54:03 +00007514cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007515#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007516_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007517
7518
Martin v. Löwiseba40652007-08-30 20:10:57 +00007519{ echo "$as_me:$LINENO: checking for long" >&5
7520echo $ECHO_N "checking for long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007521if test "${ac_cv_type_long+set}" = set; then
7522 echo $ECHO_N "(cached) $ECHO_C" >&6
7523else
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 +00007531typedef long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007532int
7533main ()
7534{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007535if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007537if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007538 return 0;
7539 ;
7540 return 0;
7541}
7542_ACEOF
7543rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007544if { (ac_try="$ac_compile"
7545case "(($ac_try" in
7546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7547 *) ac_try_echo=$ac_try;;
7548esac
7549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7550 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007552 grep -v '^ *+' conftest.er1 >conftest.err
7553 rm -f conftest.er1
7554 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007556 (exit $ac_status); } && {
7557 test -z "$ac_c_werror_flag" ||
7558 test ! -s conftest.err
7559 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007560 ac_cv_type_long=yes
7561else
7562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007563sed 's/^/| /' conftest.$ac_ext >&5
7564
Martin v. Löwiseba40652007-08-30 20:10:57 +00007565 ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007566fi
Brett Cannon19fab762007-06-02 03:02:29 +00007567
Martin v. Löwiseba40652007-08-30 20:10:57 +00007568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7569fi
7570{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7571echo "${ECHO_T}$ac_cv_type_long" >&6; }
7572
7573# The cast to long int works around a bug in the HP C Compiler
7574# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7575# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7576# This bug is HP SR number 8606223364.
7577{ echo "$as_me:$LINENO: checking size of long" >&5
7578echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007579if test "${ac_cv_sizeof_long+set}" = set; then
7580 echo $ECHO_N "(cached) $ECHO_C" >&6
7581else
Martin v. Löwis11437992002-04-12 09:54:03 +00007582 if test "$cross_compiling" = yes; then
7583 # Depending upon the size, compute the lo and hi bounds.
7584cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007585/* confdefs.h. */
7586_ACEOF
7587cat confdefs.h >>conftest.$ac_ext
7588cat >>conftest.$ac_ext <<_ACEOF
7589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007590$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007591 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007592int
7593main ()
7594{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007596test_array [0] = 0
7597
7598 ;
7599 return 0;
7600}
7601_ACEOF
7602rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007603if { (ac_try="$ac_compile"
7604case "(($ac_try" in
7605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7606 *) ac_try_echo=$ac_try;;
7607esac
7608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007611 grep -v '^ *+' conftest.er1 >conftest.err
7612 rm -f conftest.er1
7613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007615 (exit $ac_status); } && {
7616 test -z "$ac_c_werror_flag" ||
7617 test ! -s conftest.err
7618 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 ac_lo=0 ac_mid=0
7620 while :; do
7621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007622/* confdefs.h. */
7623_ACEOF
7624cat confdefs.h >>conftest.$ac_ext
7625cat >>conftest.$ac_ext <<_ACEOF
7626/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007627$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007629int
7630main ()
7631{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007633test_array [0] = 0
7634
7635 ;
7636 return 0;
7637}
7638_ACEOF
7639rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640if { (ac_try="$ac_compile"
7641case "(($ac_try" in
7642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7643 *) ac_try_echo=$ac_try;;
7644esac
7645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007648 grep -v '^ *+' conftest.er1 >conftest.err
7649 rm -f conftest.er1
7650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007652 (exit $ac_status); } && {
7653 test -z "$ac_c_werror_flag" ||
7654 test ! -s conftest.err
7655 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_hi=$ac_mid; break
7657else
7658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007659sed 's/^/| /' conftest.$ac_ext >&5
7660
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661 ac_lo=`expr $ac_mid + 1`
7662 if test $ac_lo -le $ac_mid; then
7663 ac_lo= ac_hi=
7664 break
7665 fi
7666 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007668
7669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 done
7671else
7672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007673sed 's/^/| /' conftest.$ac_ext >&5
7674
Martin v. Löwiseba40652007-08-30 20:10:57 +00007675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007676/* confdefs.h. */
7677_ACEOF
7678cat confdefs.h >>conftest.$ac_ext
7679cat >>conftest.$ac_ext <<_ACEOF
7680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007681$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007682 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007683int
7684main ()
7685{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007687test_array [0] = 0
7688
7689 ;
7690 return 0;
7691}
7692_ACEOF
7693rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007694if { (ac_try="$ac_compile"
7695case "(($ac_try" in
7696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7697 *) ac_try_echo=$ac_try;;
7698esac
7699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007702 grep -v '^ *+' conftest.er1 >conftest.err
7703 rm -f conftest.er1
7704 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706 (exit $ac_status); } && {
7707 test -z "$ac_c_werror_flag" ||
7708 test ! -s conftest.err
7709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 ac_hi=-1 ac_mid=-1
7711 while :; do
7712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007713/* confdefs.h. */
7714_ACEOF
7715cat confdefs.h >>conftest.$ac_ext
7716cat >>conftest.$ac_ext <<_ACEOF
7717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007718$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007720int
7721main ()
7722{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007724test_array [0] = 0
7725
7726 ;
7727 return 0;
7728}
7729_ACEOF
7730rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007731if { (ac_try="$ac_compile"
7732case "(($ac_try" in
7733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7734 *) ac_try_echo=$ac_try;;
7735esac
7736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007739 grep -v '^ *+' conftest.er1 >conftest.err
7740 rm -f conftest.er1
7741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007743 (exit $ac_status); } && {
7744 test -z "$ac_c_werror_flag" ||
7745 test ! -s conftest.err
7746 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007747 ac_lo=$ac_mid; break
7748else
7749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007750sed 's/^/| /' conftest.$ac_ext >&5
7751
Martin v. Löwiseba40652007-08-30 20:10:57 +00007752 ac_hi=`expr '(' $ac_mid ')' - 1`
7753 if test $ac_mid -le $ac_hi; then
7754 ac_lo= ac_hi=
7755 break
7756 fi
7757 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007759
7760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007761 done
7762else
7763 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007764sed 's/^/| /' conftest.$ac_ext >&5
7765
Martin v. Löwiseba40652007-08-30 20:10:57 +00007766 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007768
7769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007770fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771
7772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773# Binary search between lo and hi bounds.
7774while test "x$ac_lo" != "x$ac_hi"; do
7775 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007777/* confdefs.h. */
7778_ACEOF
7779cat confdefs.h >>conftest.$ac_ext
7780cat >>conftest.$ac_ext <<_ACEOF
7781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007782$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007784int
7785main ()
7786{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007788test_array [0] = 0
7789
7790 ;
7791 return 0;
7792}
7793_ACEOF
7794rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007795if { (ac_try="$ac_compile"
7796case "(($ac_try" in
7797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7798 *) ac_try_echo=$ac_try;;
7799esac
7800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7801 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007803 grep -v '^ *+' conftest.er1 >conftest.err
7804 rm -f conftest.er1
7805 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007807 (exit $ac_status); } && {
7808 test -z "$ac_c_werror_flag" ||
7809 test ! -s conftest.err
7810 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 ac_hi=$ac_mid
7812else
7813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007814sed 's/^/| /' conftest.$ac_ext >&5
7815
Martin v. Löwiseba40652007-08-30 20:10:57 +00007816 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007818
7819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007820done
7821case $ac_lo in
7822?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823'') if test "$ac_cv_type_long" = yes; then
7824 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007825See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007826echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007827See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828 { (exit 77); exit 77; }; }
7829 else
7830 ac_cv_sizeof_long=0
7831 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007832esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007833else
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007835/* confdefs.h. */
7836_ACEOF
7837cat confdefs.h >>conftest.$ac_ext
7838cat >>conftest.$ac_ext <<_ACEOF
7839/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007840$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841 typedef long ac__type_sizeof_;
7842static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7843static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007844#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007845#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007846int
7847main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007848{
Martin v. Löwis11437992002-04-12 09:54:03 +00007849
7850 FILE *f = fopen ("conftest.val", "w");
7851 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007852 return 1;
7853 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007854 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007855 long int i = longval ();
7856 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7857 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 fprintf (f, "%ld\n", i);
7859 }
7860 else
7861 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862 unsigned long int i = ulongval ();
7863 if (i != ((long int) (sizeof (ac__type_sizeof_))))
7864 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007865 fprintf (f, "%lu\n", i);
7866 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007867 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007868
7869 ;
7870 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007871}
Martin v. Löwis11437992002-04-12 09:54:03 +00007872_ACEOF
7873rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874if { (ac_try="$ac_link"
7875case "(($ac_try" in
7876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7877 *) ac_try_echo=$ac_try;;
7878esac
7879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7880 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 ac_status=$?
7882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007884 { (case "(($ac_try" in
7885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7886 *) ac_try_echo=$ac_try;;
7887esac
7888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7889 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ac_status=$?
7891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7892 (exit $ac_status); }; }; then
7893 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007894else
Martin v. Löwis11437992002-04-12 09:54:03 +00007895 echo "$as_me: program exited with status $ac_status" >&5
7896echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007897sed 's/^/| /' conftest.$ac_ext >&5
7898
Martin v. Löwis11437992002-04-12 09:54:03 +00007899( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900if test "$ac_cv_type_long" = yes; then
7901 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007902See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007903echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00007904See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905 { (exit 77); exit 77; }; }
7906 else
7907 ac_cv_sizeof_long=0
7908 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910rm -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 +00007911fi
7912rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007913fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7915echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
7916
7917
7918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007920#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007921_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007922
7923
Martin v. Löwiseba40652007-08-30 20:10:57 +00007924{ echo "$as_me:$LINENO: checking for void *" >&5
7925echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007926if test "${ac_cv_type_void_p+set}" = set; then
7927 echo $ECHO_N "(cached) $ECHO_C" >&6
7928else
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 +00007936typedef void * ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007937int
7938main ()
7939{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007940if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007941 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00007943 return 0;
7944 ;
7945 return 0;
7946}
7947_ACEOF
7948rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007949if { (ac_try="$ac_compile"
7950case "(($ac_try" in
7951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7952 *) ac_try_echo=$ac_try;;
7953esac
7954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007961 (exit $ac_status); } && {
7962 test -z "$ac_c_werror_flag" ||
7963 test ! -s conftest.err
7964 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007965 ac_cv_type_void_p=yes
7966else
7967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007968sed 's/^/| /' conftest.$ac_ext >&5
7969
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970 ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007971fi
Brett Cannon19fab762007-06-02 03:02:29 +00007972
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7974fi
7975{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7976echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
7977
7978# The cast to long int works around a bug in the HP C Compiler
7979# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7980# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7981# This bug is HP SR number 8606223364.
7982{ echo "$as_me:$LINENO: checking size of void *" >&5
7983echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007984if test "${ac_cv_sizeof_void_p+set}" = set; then
7985 echo $ECHO_N "(cached) $ECHO_C" >&6
7986else
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 if test "$cross_compiling" = yes; then
7988 # Depending upon the size, compute the lo and hi bounds.
7989cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007990/* confdefs.h. */
7991_ACEOF
7992cat confdefs.h >>conftest.$ac_ext
7993cat >>conftest.$ac_ext <<_ACEOF
7994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007995$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00007996 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007997int
7998main ()
7999{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008000static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008001test_array [0] = 0
8002
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008008if { (ac_try="$ac_compile"
8009case "(($ac_try" in
8010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8011 *) ac_try_echo=$ac_try;;
8012esac
8013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008016 grep -v '^ *+' conftest.er1 >conftest.err
8017 rm -f conftest.er1
8018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008020 (exit $ac_status); } && {
8021 test -z "$ac_c_werror_flag" ||
8022 test ! -s conftest.err
8023 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_lo=0 ac_mid=0
8025 while :; do
8026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008027/* confdefs.h. */
8028_ACEOF
8029cat confdefs.h >>conftest.$ac_ext
8030cat >>conftest.$ac_ext <<_ACEOF
8031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008032$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008033 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008034int
8035main ()
8036{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008037static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008038test_array [0] = 0
8039
8040 ;
8041 return 0;
8042}
8043_ACEOF
8044rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008045if { (ac_try="$ac_compile"
8046case "(($ac_try" in
8047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8048 *) ac_try_echo=$ac_try;;
8049esac
8050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8051 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008053 grep -v '^ *+' conftest.er1 >conftest.err
8054 rm -f conftest.er1
8055 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008057 (exit $ac_status); } && {
8058 test -z "$ac_c_werror_flag" ||
8059 test ! -s conftest.err
8060 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008061 ac_hi=$ac_mid; break
8062else
8063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008064sed 's/^/| /' conftest.$ac_ext >&5
8065
Martin v. Löwiseba40652007-08-30 20:10:57 +00008066 ac_lo=`expr $ac_mid + 1`
8067 if test $ac_lo -le $ac_mid; then
8068 ac_lo= ac_hi=
8069 break
8070 fi
8071 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008073
8074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 done
8076else
8077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008078sed 's/^/| /' conftest.$ac_ext >&5
8079
Martin v. Löwiseba40652007-08-30 20:10:57 +00008080 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008081/* confdefs.h. */
8082_ACEOF
8083cat confdefs.h >>conftest.$ac_ext
8084cat >>conftest.$ac_ext <<_ACEOF
8085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008086$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008087 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008088int
8089main ()
8090{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008091static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008092test_array [0] = 0
8093
8094 ;
8095 return 0;
8096}
8097_ACEOF
8098rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008099if { (ac_try="$ac_compile"
8100case "(($ac_try" in
8101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8102 *) ac_try_echo=$ac_try;;
8103esac
8104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8105 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008107 grep -v '^ *+' conftest.er1 >conftest.err
8108 rm -f conftest.er1
8109 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008111 (exit $ac_status); } && {
8112 test -z "$ac_c_werror_flag" ||
8113 test ! -s conftest.err
8114 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 ac_hi=-1 ac_mid=-1
8116 while :; do
8117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008118/* confdefs.h. */
8119_ACEOF
8120cat confdefs.h >>conftest.$ac_ext
8121cat >>conftest.$ac_ext <<_ACEOF
8122/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008123$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008124 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008125int
8126main ()
8127{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008128static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008129test_array [0] = 0
8130
8131 ;
8132 return 0;
8133}
8134_ACEOF
8135rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008136if { (ac_try="$ac_compile"
8137case "(($ac_try" in
8138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8139 *) ac_try_echo=$ac_try;;
8140esac
8141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008144 grep -v '^ *+' conftest.er1 >conftest.err
8145 rm -f conftest.er1
8146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008148 (exit $ac_status); } && {
8149 test -z "$ac_c_werror_flag" ||
8150 test ! -s conftest.err
8151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008152 ac_lo=$ac_mid; break
8153else
8154 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008155sed 's/^/| /' conftest.$ac_ext >&5
8156
Martin v. Löwiseba40652007-08-30 20:10:57 +00008157 ac_hi=`expr '(' $ac_mid ')' - 1`
8158 if test $ac_mid -le $ac_hi; then
8159 ac_lo= ac_hi=
8160 break
8161 fi
8162 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008163fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164
8165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008166 done
8167else
8168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008169sed 's/^/| /' conftest.$ac_ext >&5
8170
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008172fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008173
8174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008175fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176
8177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008178# Binary search between lo and hi bounds.
8179while test "x$ac_lo" != "x$ac_hi"; do
8180 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008182/* confdefs.h. */
8183_ACEOF
8184cat confdefs.h >>conftest.$ac_ext
8185cat >>conftest.$ac_ext <<_ACEOF
8186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008187$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008188 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008189int
8190main ()
8191{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008193test_array [0] = 0
8194
8195 ;
8196 return 0;
8197}
8198_ACEOF
8199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008200if { (ac_try="$ac_compile"
8201case "(($ac_try" in
8202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8203 *) ac_try_echo=$ac_try;;
8204esac
8205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008208 grep -v '^ *+' conftest.er1 >conftest.err
8209 rm -f conftest.er1
8210 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008212 (exit $ac_status); } && {
8213 test -z "$ac_c_werror_flag" ||
8214 test ! -s conftest.err
8215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 ac_hi=$ac_mid
8217else
8218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008219sed 's/^/| /' conftest.$ac_ext >&5
8220
Martin v. Löwiseba40652007-08-30 20:10:57 +00008221 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008223
8224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008225done
8226case $ac_lo in
8227?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228'') if test "$ac_cv_type_void_p" = yes; then
8229 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008230See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008232See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008233 { (exit 77); exit 77; }; }
8234 else
8235 ac_cv_sizeof_void_p=0
8236 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008237esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008238else
Martin v. Löwis11437992002-04-12 09:54:03 +00008239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008240/* confdefs.h. */
8241_ACEOF
8242cat confdefs.h >>conftest.$ac_ext
8243cat >>conftest.$ac_ext <<_ACEOF
8244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008245$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008246 typedef void * ac__type_sizeof_;
8247static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8248static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008249#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008250#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008251int
8252main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008253{
Martin v. Löwis11437992002-04-12 09:54:03 +00008254
8255 FILE *f = fopen ("conftest.val", "w");
8256 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008257 return 1;
8258 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008259 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008260 long int i = longval ();
8261 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8262 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 fprintf (f, "%ld\n", i);
8264 }
8265 else
8266 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267 unsigned long int i = ulongval ();
8268 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8269 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008270 fprintf (f, "%lu\n", i);
8271 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008272 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008273
8274 ;
8275 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008276}
Martin v. Löwis11437992002-04-12 09:54:03 +00008277_ACEOF
8278rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279if { (ac_try="$ac_link"
8280case "(($ac_try" in
8281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8282 *) ac_try_echo=$ac_try;;
8283esac
8284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8285 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 ac_status=$?
8287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8288 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008289 { (case "(($ac_try" in
8290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8291 *) ac_try_echo=$ac_try;;
8292esac
8293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8294 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ac_status=$?
8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297 (exit $ac_status); }; }; then
8298 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008299else
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 echo "$as_me: program exited with status $ac_status" >&5
8301echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008302sed 's/^/| /' conftest.$ac_ext >&5
8303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008305if test "$ac_cv_type_void_p" = yes; then
8306 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008307See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008308echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008309See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008310 { (exit 77); exit 77; }; }
8311 else
8312 ac_cv_sizeof_void_p=0
8313 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008315rm -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 +00008316fi
8317rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008318fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8320echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
8321
8322
8323
Martin v. Löwis11437992002-04-12 09:54:03 +00008324cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008325#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008326_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008327
8328
Martin v. Löwiseba40652007-08-30 20:10:57 +00008329{ echo "$as_me:$LINENO: checking for short" >&5
8330echo $ECHO_N "checking for short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008331if test "${ac_cv_type_short+set}" = set; then
8332 echo $ECHO_N "(cached) $ECHO_C" >&6
8333else
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 +00008341typedef short ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008342int
8343main ()
8344{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008347if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008348 return 0;
8349 ;
8350 return 0;
8351}
8352_ACEOF
8353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008354if { (ac_try="$ac_compile"
8355case "(($ac_try" in
8356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8357 *) ac_try_echo=$ac_try;;
8358esac
8359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008362 grep -v '^ *+' conftest.er1 >conftest.err
8363 rm -f conftest.er1
8364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008366 (exit $ac_status); } && {
8367 test -z "$ac_c_werror_flag" ||
8368 test ! -s conftest.err
8369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008370 ac_cv_type_short=yes
8371else
8372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008373sed 's/^/| /' conftest.$ac_ext >&5
8374
Martin v. Löwiseba40652007-08-30 20:10:57 +00008375 ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008376fi
Brett Cannon19fab762007-06-02 03:02:29 +00008377
Martin v. Löwiseba40652007-08-30 20:10:57 +00008378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8379fi
8380{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8381echo "${ECHO_T}$ac_cv_type_short" >&6; }
8382
8383# The cast to long int works around a bug in the HP C Compiler
8384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8386# This bug is HP SR number 8606223364.
8387{ echo "$as_me:$LINENO: checking size of short" >&5
8388echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008389if test "${ac_cv_sizeof_short+set}" = set; then
8390 echo $ECHO_N "(cached) $ECHO_C" >&6
8391else
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 if test "$cross_compiling" = yes; then
8393 # Depending upon the size, compute the lo and hi bounds.
8394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008395/* confdefs.h. */
8396_ACEOF
8397cat confdefs.h >>conftest.$ac_ext
8398cat >>conftest.$ac_ext <<_ACEOF
8399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008400$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008401 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008402int
8403main ()
8404{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008405static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008406test_array [0] = 0
8407
8408 ;
8409 return 0;
8410}
8411_ACEOF
8412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008413if { (ac_try="$ac_compile"
8414case "(($ac_try" in
8415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8416 *) ac_try_echo=$ac_try;;
8417esac
8418eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008421 grep -v '^ *+' conftest.er1 >conftest.err
8422 rm -f conftest.er1
8423 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008425 (exit $ac_status); } && {
8426 test -z "$ac_c_werror_flag" ||
8427 test ! -s conftest.err
8428 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 ac_lo=0 ac_mid=0
8430 while :; do
8431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008432/* confdefs.h. */
8433_ACEOF
8434cat confdefs.h >>conftest.$ac_ext
8435cat >>conftest.$ac_ext <<_ACEOF
8436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008437$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008438 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008439int
8440main ()
8441{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008443test_array [0] = 0
8444
8445 ;
8446 return 0;
8447}
8448_ACEOF
8449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450if { (ac_try="$ac_compile"
8451case "(($ac_try" in
8452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8453 *) ac_try_echo=$ac_try;;
8454esac
8455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008458 grep -v '^ *+' conftest.er1 >conftest.err
8459 rm -f conftest.er1
8460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008462 (exit $ac_status); } && {
8463 test -z "$ac_c_werror_flag" ||
8464 test ! -s conftest.err
8465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008466 ac_hi=$ac_mid; break
8467else
8468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008469sed 's/^/| /' conftest.$ac_ext >&5
8470
Martin v. Löwiseba40652007-08-30 20:10:57 +00008471 ac_lo=`expr $ac_mid + 1`
8472 if test $ac_lo -le $ac_mid; then
8473 ac_lo= ac_hi=
8474 break
8475 fi
8476 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478
8479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008480 done
8481else
8482 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008483sed 's/^/| /' conftest.$ac_ext >&5
8484
Martin v. Löwiseba40652007-08-30 20:10:57 +00008485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008486/* confdefs.h. */
8487_ACEOF
8488cat confdefs.h >>conftest.$ac_ext
8489cat >>conftest.$ac_ext <<_ACEOF
8490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008491$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008492 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008493int
8494main ()
8495{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008496static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008497test_array [0] = 0
8498
8499 ;
8500 return 0;
8501}
8502_ACEOF
8503rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008504if { (ac_try="$ac_compile"
8505case "(($ac_try" in
8506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8507 *) ac_try_echo=$ac_try;;
8508esac
8509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8510 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008512 grep -v '^ *+' conftest.er1 >conftest.err
8513 rm -f conftest.er1
8514 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008516 (exit $ac_status); } && {
8517 test -z "$ac_c_werror_flag" ||
8518 test ! -s conftest.err
8519 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_hi=-1 ac_mid=-1
8521 while :; do
8522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008523/* confdefs.h. */
8524_ACEOF
8525cat confdefs.h >>conftest.$ac_ext
8526cat >>conftest.$ac_ext <<_ACEOF
8527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008528$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008529 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008530int
8531main ()
8532{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008533static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008534test_array [0] = 0
8535
8536 ;
8537 return 0;
8538}
8539_ACEOF
8540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008541if { (ac_try="$ac_compile"
8542case "(($ac_try" in
8543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8544 *) ac_try_echo=$ac_try;;
8545esac
8546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8547 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008549 grep -v '^ *+' conftest.er1 >conftest.err
8550 rm -f conftest.er1
8551 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008553 (exit $ac_status); } && {
8554 test -z "$ac_c_werror_flag" ||
8555 test ! -s conftest.err
8556 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 ac_lo=$ac_mid; break
8558else
8559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008560sed 's/^/| /' conftest.$ac_ext >&5
8561
Martin v. Löwiseba40652007-08-30 20:10:57 +00008562 ac_hi=`expr '(' $ac_mid ')' - 1`
8563 if test $ac_mid -le $ac_hi; then
8564 ac_lo= ac_hi=
8565 break
8566 fi
8567 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569
8570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 done
8572else
8573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008574sed 's/^/| /' conftest.$ac_ext >&5
8575
Martin v. Löwiseba40652007-08-30 20:10:57 +00008576 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008578
8579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008580fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581
8582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008583# Binary search between lo and hi bounds.
8584while test "x$ac_lo" != "x$ac_hi"; do
8585 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008587/* confdefs.h. */
8588_ACEOF
8589cat confdefs.h >>conftest.$ac_ext
8590cat >>conftest.$ac_ext <<_ACEOF
8591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008592$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008593 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008594int
8595main ()
8596{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008598test_array [0] = 0
8599
8600 ;
8601 return 0;
8602}
8603_ACEOF
8604rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008605if { (ac_try="$ac_compile"
8606case "(($ac_try" in
8607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8608 *) ac_try_echo=$ac_try;;
8609esac
8610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008613 grep -v '^ *+' conftest.er1 >conftest.err
8614 rm -f conftest.er1
8615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008617 (exit $ac_status); } && {
8618 test -z "$ac_c_werror_flag" ||
8619 test ! -s conftest.err
8620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008621 ac_hi=$ac_mid
8622else
8623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008624sed 's/^/| /' conftest.$ac_ext >&5
8625
Martin v. Löwiseba40652007-08-30 20:10:57 +00008626 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628
8629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008630done
8631case $ac_lo in
8632?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633'') if test "$ac_cv_type_short" = yes; then
8634 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008635See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008636echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008637See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008638 { (exit 77); exit 77; }; }
8639 else
8640 ac_cv_sizeof_short=0
8641 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008642esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008643else
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008645/* confdefs.h. */
8646_ACEOF
8647cat confdefs.h >>conftest.$ac_ext
8648cat >>conftest.$ac_ext <<_ACEOF
8649/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008650$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008651 typedef short ac__type_sizeof_;
8652static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8653static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008654#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008655#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008656int
8657main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008658{
Martin v. Löwis11437992002-04-12 09:54:03 +00008659
8660 FILE *f = fopen ("conftest.val", "w");
8661 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008662 return 1;
8663 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008665 long int i = longval ();
8666 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8667 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 fprintf (f, "%ld\n", i);
8669 }
8670 else
8671 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672 unsigned long int i = ulongval ();
8673 if (i != ((long int) (sizeof (ac__type_sizeof_))))
8674 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00008675 fprintf (f, "%lu\n", i);
8676 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008678
8679 ;
8680 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008681}
Martin v. Löwis11437992002-04-12 09:54:03 +00008682_ACEOF
8683rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684if { (ac_try="$ac_link"
8685case "(($ac_try" in
8686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8687 *) ac_try_echo=$ac_try;;
8688esac
8689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8690 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_status=$?
8692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8693 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008694 { (case "(($ac_try" in
8695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696 *) ac_try_echo=$ac_try;;
8697esac
8698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8699 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 ac_status=$?
8701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8702 (exit $ac_status); }; }; then
8703 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008704else
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 echo "$as_me: program exited with status $ac_status" >&5
8706echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008707sed 's/^/| /' conftest.$ac_ext >&5
8708
Martin v. Löwis11437992002-04-12 09:54:03 +00008709( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710if test "$ac_cv_type_short" = yes; then
8711 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008712See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008713echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00008714See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00008715 { (exit 77); exit 77; }; }
8716 else
8717 ac_cv_sizeof_short=0
8718 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008719fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008720rm -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 +00008721fi
8722rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00008723fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8725echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
8726
8727
8728
Martin v. Löwis11437992002-04-12 09:54:03 +00008729cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008730#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008731_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008732
8733
Martin v. Löwiseba40652007-08-30 20:10:57 +00008734{ echo "$as_me:$LINENO: checking for float" >&5
8735echo $ECHO_N "checking for float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008736if test "${ac_cv_type_float+set}" = set; then
8737 echo $ECHO_N "(cached) $ECHO_C" >&6
8738else
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 +00008746typedef float ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008747int
8748main ()
8749{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008750if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00008753 return 0;
8754 ;
8755 return 0;
8756}
8757_ACEOF
8758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008759if { (ac_try="$ac_compile"
8760case "(($ac_try" in
8761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8762 *) ac_try_echo=$ac_try;;
8763esac
8764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008767 grep -v '^ *+' conftest.er1 >conftest.err
8768 rm -f conftest.er1
8769 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771 (exit $ac_status); } && {
8772 test -z "$ac_c_werror_flag" ||
8773 test ! -s conftest.err
8774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ac_cv_type_float=yes
8776else
8777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008778sed 's/^/| /' conftest.$ac_ext >&5
8779
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780 ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008781fi
Brett Cannon19fab762007-06-02 03:02:29 +00008782
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8784fi
8785{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8786echo "${ECHO_T}$ac_cv_type_float" >&6; }
8787
8788# The cast to long int works around a bug in the HP C Compiler
8789# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8790# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8791# This bug is HP SR number 8606223364.
8792{ echo "$as_me:$LINENO: checking size of float" >&5
8793echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008794if test "${ac_cv_sizeof_float+set}" = set; then
8795 echo $ECHO_N "(cached) $ECHO_C" >&6
8796else
Martin v. Löwis11437992002-04-12 09:54:03 +00008797 if test "$cross_compiling" = yes; then
8798 # Depending upon the size, compute the lo and hi bounds.
8799cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008800/* confdefs.h. */
8801_ACEOF
8802cat confdefs.h >>conftest.$ac_ext
8803cat >>conftest.$ac_ext <<_ACEOF
8804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008806 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008807int
8808main ()
8809{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008811test_array [0] = 0
8812
8813 ;
8814 return 0;
8815}
8816_ACEOF
8817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818if { (ac_try="$ac_compile"
8819case "(($ac_try" in
8820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8821 *) ac_try_echo=$ac_try;;
8822esac
8823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008826 grep -v '^ *+' conftest.er1 >conftest.err
8827 rm -f conftest.er1
8828 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008830 (exit $ac_status); } && {
8831 test -z "$ac_c_werror_flag" ||
8832 test ! -s conftest.err
8833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 ac_lo=0 ac_mid=0
8835 while :; do
8836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008837/* confdefs.h. */
8838_ACEOF
8839cat confdefs.h >>conftest.$ac_ext
8840cat >>conftest.$ac_ext <<_ACEOF
8841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008842$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008844int
8845main ()
8846{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008847static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008848test_array [0] = 0
8849
8850 ;
8851 return 0;
8852}
8853_ACEOF
8854rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008855if { (ac_try="$ac_compile"
8856case "(($ac_try" in
8857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8858 *) ac_try_echo=$ac_try;;
8859esac
8860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8861 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008863 grep -v '^ *+' conftest.er1 >conftest.err
8864 rm -f conftest.er1
8865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008867 (exit $ac_status); } && {
8868 test -z "$ac_c_werror_flag" ||
8869 test ! -s conftest.err
8870 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_hi=$ac_mid; break
8872else
8873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008874sed 's/^/| /' conftest.$ac_ext >&5
8875
Martin v. Löwiseba40652007-08-30 20:10:57 +00008876 ac_lo=`expr $ac_mid + 1`
8877 if test $ac_lo -le $ac_mid; then
8878 ac_lo= ac_hi=
8879 break
8880 fi
8881 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008882fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883
8884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 done
8886else
8887 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008888sed 's/^/| /' conftest.$ac_ext >&5
8889
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008891/* confdefs.h. */
8892_ACEOF
8893cat confdefs.h >>conftest.$ac_ext
8894cat >>conftest.$ac_ext <<_ACEOF
8895/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008896$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008898int
8899main ()
8900{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008901static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008902test_array [0] = 0
8903
8904 ;
8905 return 0;
8906}
8907_ACEOF
8908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008909if { (ac_try="$ac_compile"
8910case "(($ac_try" in
8911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8912 *) ac_try_echo=$ac_try;;
8913esac
8914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008917 grep -v '^ *+' conftest.er1 >conftest.err
8918 rm -f conftest.er1
8919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008921 (exit $ac_status); } && {
8922 test -z "$ac_c_werror_flag" ||
8923 test ! -s conftest.err
8924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ac_hi=-1 ac_mid=-1
8926 while :; do
8927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008928/* confdefs.h. */
8929_ACEOF
8930cat confdefs.h >>conftest.$ac_ext
8931cat >>conftest.$ac_ext <<_ACEOF
8932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008933$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008934 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008939test_array [0] = 0
8940
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008946if { (ac_try="$ac_compile"
8947case "(($ac_try" in
8948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8949 *) ac_try_echo=$ac_try;;
8950esac
8951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8952 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008954 grep -v '^ *+' conftest.er1 >conftest.err
8955 rm -f conftest.er1
8956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958 (exit $ac_status); } && {
8959 test -z "$ac_c_werror_flag" ||
8960 test ! -s conftest.err
8961 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ac_lo=$ac_mid; break
8963else
8964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008965sed 's/^/| /' conftest.$ac_ext >&5
8966
Martin v. Löwiseba40652007-08-30 20:10:57 +00008967 ac_hi=`expr '(' $ac_mid ')' - 1`
8968 if test $ac_mid -le $ac_hi; then
8969 ac_lo= ac_hi=
8970 break
8971 fi
8972 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008974
8975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 done
8977else
8978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008979sed 's/^/| /' conftest.$ac_ext >&5
8980
Martin v. Löwiseba40652007-08-30 20:10:57 +00008981 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008983
8984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986
8987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008988# Binary search between lo and hi bounds.
8989while test "x$ac_lo" != "x$ac_hi"; do
8990 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008992/* confdefs.h. */
8993_ACEOF
8994cat confdefs.h >>conftest.$ac_ext
8995cat >>conftest.$ac_ext <<_ACEOF
8996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008997$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00008998 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008999int
9000main ()
9001{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009003test_array [0] = 0
9004
9005 ;
9006 return 0;
9007}
9008_ACEOF
9009rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009010if { (ac_try="$ac_compile"
9011case "(($ac_try" in
9012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9013 *) ac_try_echo=$ac_try;;
9014esac
9015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009018 grep -v '^ *+' conftest.er1 >conftest.err
9019 rm -f conftest.er1
9020 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009022 (exit $ac_status); } && {
9023 test -z "$ac_c_werror_flag" ||
9024 test ! -s conftest.err
9025 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 ac_hi=$ac_mid
9027else
9028 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009029sed 's/^/| /' conftest.$ac_ext >&5
9030
Martin v. Löwiseba40652007-08-30 20:10:57 +00009031 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009032fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009033
9034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009035done
9036case $ac_lo in
9037?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038'') if test "$ac_cv_type_float" = yes; then
9039 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009040See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009041echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009042See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009043 { (exit 77); exit 77; }; }
9044 else
9045 ac_cv_sizeof_float=0
9046 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009047esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009048else
Martin v. Löwis11437992002-04-12 09:54:03 +00009049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009050/* confdefs.h. */
9051_ACEOF
9052cat confdefs.h >>conftest.$ac_ext
9053cat >>conftest.$ac_ext <<_ACEOF
9054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009055$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009056 typedef float ac__type_sizeof_;
9057static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9058static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009059#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009060#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009061int
9062main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009063{
Martin v. Löwis11437992002-04-12 09:54:03 +00009064
9065 FILE *f = fopen ("conftest.val", "w");
9066 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009067 return 1;
9068 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009070 long int i = longval ();
9071 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9072 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 fprintf (f, "%ld\n", i);
9074 }
9075 else
9076 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077 unsigned long int i = ulongval ();
9078 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9079 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009080 fprintf (f, "%lu\n", i);
9081 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009083
9084 ;
9085 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009086}
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
9088rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089if { (ac_try="$ac_link"
9090case "(($ac_try" in
9091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9092 *) ac_try_echo=$ac_try;;
9093esac
9094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9095 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009096 ac_status=$?
9097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009099 { (case "(($ac_try" in
9100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9101 *) ac_try_echo=$ac_try;;
9102esac
9103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9104 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 ac_status=$?
9106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9107 (exit $ac_status); }; }; then
9108 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009109else
Martin v. Löwis11437992002-04-12 09:54:03 +00009110 echo "$as_me: program exited with status $ac_status" >&5
9111echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009112sed 's/^/| /' conftest.$ac_ext >&5
9113
Martin v. Löwis11437992002-04-12 09:54:03 +00009114( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115if test "$ac_cv_type_float" = yes; then
9116 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009117See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009118echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009119See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009120 { (exit 77); exit 77; }; }
9121 else
9122 ac_cv_sizeof_float=0
9123 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009125rm -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 +00009126fi
9127rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009128fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9130echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
9131
9132
9133
Martin v. Löwis11437992002-04-12 09:54:03 +00009134cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009135#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009136_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009137
9138
Martin v. Löwiseba40652007-08-30 20:10:57 +00009139{ echo "$as_me:$LINENO: checking for double" >&5
9140echo $ECHO_N "checking for double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009141if test "${ac_cv_type_double+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
9143else
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 +00009151typedef double ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009152int
9153main ()
9154{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009155if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009156 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 return 0;
9159 ;
9160 return 0;
9161}
9162_ACEOF
9163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009164if { (ac_try="$ac_compile"
9165case "(($ac_try" in
9166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9167 *) ac_try_echo=$ac_try;;
9168esac
9169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009172 grep -v '^ *+' conftest.er1 >conftest.err
9173 rm -f conftest.er1
9174 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009176 (exit $ac_status); } && {
9177 test -z "$ac_c_werror_flag" ||
9178 test ! -s conftest.err
9179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_cv_type_double=yes
9181else
9182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009183sed 's/^/| /' conftest.$ac_ext >&5
9184
Martin v. Löwiseba40652007-08-30 20:10:57 +00009185 ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009186fi
Brett Cannon19fab762007-06-02 03:02:29 +00009187
Martin v. Löwiseba40652007-08-30 20:10:57 +00009188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9189fi
9190{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9191echo "${ECHO_T}$ac_cv_type_double" >&6; }
9192
9193# The cast to long int works around a bug in the HP C Compiler
9194# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9195# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9196# This bug is HP SR number 8606223364.
9197{ echo "$as_me:$LINENO: checking size of double" >&5
9198echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009199if test "${ac_cv_sizeof_double+set}" = set; then
9200 echo $ECHO_N "(cached) $ECHO_C" >&6
9201else
Martin v. Löwis11437992002-04-12 09:54:03 +00009202 if test "$cross_compiling" = yes; then
9203 # Depending upon the size, compute the lo and hi bounds.
9204cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009205/* confdefs.h. */
9206_ACEOF
9207cat confdefs.h >>conftest.$ac_ext
9208cat >>conftest.$ac_ext <<_ACEOF
9209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009210$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009211 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009212int
9213main ()
9214{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009215static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009216test_array [0] = 0
9217
9218 ;
9219 return 0;
9220}
9221_ACEOF
9222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009223if { (ac_try="$ac_compile"
9224case "(($ac_try" in
9225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9226 *) ac_try_echo=$ac_try;;
9227esac
9228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9229 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009231 grep -v '^ *+' conftest.er1 >conftest.err
9232 rm -f conftest.er1
9233 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009235 (exit $ac_status); } && {
9236 test -z "$ac_c_werror_flag" ||
9237 test ! -s conftest.err
9238 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009239 ac_lo=0 ac_mid=0
9240 while :; do
9241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009242/* confdefs.h. */
9243_ACEOF
9244cat confdefs.h >>conftest.$ac_ext
9245cat >>conftest.$ac_ext <<_ACEOF
9246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009247$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009248 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009249int
9250main ()
9251{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009252static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009253test_array [0] = 0
9254
9255 ;
9256 return 0;
9257}
9258_ACEOF
9259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260if { (ac_try="$ac_compile"
9261case "(($ac_try" in
9262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9263 *) ac_try_echo=$ac_try;;
9264esac
9265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9266 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009268 grep -v '^ *+' conftest.er1 >conftest.err
9269 rm -f conftest.er1
9270 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009272 (exit $ac_status); } && {
9273 test -z "$ac_c_werror_flag" ||
9274 test ! -s conftest.err
9275 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009276 ac_hi=$ac_mid; break
9277else
9278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009279sed 's/^/| /' conftest.$ac_ext >&5
9280
Martin v. Löwiseba40652007-08-30 20:10:57 +00009281 ac_lo=`expr $ac_mid + 1`
9282 if test $ac_lo -le $ac_mid; then
9283 ac_lo= ac_hi=
9284 break
9285 fi
9286 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009288
9289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009290 done
9291else
9292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009293sed 's/^/| /' conftest.$ac_ext >&5
9294
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009296/* confdefs.h. */
9297_ACEOF
9298cat confdefs.h >>conftest.$ac_ext
9299cat >>conftest.$ac_ext <<_ACEOF
9300/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009301$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009302 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009303int
9304main ()
9305{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009307test_array [0] = 0
9308
9309 ;
9310 return 0;
9311}
9312_ACEOF
9313rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009314if { (ac_try="$ac_compile"
9315case "(($ac_try" in
9316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9317 *) ac_try_echo=$ac_try;;
9318esac
9319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9320 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009322 grep -v '^ *+' conftest.er1 >conftest.err
9323 rm -f conftest.er1
9324 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009326 (exit $ac_status); } && {
9327 test -z "$ac_c_werror_flag" ||
9328 test ! -s conftest.err
9329 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 ac_hi=-1 ac_mid=-1
9331 while :; do
9332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009333/* confdefs.h. */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009338$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009339 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009340int
9341main ()
9342{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009344test_array [0] = 0
9345
9346 ;
9347 return 0;
9348}
9349_ACEOF
9350rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009351if { (ac_try="$ac_compile"
9352case "(($ac_try" in
9353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9354 *) ac_try_echo=$ac_try;;
9355esac
9356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009359 grep -v '^ *+' conftest.er1 >conftest.err
9360 rm -f conftest.er1
9361 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009363 (exit $ac_status); } && {
9364 test -z "$ac_c_werror_flag" ||
9365 test ! -s conftest.err
9366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 ac_lo=$ac_mid; break
9368else
9369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009370sed 's/^/| /' conftest.$ac_ext >&5
9371
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372 ac_hi=`expr '(' $ac_mid ')' - 1`
9373 if test $ac_mid -le $ac_hi; then
9374 ac_lo= ac_hi=
9375 break
9376 fi
9377 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009379
9380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009381 done
9382else
9383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009384sed 's/^/| /' conftest.$ac_ext >&5
9385
Martin v. Löwiseba40652007-08-30 20:10:57 +00009386 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009388
9389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391
9392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009393# Binary search between lo and hi bounds.
9394while test "x$ac_lo" != "x$ac_hi"; do
9395 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009397/* confdefs.h. */
9398_ACEOF
9399cat confdefs.h >>conftest.$ac_ext
9400cat >>conftest.$ac_ext <<_ACEOF
9401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009402$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009404int
9405main ()
9406{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009408test_array [0] = 0
9409
9410 ;
9411 return 0;
9412}
9413_ACEOF
9414rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009415if { (ac_try="$ac_compile"
9416case "(($ac_try" in
9417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9418 *) ac_try_echo=$ac_try;;
9419esac
9420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9421 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009423 grep -v '^ *+' conftest.er1 >conftest.err
9424 rm -f conftest.er1
9425 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009427 (exit $ac_status); } && {
9428 test -z "$ac_c_werror_flag" ||
9429 test ! -s conftest.err
9430 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 ac_hi=$ac_mid
9432else
9433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009434sed 's/^/| /' conftest.$ac_ext >&5
9435
Martin v. Löwiseba40652007-08-30 20:10:57 +00009436 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009438
9439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009440done
9441case $ac_lo in
9442?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443'') if test "$ac_cv_type_double" = yes; then
9444 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009445See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009446echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009447See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009448 { (exit 77); exit 77; }; }
9449 else
9450 ac_cv_sizeof_double=0
9451 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009452esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009453else
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009455/* confdefs.h. */
9456_ACEOF
9457cat confdefs.h >>conftest.$ac_ext
9458cat >>conftest.$ac_ext <<_ACEOF
9459/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009460$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009461 typedef double ac__type_sizeof_;
9462static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9463static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009464#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009465#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009466int
9467main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009468{
Martin v. Löwis11437992002-04-12 09:54:03 +00009469
9470 FILE *f = fopen ("conftest.val", "w");
9471 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009472 return 1;
9473 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009474 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009475 long int i = longval ();
9476 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9477 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 fprintf (f, "%ld\n", i);
9479 }
9480 else
9481 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 unsigned long int i = ulongval ();
9483 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9484 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009485 fprintf (f, "%lu\n", i);
9486 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009487 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009488
9489 ;
9490 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009491}
Martin v. Löwis11437992002-04-12 09:54:03 +00009492_ACEOF
9493rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494if { (ac_try="$ac_link"
9495case "(($ac_try" in
9496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9497 *) ac_try_echo=$ac_try;;
9498esac
9499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9500 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 ac_status=$?
9502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9503 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009504 { (case "(($ac_try" in
9505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9506 *) ac_try_echo=$ac_try;;
9507esac
9508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9509 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009510 ac_status=$?
9511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9512 (exit $ac_status); }; }; then
9513 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009514else
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 echo "$as_me: program exited with status $ac_status" >&5
9516echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009517sed 's/^/| /' conftest.$ac_ext >&5
9518
Martin v. Löwis11437992002-04-12 09:54:03 +00009519( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520if test "$ac_cv_type_double" = yes; then
9521 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009522See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009523echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009524See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009525 { (exit 77); exit 77; }; }
9526 else
9527 ac_cv_sizeof_double=0
9528 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009529fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009530rm -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 +00009531fi
9532rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009533fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9535echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
9536
9537
9538
Martin v. Löwis11437992002-04-12 09:54:03 +00009539cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009540#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009541_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009542
9543
Martin v. Löwiseba40652007-08-30 20:10:57 +00009544{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9545echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009546if test "${ac_cv_type_fpos_t+set}" = set; then
9547 echo $ECHO_N "(cached) $ECHO_C" >&6
9548else
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 +00009556typedef fpos_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009560if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +00009563 return 0;
9564 ;
9565 return 0;
9566}
9567_ACEOF
9568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009569if { (ac_try="$ac_compile"
9570case "(($ac_try" in
9571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9572 *) ac_try_echo=$ac_try;;
9573esac
9574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009577 grep -v '^ *+' conftest.er1 >conftest.err
9578 rm -f conftest.er1
9579 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009581 (exit $ac_status); } && {
9582 test -z "$ac_c_werror_flag" ||
9583 test ! -s conftest.err
9584 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ac_cv_type_fpos_t=yes
9586else
9587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009588sed 's/^/| /' conftest.$ac_ext >&5
9589
Martin v. Löwiseba40652007-08-30 20:10:57 +00009590 ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009591fi
Brett Cannon19fab762007-06-02 03:02:29 +00009592
Martin v. Löwiseba40652007-08-30 20:10:57 +00009593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9594fi
9595{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9596echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9597
9598# The cast to long int works around a bug in the HP C Compiler
9599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9601# This bug is HP SR number 8606223364.
9602{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
9603echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009604if test "${ac_cv_sizeof_fpos_t+set}" = set; then
9605 echo $ECHO_N "(cached) $ECHO_C" >&6
9606else
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 if test "$cross_compiling" = yes; then
9608 # Depending upon the size, compute the lo and hi bounds.
9609cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009610/* confdefs.h. */
9611_ACEOF
9612cat confdefs.h >>conftest.$ac_ext
9613cat >>conftest.$ac_ext <<_ACEOF
9614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009615$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009616 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009617int
9618main ()
9619{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009621test_array [0] = 0
9622
9623 ;
9624 return 0;
9625}
9626_ACEOF
9627rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009628if { (ac_try="$ac_compile"
9629case "(($ac_try" in
9630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9631 *) ac_try_echo=$ac_try;;
9632esac
9633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9634 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009636 grep -v '^ *+' conftest.er1 >conftest.err
9637 rm -f conftest.er1
9638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009640 (exit $ac_status); } && {
9641 test -z "$ac_c_werror_flag" ||
9642 test ! -s conftest.err
9643 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ac_lo=0 ac_mid=0
9645 while :; do
9646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009647/* confdefs.h. */
9648_ACEOF
9649cat confdefs.h >>conftest.$ac_ext
9650cat >>conftest.$ac_ext <<_ACEOF
9651/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009652$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009653 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009654int
9655main ()
9656{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009657static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009658test_array [0] = 0
9659
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665if { (ac_try="$ac_compile"
9666case "(($ac_try" in
9667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9668 *) ac_try_echo=$ac_try;;
9669esac
9670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009673 grep -v '^ *+' conftest.er1 >conftest.err
9674 rm -f conftest.er1
9675 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009677 (exit $ac_status); } && {
9678 test -z "$ac_c_werror_flag" ||
9679 test ! -s conftest.err
9680 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_hi=$ac_mid; break
9682else
9683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009684sed 's/^/| /' conftest.$ac_ext >&5
9685
Martin v. Löwiseba40652007-08-30 20:10:57 +00009686 ac_lo=`expr $ac_mid + 1`
9687 if test $ac_lo -le $ac_mid; then
9688 ac_lo= ac_hi=
9689 break
9690 fi
9691 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009693
9694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009695 done
9696else
9697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009698sed 's/^/| /' conftest.$ac_ext >&5
9699
Martin v. Löwiseba40652007-08-30 20:10:57 +00009700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009701/* confdefs.h. */
9702_ACEOF
9703cat confdefs.h >>conftest.$ac_ext
9704cat >>conftest.$ac_ext <<_ACEOF
9705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009706$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009708int
9709main ()
9710{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009711static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009712test_array [0] = 0
9713
9714 ;
9715 return 0;
9716}
9717_ACEOF
9718rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009719if { (ac_try="$ac_compile"
9720case "(($ac_try" in
9721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9722 *) ac_try_echo=$ac_try;;
9723esac
9724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009727 grep -v '^ *+' conftest.er1 >conftest.err
9728 rm -f conftest.er1
9729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009731 (exit $ac_status); } && {
9732 test -z "$ac_c_werror_flag" ||
9733 test ! -s conftest.err
9734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ac_hi=-1 ac_mid=-1
9736 while :; do
9737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009738/* confdefs.h. */
9739_ACEOF
9740cat confdefs.h >>conftest.$ac_ext
9741cat >>conftest.$ac_ext <<_ACEOF
9742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009744 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009745int
9746main ()
9747{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009749test_array [0] = 0
9750
9751 ;
9752 return 0;
9753}
9754_ACEOF
9755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009756if { (ac_try="$ac_compile"
9757case "(($ac_try" in
9758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9759 *) ac_try_echo=$ac_try;;
9760esac
9761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009764 grep -v '^ *+' conftest.er1 >conftest.err
9765 rm -f conftest.er1
9766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009768 (exit $ac_status); } && {
9769 test -z "$ac_c_werror_flag" ||
9770 test ! -s conftest.err
9771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009772 ac_lo=$ac_mid; break
9773else
9774 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009775sed 's/^/| /' conftest.$ac_ext >&5
9776
Martin v. Löwiseba40652007-08-30 20:10:57 +00009777 ac_hi=`expr '(' $ac_mid ')' - 1`
9778 if test $ac_mid -le $ac_hi; then
9779 ac_lo= ac_hi=
9780 break
9781 fi
9782 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784
9785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009786 done
9787else
9788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009789sed 's/^/| /' conftest.$ac_ext >&5
9790
Martin v. Löwiseba40652007-08-30 20:10:57 +00009791 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009792fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793
9794rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796
9797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009798# Binary search between lo and hi bounds.
9799while test "x$ac_lo" != "x$ac_hi"; do
9800 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009802/* confdefs.h. */
9803_ACEOF
9804cat confdefs.h >>conftest.$ac_ext
9805cat >>conftest.$ac_ext <<_ACEOF
9806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009808 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009809int
9810main ()
9811{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009813test_array [0] = 0
9814
9815 ;
9816 return 0;
9817}
9818_ACEOF
9819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009820if { (ac_try="$ac_compile"
9821case "(($ac_try" in
9822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9823 *) ac_try_echo=$ac_try;;
9824esac
9825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009828 grep -v '^ *+' conftest.er1 >conftest.err
9829 rm -f conftest.er1
9830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009832 (exit $ac_status); } && {
9833 test -z "$ac_c_werror_flag" ||
9834 test ! -s conftest.err
9835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_hi=$ac_mid
9837else
9838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009839sed 's/^/| /' conftest.$ac_ext >&5
9840
Martin v. Löwiseba40652007-08-30 20:10:57 +00009841 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009842fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009843
9844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009845done
9846case $ac_lo in
9847?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848'') if test "$ac_cv_type_fpos_t" = yes; then
9849 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009850See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009851echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009852See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009853 { (exit 77); exit 77; }; }
9854 else
9855 ac_cv_sizeof_fpos_t=0
9856 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009857esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009858else
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009860/* confdefs.h. */
9861_ACEOF
9862cat confdefs.h >>conftest.$ac_ext
9863cat >>conftest.$ac_ext <<_ACEOF
9864/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009865$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +00009866 typedef fpos_t ac__type_sizeof_;
9867static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9868static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009869#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009870#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009871int
9872main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009873{
Martin v. Löwis11437992002-04-12 09:54:03 +00009874
9875 FILE *f = fopen ("conftest.val", "w");
9876 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009877 return 1;
9878 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009880 long int i = longval ();
9881 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9882 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009883 fprintf (f, "%ld\n", i);
9884 }
9885 else
9886 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887 unsigned long int i = ulongval ();
9888 if (i != ((long int) (sizeof (ac__type_sizeof_))))
9889 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00009890 fprintf (f, "%lu\n", i);
9891 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009892 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009893
9894 ;
9895 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009896}
Martin v. Löwis11437992002-04-12 09:54:03 +00009897_ACEOF
9898rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899if { (ac_try="$ac_link"
9900case "(($ac_try" in
9901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9902 *) ac_try_echo=$ac_try;;
9903esac
9904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9905 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009906 ac_status=$?
9907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9908 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009909 { (case "(($ac_try" in
9910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9911 *) ac_try_echo=$ac_try;;
9912esac
9913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9914 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009915 ac_status=$?
9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917 (exit $ac_status); }; }; then
9918 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009919else
Martin v. Löwis11437992002-04-12 09:54:03 +00009920 echo "$as_me: program exited with status $ac_status" >&5
9921echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009922sed 's/^/| /' conftest.$ac_ext >&5
9923
Martin v. Löwis11437992002-04-12 09:54:03 +00009924( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925if test "$ac_cv_type_fpos_t" = yes; then
9926 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009927See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009928echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +00009929See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00009930 { (exit 77); exit 77; }; }
9931 else
9932 ac_cv_sizeof_fpos_t=0
9933 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009934fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009935rm -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 +00009936fi
9937rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009938fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9940echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
9941
9942
9943
Martin v. Löwis11437992002-04-12 09:54:03 +00009944cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009945#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009946_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009947
Michael W. Hudson54241132001-12-07 15:38:26 +00009948
Martin v. Löwiseba40652007-08-30 20:10:57 +00009949{ echo "$as_me:$LINENO: checking for size_t" >&5
9950echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009951if test "${ac_cv_type_size_t+set}" = set; then
9952 echo $ECHO_N "(cached) $ECHO_C" >&6
9953else
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 +00009961typedef size_t ac__type_new_;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009962int
9963main ()
9964{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009965if ((ac__type_new_ *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009966 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967if (sizeof (ac__type_new_))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009968 return 0;
9969 ;
9970 return 0;
9971}
9972_ACEOF
9973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974if { (ac_try="$ac_compile"
9975case "(($ac_try" in
9976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9977 *) ac_try_echo=$ac_try;;
9978esac
9979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009981 ac_status=$?
9982 grep -v '^ *+' conftest.er1 >conftest.err
9983 rm -f conftest.er1
9984 cat conftest.err >&5
9985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986 (exit $ac_status); } && {
9987 test -z "$ac_c_werror_flag" ||
9988 test ! -s conftest.err
9989 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009990 ac_cv_type_size_t=yes
9991else
9992 echo "$as_me: failed program was:" >&5
9993sed 's/^/| /' conftest.$ac_ext >&5
9994
Martin v. Löwiseba40652007-08-30 20:10:57 +00009995 ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009996fi
Brett Cannon19fab762007-06-02 03:02:29 +00009997
Martin v. Löwiseba40652007-08-30 20:10:57 +00009998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9999fi
10000{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10001echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10002
10003# The cast to long int works around a bug in the HP C Compiler
10004# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10005# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10006# This bug is HP SR number 8606223364.
10007{ echo "$as_me:$LINENO: checking size of size_t" >&5
10008echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010009if test "${ac_cv_sizeof_size_t+set}" = set; then
10010 echo $ECHO_N "(cached) $ECHO_C" >&6
10011else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010012 if test "$cross_compiling" = yes; then
10013 # Depending upon the size, compute the lo and hi bounds.
10014cat >conftest.$ac_ext <<_ACEOF
10015/* confdefs.h. */
10016_ACEOF
10017cat confdefs.h >>conftest.$ac_ext
10018cat >>conftest.$ac_ext <<_ACEOF
10019/* end confdefs.h. */
10020$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010021 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010022int
10023main ()
10024{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010025static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010026test_array [0] = 0
10027
10028 ;
10029 return 0;
10030}
10031_ACEOF
10032rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010033if { (ac_try="$ac_compile"
10034case "(($ac_try" in
10035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10036 *) ac_try_echo=$ac_try;;
10037esac
10038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10039 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010040 ac_status=$?
10041 grep -v '^ *+' conftest.er1 >conftest.err
10042 rm -f conftest.er1
10043 cat conftest.err >&5
10044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010045 (exit $ac_status); } && {
10046 test -z "$ac_c_werror_flag" ||
10047 test ! -s conftest.err
10048 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010049 ac_lo=0 ac_mid=0
10050 while :; do
10051 cat >conftest.$ac_ext <<_ACEOF
10052/* confdefs.h. */
10053_ACEOF
10054cat confdefs.h >>conftest.$ac_ext
10055cat >>conftest.$ac_ext <<_ACEOF
10056/* end confdefs.h. */
10057$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010058 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010059int
10060main ()
10061{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010062static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010063test_array [0] = 0
10064
10065 ;
10066 return 0;
10067}
10068_ACEOF
10069rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070if { (ac_try="$ac_compile"
10071case "(($ac_try" in
10072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10073 *) ac_try_echo=$ac_try;;
10074esac
10075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010077 ac_status=$?
10078 grep -v '^ *+' conftest.er1 >conftest.err
10079 rm -f conftest.er1
10080 cat conftest.err >&5
10081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010082 (exit $ac_status); } && {
10083 test -z "$ac_c_werror_flag" ||
10084 test ! -s conftest.err
10085 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010086 ac_hi=$ac_mid; break
10087else
10088 echo "$as_me: failed program was:" >&5
10089sed 's/^/| /' conftest.$ac_ext >&5
10090
Martin v. Löwiseba40652007-08-30 20:10:57 +000010091 ac_lo=`expr $ac_mid + 1`
10092 if test $ac_lo -le $ac_mid; then
10093 ac_lo= ac_hi=
10094 break
10095 fi
10096 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010098
10099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010100 done
10101else
10102 echo "$as_me: failed program was:" >&5
10103sed 's/^/| /' conftest.$ac_ext >&5
10104
Martin v. Löwiseba40652007-08-30 20:10:57 +000010105 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010106/* confdefs.h. */
10107_ACEOF
10108cat confdefs.h >>conftest.$ac_ext
10109cat >>conftest.$ac_ext <<_ACEOF
10110/* end confdefs.h. */
10111$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010112 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010113int
10114main ()
10115{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010117test_array [0] = 0
10118
10119 ;
10120 return 0;
10121}
10122_ACEOF
10123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010124if { (ac_try="$ac_compile"
10125case "(($ac_try" in
10126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10127 *) ac_try_echo=$ac_try;;
10128esac
10129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10130 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010131 ac_status=$?
10132 grep -v '^ *+' conftest.er1 >conftest.err
10133 rm -f conftest.er1
10134 cat conftest.err >&5
10135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010136 (exit $ac_status); } && {
10137 test -z "$ac_c_werror_flag" ||
10138 test ! -s conftest.err
10139 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010140 ac_hi=-1 ac_mid=-1
10141 while :; do
10142 cat >conftest.$ac_ext <<_ACEOF
10143/* confdefs.h. */
10144_ACEOF
10145cat confdefs.h >>conftest.$ac_ext
10146cat >>conftest.$ac_ext <<_ACEOF
10147/* end confdefs.h. */
10148$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010149 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010150int
10151main ()
10152{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010153static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010154test_array [0] = 0
10155
10156 ;
10157 return 0;
10158}
10159_ACEOF
10160rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010161if { (ac_try="$ac_compile"
10162case "(($ac_try" in
10163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10164 *) ac_try_echo=$ac_try;;
10165esac
10166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10167 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010168 ac_status=$?
10169 grep -v '^ *+' conftest.er1 >conftest.err
10170 rm -f conftest.er1
10171 cat conftest.err >&5
10172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010173 (exit $ac_status); } && {
10174 test -z "$ac_c_werror_flag" ||
10175 test ! -s conftest.err
10176 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010177 ac_lo=$ac_mid; break
10178else
10179 echo "$as_me: failed program was:" >&5
10180sed 's/^/| /' conftest.$ac_ext >&5
10181
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182 ac_hi=`expr '(' $ac_mid ')' - 1`
10183 if test $ac_mid -le $ac_hi; then
10184 ac_lo= ac_hi=
10185 break
10186 fi
10187 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189
10190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010191 done
10192else
10193 echo "$as_me: failed program was:" >&5
10194sed 's/^/| /' conftest.$ac_ext >&5
10195
Martin v. Löwiseba40652007-08-30 20:10:57 +000010196 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010197fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010198
10199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201
10202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010203# Binary search between lo and hi bounds.
10204while test "x$ac_lo" != "x$ac_hi"; do
10205 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10206 cat >conftest.$ac_ext <<_ACEOF
10207/* confdefs.h. */
10208_ACEOF
10209cat confdefs.h >>conftest.$ac_ext
10210cat >>conftest.$ac_ext <<_ACEOF
10211/* end confdefs.h. */
10212$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010214int
10215main ()
10216{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010218test_array [0] = 0
10219
10220 ;
10221 return 0;
10222}
10223_ACEOF
10224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010225if { (ac_try="$ac_compile"
10226case "(($ac_try" in
10227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10228 *) ac_try_echo=$ac_try;;
10229esac
10230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010232 ac_status=$?
10233 grep -v '^ *+' conftest.er1 >conftest.err
10234 rm -f conftest.er1
10235 cat conftest.err >&5
10236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010237 (exit $ac_status); } && {
10238 test -z "$ac_c_werror_flag" ||
10239 test ! -s conftest.err
10240 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010241 ac_hi=$ac_mid
10242else
10243 echo "$as_me: failed program was:" >&5
10244sed 's/^/| /' conftest.$ac_ext >&5
10245
Martin v. Löwiseba40652007-08-30 20:10:57 +000010246 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010248
10249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010250done
10251case $ac_lo in
10252?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010253'') if test "$ac_cv_type_size_t" = yes; then
10254 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010255See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010257See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258 { (exit 77); exit 77; }; }
10259 else
10260 ac_cv_sizeof_size_t=0
10261 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010262esac
10263else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010264 cat >conftest.$ac_ext <<_ACEOF
10265/* confdefs.h. */
10266_ACEOF
10267cat confdefs.h >>conftest.$ac_ext
10268cat >>conftest.$ac_ext <<_ACEOF
10269/* end confdefs.h. */
10270$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010271 typedef size_t ac__type_sizeof_;
10272static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10273static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010274#include <stdio.h>
10275#include <stdlib.h>
10276int
10277main ()
10278{
10279
10280 FILE *f = fopen ("conftest.val", "w");
10281 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010282 return 1;
10283 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010284 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010285 long int i = longval ();
10286 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10287 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010288 fprintf (f, "%ld\n", i);
10289 }
10290 else
10291 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292 unsigned long int i = ulongval ();
10293 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10294 return 1;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010295 fprintf (f, "%lu\n", i);
10296 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010298
10299 ;
10300 return 0;
10301}
10302_ACEOF
10303rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304if { (ac_try="$ac_link"
10305case "(($ac_try" in
10306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10307 *) ac_try_echo=$ac_try;;
10308esac
10309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10310 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010311 ac_status=$?
10312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10313 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010314 { (case "(($ac_try" in
10315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10316 *) ac_try_echo=$ac_try;;
10317esac
10318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10319 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010320 ac_status=$?
10321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10322 (exit $ac_status); }; }; then
10323 ac_cv_sizeof_size_t=`cat conftest.val`
10324else
10325 echo "$as_me: program exited with status $ac_status" >&5
10326echo "$as_me: failed program was:" >&5
10327sed 's/^/| /' conftest.$ac_ext >&5
10328
10329( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010330if test "$ac_cv_type_size_t" = yes; then
10331 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010332See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010334See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000010335 { (exit 77); exit 77; }; }
10336 else
10337 ac_cv_sizeof_size_t=0
10338 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010340rm -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 +000010341fi
10342rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10345echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
10346
10347
10348
Martin v. Löwis18e16552006-02-15 17:27:45 +000010349cat >>confdefs.h <<_ACEOF
10350#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10351_ACEOF
10352
10353
Christian Heimes951cc0f2008-01-31 23:08:23 +000010354{ echo "$as_me:$LINENO: checking for pid_t" >&5
10355echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10356if test "${ac_cv_type_pid_t+set}" = set; then
10357 echo $ECHO_N "(cached) $ECHO_C" >&6
10358else
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
10366typedef pid_t ac__type_new_;
10367int
10368main ()
10369{
10370if ((ac__type_new_ *) 0)
10371 return 0;
10372if (sizeof (ac__type_new_))
10373 return 0;
10374 ;
10375 return 0;
10376}
10377_ACEOF
10378rm -f conftest.$ac_objext
10379if { (ac_try="$ac_compile"
10380case "(($ac_try" in
10381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10382 *) ac_try_echo=$ac_try;;
10383esac
10384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10385 (eval "$ac_compile") 2>conftest.er1
10386 ac_status=$?
10387 grep -v '^ *+' conftest.er1 >conftest.err
10388 rm -f conftest.er1
10389 cat conftest.err >&5
10390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10391 (exit $ac_status); } && {
10392 test -z "$ac_c_werror_flag" ||
10393 test ! -s conftest.err
10394 } && test -s conftest.$ac_objext; then
10395 ac_cv_type_pid_t=yes
10396else
10397 echo "$as_me: failed program was:" >&5
10398sed 's/^/| /' conftest.$ac_ext >&5
10399
10400 ac_cv_type_pid_t=no
10401fi
10402
10403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10404fi
10405{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10406echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10407
10408# The cast to long int works around a bug in the HP C Compiler
10409# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10410# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10411# This bug is HP SR number 8606223364.
10412{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10413echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
10414if test "${ac_cv_sizeof_pid_t+set}" = set; then
10415 echo $ECHO_N "(cached) $ECHO_C" >&6
10416else
10417 if test "$cross_compiling" = yes; then
10418 # Depending upon the size, compute the lo and hi bounds.
10419cat >conftest.$ac_ext <<_ACEOF
10420/* confdefs.h. */
10421_ACEOF
10422cat confdefs.h >>conftest.$ac_ext
10423cat >>conftest.$ac_ext <<_ACEOF
10424/* end confdefs.h. */
10425$ac_includes_default
10426 typedef pid_t ac__type_sizeof_;
10427int
10428main ()
10429{
10430static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
10431test_array [0] = 0
10432
10433 ;
10434 return 0;
10435}
10436_ACEOF
10437rm -f conftest.$ac_objext
10438if { (ac_try="$ac_compile"
10439case "(($ac_try" in
10440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10441 *) ac_try_echo=$ac_try;;
10442esac
10443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10444 (eval "$ac_compile") 2>conftest.er1
10445 ac_status=$?
10446 grep -v '^ *+' conftest.er1 >conftest.err
10447 rm -f conftest.er1
10448 cat conftest.err >&5
10449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10450 (exit $ac_status); } && {
10451 test -z "$ac_c_werror_flag" ||
10452 test ! -s conftest.err
10453 } && test -s conftest.$ac_objext; then
10454 ac_lo=0 ac_mid=0
10455 while :; do
10456 cat >conftest.$ac_ext <<_ACEOF
10457/* confdefs.h. */
10458_ACEOF
10459cat confdefs.h >>conftest.$ac_ext
10460cat >>conftest.$ac_ext <<_ACEOF
10461/* end confdefs.h. */
10462$ac_includes_default
10463 typedef pid_t ac__type_sizeof_;
10464int
10465main ()
10466{
10467static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10468test_array [0] = 0
10469
10470 ;
10471 return 0;
10472}
10473_ACEOF
10474rm -f conftest.$ac_objext
10475if { (ac_try="$ac_compile"
10476case "(($ac_try" in
10477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10478 *) ac_try_echo=$ac_try;;
10479esac
10480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10481 (eval "$ac_compile") 2>conftest.er1
10482 ac_status=$?
10483 grep -v '^ *+' conftest.er1 >conftest.err
10484 rm -f conftest.er1
10485 cat conftest.err >&5
10486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10487 (exit $ac_status); } && {
10488 test -z "$ac_c_werror_flag" ||
10489 test ! -s conftest.err
10490 } && test -s conftest.$ac_objext; then
10491 ac_hi=$ac_mid; break
10492else
10493 echo "$as_me: failed program was:" >&5
10494sed 's/^/| /' conftest.$ac_ext >&5
10495
10496 ac_lo=`expr $ac_mid + 1`
10497 if test $ac_lo -le $ac_mid; then
10498 ac_lo= ac_hi=
10499 break
10500 fi
10501 ac_mid=`expr 2 '*' $ac_mid + 1`
10502fi
10503
10504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10505 done
10506else
10507 echo "$as_me: failed program was:" >&5
10508sed 's/^/| /' conftest.$ac_ext >&5
10509
10510 cat >conftest.$ac_ext <<_ACEOF
10511/* confdefs.h. */
10512_ACEOF
10513cat confdefs.h >>conftest.$ac_ext
10514cat >>conftest.$ac_ext <<_ACEOF
10515/* end confdefs.h. */
10516$ac_includes_default
10517 typedef pid_t ac__type_sizeof_;
10518int
10519main ()
10520{
10521static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
10522test_array [0] = 0
10523
10524 ;
10525 return 0;
10526}
10527_ACEOF
10528rm -f conftest.$ac_objext
10529if { (ac_try="$ac_compile"
10530case "(($ac_try" in
10531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10532 *) ac_try_echo=$ac_try;;
10533esac
10534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10535 (eval "$ac_compile") 2>conftest.er1
10536 ac_status=$?
10537 grep -v '^ *+' conftest.er1 >conftest.err
10538 rm -f conftest.er1
10539 cat conftest.err >&5
10540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10541 (exit $ac_status); } && {
10542 test -z "$ac_c_werror_flag" ||
10543 test ! -s conftest.err
10544 } && test -s conftest.$ac_objext; then
10545 ac_hi=-1 ac_mid=-1
10546 while :; do
10547 cat >conftest.$ac_ext <<_ACEOF
10548/* confdefs.h. */
10549_ACEOF
10550cat confdefs.h >>conftest.$ac_ext
10551cat >>conftest.$ac_ext <<_ACEOF
10552/* end confdefs.h. */
10553$ac_includes_default
10554 typedef pid_t ac__type_sizeof_;
10555int
10556main ()
10557{
10558static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
10559test_array [0] = 0
10560
10561 ;
10562 return 0;
10563}
10564_ACEOF
10565rm -f conftest.$ac_objext
10566if { (ac_try="$ac_compile"
10567case "(($ac_try" in
10568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10569 *) ac_try_echo=$ac_try;;
10570esac
10571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10572 (eval "$ac_compile") 2>conftest.er1
10573 ac_status=$?
10574 grep -v '^ *+' conftest.er1 >conftest.err
10575 rm -f conftest.er1
10576 cat conftest.err >&5
10577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10578 (exit $ac_status); } && {
10579 test -z "$ac_c_werror_flag" ||
10580 test ! -s conftest.err
10581 } && test -s conftest.$ac_objext; then
10582 ac_lo=$ac_mid; break
10583else
10584 echo "$as_me: failed program was:" >&5
10585sed 's/^/| /' conftest.$ac_ext >&5
10586
10587 ac_hi=`expr '(' $ac_mid ')' - 1`
10588 if test $ac_mid -le $ac_hi; then
10589 ac_lo= ac_hi=
10590 break
10591 fi
10592 ac_mid=`expr 2 '*' $ac_mid`
10593fi
10594
10595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10596 done
10597else
10598 echo "$as_me: failed program was:" >&5
10599sed 's/^/| /' conftest.$ac_ext >&5
10600
10601 ac_lo= ac_hi=
10602fi
10603
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10605fi
10606
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10608# Binary search between lo and hi bounds.
10609while test "x$ac_lo" != "x$ac_hi"; do
10610 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10611 cat >conftest.$ac_ext <<_ACEOF
10612/* confdefs.h. */
10613_ACEOF
10614cat confdefs.h >>conftest.$ac_ext
10615cat >>conftest.$ac_ext <<_ACEOF
10616/* end confdefs.h. */
10617$ac_includes_default
10618 typedef pid_t ac__type_sizeof_;
10619int
10620main ()
10621{
10622static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
10623test_array [0] = 0
10624
10625 ;
10626 return 0;
10627}
10628_ACEOF
10629rm -f conftest.$ac_objext
10630if { (ac_try="$ac_compile"
10631case "(($ac_try" in
10632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10633 *) ac_try_echo=$ac_try;;
10634esac
10635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10636 (eval "$ac_compile") 2>conftest.er1
10637 ac_status=$?
10638 grep -v '^ *+' conftest.er1 >conftest.err
10639 rm -f conftest.er1
10640 cat conftest.err >&5
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); } && {
10643 test -z "$ac_c_werror_flag" ||
10644 test ! -s conftest.err
10645 } && test -s conftest.$ac_objext; then
10646 ac_hi=$ac_mid
10647else
10648 echo "$as_me: failed program was:" >&5
10649sed 's/^/| /' conftest.$ac_ext >&5
10650
10651 ac_lo=`expr '(' $ac_mid ')' + 1`
10652fi
10653
10654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10655done
10656case $ac_lo in
10657?*) ac_cv_sizeof_pid_t=$ac_lo;;
10658'') if test "$ac_cv_type_pid_t" = yes; then
10659 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10660See \`config.log' for more details." >&5
10661echo "$as_me: error: cannot compute sizeof (pid_t)
10662See \`config.log' for more details." >&2;}
10663 { (exit 77); exit 77; }; }
10664 else
10665 ac_cv_sizeof_pid_t=0
10666 fi ;;
10667esac
10668else
10669 cat >conftest.$ac_ext <<_ACEOF
10670/* confdefs.h. */
10671_ACEOF
10672cat confdefs.h >>conftest.$ac_ext
10673cat >>conftest.$ac_ext <<_ACEOF
10674/* end confdefs.h. */
10675$ac_includes_default
10676 typedef pid_t ac__type_sizeof_;
10677static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10678static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
10679#include <stdio.h>
10680#include <stdlib.h>
10681int
10682main ()
10683{
10684
10685 FILE *f = fopen ("conftest.val", "w");
10686 if (! f)
10687 return 1;
10688 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
10689 {
10690 long int i = longval ();
10691 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10692 return 1;
10693 fprintf (f, "%ld\n", i);
10694 }
10695 else
10696 {
10697 unsigned long int i = ulongval ();
10698 if (i != ((long int) (sizeof (ac__type_sizeof_))))
10699 return 1;
10700 fprintf (f, "%lu\n", i);
10701 }
10702 return ferror (f) || fclose (f) != 0;
10703
10704 ;
10705 return 0;
10706}
10707_ACEOF
10708rm -f conftest$ac_exeext
10709if { (ac_try="$ac_link"
10710case "(($ac_try" in
10711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10712 *) ac_try_echo=$ac_try;;
10713esac
10714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10715 (eval "$ac_link") 2>&5
10716 ac_status=$?
10717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10719 { (case "(($ac_try" in
10720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10721 *) ac_try_echo=$ac_try;;
10722esac
10723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10724 (eval "$ac_try") 2>&5
10725 ac_status=$?
10726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10727 (exit $ac_status); }; }; then
10728 ac_cv_sizeof_pid_t=`cat conftest.val`
10729else
10730 echo "$as_me: program exited with status $ac_status" >&5
10731echo "$as_me: failed program was:" >&5
10732sed 's/^/| /' conftest.$ac_ext >&5
10733
10734( exit $ac_status )
10735if test "$ac_cv_type_pid_t" = yes; then
10736 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
10737See \`config.log' for more details." >&5
10738echo "$as_me: error: cannot compute sizeof (pid_t)
10739See \`config.log' for more details." >&2;}
10740 { (exit 77); exit 77; }; }
10741 else
10742 ac_cv_sizeof_pid_t=0
10743 fi
10744fi
10745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10746fi
10747rm -f conftest.val
10748fi
10749{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
10750echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
10751
10752
10753
10754cat >>confdefs.h <<_ACEOF
10755#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
10756_ACEOF
10757
10758
Michael W. Hudson54241132001-12-07 15:38:26 +000010759
Martin v. Löwiseba40652007-08-30 20:10:57 +000010760{ echo "$as_me:$LINENO: checking for long long support" >&5
10761echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010762have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010764/* confdefs.h. */
10765_ACEOF
10766cat confdefs.h >>conftest.$ac_ext
10767cat >>conftest.$ac_ext <<_ACEOF
10768/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010769
Martin v. Löwis11437992002-04-12 09:54:03 +000010770int
10771main ()
10772{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010773long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ;
10775 return 0;
10776}
10777_ACEOF
10778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010779if { (ac_try="$ac_compile"
10780case "(($ac_try" in
10781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10782 *) ac_try_echo=$ac_try;;
10783esac
10784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010787 grep -v '^ *+' conftest.er1 >conftest.err
10788 rm -f conftest.er1
10789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791 (exit $ac_status); } && {
10792 test -z "$ac_c_werror_flag" ||
10793 test ! -s conftest.err
10794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010795
10796
10797cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010798#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010799_ACEOF
10800
Martin v. Löwisc45929e2002-04-06 10:10:49 +000010801 have_long_long=yes
10802
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010803else
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010805sed 's/^/| /' conftest.$ac_ext >&5
10806
Martin v. Löwiseba40652007-08-30 20:10:57 +000010807
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010809
10810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10811{ echo "$as_me:$LINENO: result: $have_long_long" >&5
10812echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000010813if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000010814{ echo "$as_me:$LINENO: checking for long long" >&5
10815echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010816if test "${ac_cv_type_long_long+set}" = set; then
10817 echo $ECHO_N "(cached) $ECHO_C" >&6
10818else
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 +000010826typedef long long ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010827int
10828main ()
10829{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010830if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010832if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000010833 return 0;
10834 ;
10835 return 0;
10836}
10837_ACEOF
10838rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010839if { (ac_try="$ac_compile"
10840case "(($ac_try" in
10841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10842 *) ac_try_echo=$ac_try;;
10843esac
10844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010847 grep -v '^ *+' conftest.er1 >conftest.err
10848 rm -f conftest.er1
10849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010851 (exit $ac_status); } && {
10852 test -z "$ac_c_werror_flag" ||
10853 test ! -s conftest.err
10854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 ac_cv_type_long_long=yes
10856else
10857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010858sed 's/^/| /' conftest.$ac_ext >&5
10859
Martin v. Löwiseba40652007-08-30 20:10:57 +000010860 ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010861fi
Brett Cannon19fab762007-06-02 03:02:29 +000010862
Martin v. Löwiseba40652007-08-30 20:10:57 +000010863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10864fi
10865{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
10866echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
10867
10868# The cast to long int works around a bug in the HP C Compiler
10869# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10870# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10871# This bug is HP SR number 8606223364.
10872{ echo "$as_me:$LINENO: checking size of long long" >&5
10873echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010874if test "${ac_cv_sizeof_long_long+set}" = set; then
10875 echo $ECHO_N "(cached) $ECHO_C" >&6
10876else
Martin v. Löwis11437992002-04-12 09:54:03 +000010877 if test "$cross_compiling" = yes; then
10878 # Depending upon the size, compute the lo and hi bounds.
10879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010880/* confdefs.h. */
10881_ACEOF
10882cat confdefs.h >>conftest.$ac_ext
10883cat >>conftest.$ac_ext <<_ACEOF
10884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010885$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010886 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010887int
10888main ()
10889{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010890static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010891test_array [0] = 0
10892
10893 ;
10894 return 0;
10895}
10896_ACEOF
10897rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010898if { (ac_try="$ac_compile"
10899case "(($ac_try" in
10900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10901 *) ac_try_echo=$ac_try;;
10902esac
10903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010906 grep -v '^ *+' conftest.er1 >conftest.err
10907 rm -f conftest.er1
10908 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010910 (exit $ac_status); } && {
10911 test -z "$ac_c_werror_flag" ||
10912 test ! -s conftest.err
10913 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010914 ac_lo=0 ac_mid=0
10915 while :; do
10916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010917/* confdefs.h. */
10918_ACEOF
10919cat confdefs.h >>conftest.$ac_ext
10920cat >>conftest.$ac_ext <<_ACEOF
10921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010922$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010923 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010924int
10925main ()
10926{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010927static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010928test_array [0] = 0
10929
10930 ;
10931 return 0;
10932}
10933_ACEOF
10934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010935if { (ac_try="$ac_compile"
10936case "(($ac_try" in
10937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10938 *) ac_try_echo=$ac_try;;
10939esac
10940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010943 grep -v '^ *+' conftest.er1 >conftest.err
10944 rm -f conftest.er1
10945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010947 (exit $ac_status); } && {
10948 test -z "$ac_c_werror_flag" ||
10949 test ! -s conftest.err
10950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010951 ac_hi=$ac_mid; break
10952else
10953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010954sed 's/^/| /' conftest.$ac_ext >&5
10955
Martin v. Löwiseba40652007-08-30 20:10:57 +000010956 ac_lo=`expr $ac_mid + 1`
10957 if test $ac_lo -le $ac_mid; then
10958 ac_lo= ac_hi=
10959 break
10960 fi
10961 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010962fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010963
10964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 done
10966else
10967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010968sed 's/^/| /' conftest.$ac_ext >&5
10969
Martin v. Löwiseba40652007-08-30 20:10:57 +000010970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010971/* confdefs.h. */
10972_ACEOF
10973cat confdefs.h >>conftest.$ac_ext
10974cat >>conftest.$ac_ext <<_ACEOF
10975/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010976$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000010977 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010978int
10979main ()
10980{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010981static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010982test_array [0] = 0
10983
10984 ;
10985 return 0;
10986}
10987_ACEOF
10988rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010989if { (ac_try="$ac_compile"
10990case "(($ac_try" in
10991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10992 *) ac_try_echo=$ac_try;;
10993esac
10994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010997 grep -v '^ *+' conftest.er1 >conftest.err
10998 rm -f conftest.er1
10999 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011001 (exit $ac_status); } && {
11002 test -z "$ac_c_werror_flag" ||
11003 test ! -s conftest.err
11004 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 ac_hi=-1 ac_mid=-1
11006 while :; do
11007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011008/* confdefs.h. */
11009_ACEOF
11010cat confdefs.h >>conftest.$ac_ext
11011cat >>conftest.$ac_ext <<_ACEOF
11012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011013$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011014 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011015int
11016main ()
11017{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011018static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011019test_array [0] = 0
11020
11021 ;
11022 return 0;
11023}
11024_ACEOF
11025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011026if { (ac_try="$ac_compile"
11027case "(($ac_try" in
11028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11029 *) ac_try_echo=$ac_try;;
11030esac
11031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011034 grep -v '^ *+' conftest.er1 >conftest.err
11035 rm -f conftest.er1
11036 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011038 (exit $ac_status); } && {
11039 test -z "$ac_c_werror_flag" ||
11040 test ! -s conftest.err
11041 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011042 ac_lo=$ac_mid; break
11043else
11044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011045sed 's/^/| /' conftest.$ac_ext >&5
11046
Martin v. Löwiseba40652007-08-30 20:10:57 +000011047 ac_hi=`expr '(' $ac_mid ')' - 1`
11048 if test $ac_mid -le $ac_hi; then
11049 ac_lo= ac_hi=
11050 break
11051 fi
11052 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011054
11055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011056 done
11057else
11058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011059sed 's/^/| /' conftest.$ac_ext >&5
11060
Martin v. Löwiseba40652007-08-30 20:10:57 +000011061 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011063
11064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011065fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011066
11067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011068# Binary search between lo and hi bounds.
11069while test "x$ac_lo" != "x$ac_hi"; do
11070 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* confdefs.h. */
11073_ACEOF
11074cat confdefs.h >>conftest.$ac_ext
11075cat >>conftest.$ac_ext <<_ACEOF
11076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011077$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011078 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011079int
11080main ()
11081{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011082static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011083test_array [0] = 0
11084
11085 ;
11086 return 0;
11087}
11088_ACEOF
11089rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011090if { (ac_try="$ac_compile"
11091case "(($ac_try" in
11092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11093 *) ac_try_echo=$ac_try;;
11094esac
11095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011098 grep -v '^ *+' conftest.er1 >conftest.err
11099 rm -f conftest.er1
11100 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011102 (exit $ac_status); } && {
11103 test -z "$ac_c_werror_flag" ||
11104 test ! -s conftest.err
11105 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011106 ac_hi=$ac_mid
11107else
11108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011109sed 's/^/| /' conftest.$ac_ext >&5
11110
Martin v. Löwiseba40652007-08-30 20:10:57 +000011111 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011113
11114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011115done
11116case $ac_lo in
11117?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011118'') if test "$ac_cv_type_long_long" = yes; then
11119 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011120See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011121echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011122See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011123 { (exit 77); exit 77; }; }
11124 else
11125 ac_cv_sizeof_long_long=0
11126 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011127esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011128else
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* confdefs.h. */
11131_ACEOF
11132cat confdefs.h >>conftest.$ac_ext
11133cat >>conftest.$ac_ext <<_ACEOF
11134/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011135$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011136 typedef long long ac__type_sizeof_;
11137static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11138static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011139#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011140#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011141int
11142main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011143{
Martin v. Löwis11437992002-04-12 09:54:03 +000011144
11145 FILE *f = fopen ("conftest.val", "w");
11146 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011147 return 1;
11148 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011150 long int i = longval ();
11151 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11152 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011153 fprintf (f, "%ld\n", i);
11154 }
11155 else
11156 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011157 unsigned long int i = ulongval ();
11158 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11159 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000011160 fprintf (f, "%lu\n", i);
11161 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011162 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
11164 ;
11165 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011166}
Martin v. Löwis11437992002-04-12 09:54:03 +000011167_ACEOF
11168rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011169if { (ac_try="$ac_link"
11170case "(($ac_try" in
11171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11172 *) ac_try_echo=$ac_try;;
11173esac
11174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11175 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 ac_status=$?
11177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11178 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011179 { (case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
11183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11184 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ac_status=$?
11186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11187 (exit $ac_status); }; }; then
11188 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011189else
Martin v. Löwis11437992002-04-12 09:54:03 +000011190 echo "$as_me: program exited with status $ac_status" >&5
11191echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011192sed 's/^/| /' conftest.$ac_ext >&5
11193
Martin v. Löwis11437992002-04-12 09:54:03 +000011194( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011195if test "$ac_cv_type_long_long" = yes; then
11196 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011197See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011198echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011199See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000011200 { (exit 77); exit 77; }; }
11201 else
11202 ac_cv_sizeof_long_long=0
11203 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011205rm -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 +000011206fi
11207rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011208fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011209{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11210echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
11211
11212
11213
Martin v. Löwis11437992002-04-12 09:54:03 +000011214cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011215#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011216_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011217
Michael W. Hudson54241132001-12-07 15:38:26 +000011218
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011219fi
11220
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011221{ echo "$as_me:$LINENO: checking for long double support" >&5
11222echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
11223have_long_double=no
11224cat >conftest.$ac_ext <<_ACEOF
11225/* confdefs.h. */
11226_ACEOF
11227cat confdefs.h >>conftest.$ac_ext
11228cat >>conftest.$ac_ext <<_ACEOF
11229/* end confdefs.h. */
11230
11231int
11232main ()
11233{
11234long double x; x = (long double)0.;
11235 ;
11236 return 0;
11237}
11238_ACEOF
11239rm -f conftest.$ac_objext
11240if { (ac_try="$ac_compile"
11241case "(($ac_try" in
11242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11243 *) ac_try_echo=$ac_try;;
11244esac
11245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11246 (eval "$ac_compile") 2>conftest.er1
11247 ac_status=$?
11248 grep -v '^ *+' conftest.er1 >conftest.err
11249 rm -f conftest.er1
11250 cat conftest.err >&5
11251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11252 (exit $ac_status); } && {
11253 test -z "$ac_c_werror_flag" ||
11254 test ! -s conftest.err
11255 } && test -s conftest.$ac_objext; then
11256
11257
11258cat >>confdefs.h <<\_ACEOF
11259#define HAVE_LONG_DOUBLE 1
11260_ACEOF
11261
11262 have_long_double=yes
11263
11264else
11265 echo "$as_me: failed program was:" >&5
11266sed 's/^/| /' conftest.$ac_ext >&5
11267
11268
11269fi
11270
11271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11272{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11273echo "${ECHO_T}$have_long_double" >&6; }
11274if test "$have_long_double" = yes ; then
11275{ echo "$as_me:$LINENO: checking for long double" >&5
11276echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11277if test "${ac_cv_type_long_double+set}" = set; then
11278 echo $ECHO_N "(cached) $ECHO_C" >&6
11279else
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
11287typedef long double ac__type_new_;
11288int
11289main ()
11290{
11291if ((ac__type_new_ *) 0)
11292 return 0;
11293if (sizeof (ac__type_new_))
11294 return 0;
11295 ;
11296 return 0;
11297}
11298_ACEOF
11299rm -f conftest.$ac_objext
11300if { (ac_try="$ac_compile"
11301case "(($ac_try" in
11302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11303 *) ac_try_echo=$ac_try;;
11304esac
11305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11306 (eval "$ac_compile") 2>conftest.er1
11307 ac_status=$?
11308 grep -v '^ *+' conftest.er1 >conftest.err
11309 rm -f conftest.er1
11310 cat conftest.err >&5
11311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11312 (exit $ac_status); } && {
11313 test -z "$ac_c_werror_flag" ||
11314 test ! -s conftest.err
11315 } && test -s conftest.$ac_objext; then
11316 ac_cv_type_long_double=yes
11317else
11318 echo "$as_me: failed program was:" >&5
11319sed 's/^/| /' conftest.$ac_ext >&5
11320
11321 ac_cv_type_long_double=no
11322fi
11323
11324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11325fi
11326{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11327echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11328
11329# The cast to long int works around a bug in the HP C Compiler
11330# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11331# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11332# This bug is HP SR number 8606223364.
11333{ echo "$as_me:$LINENO: checking size of long double" >&5
11334echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
11335if test "${ac_cv_sizeof_long_double+set}" = set; then
11336 echo $ECHO_N "(cached) $ECHO_C" >&6
11337else
11338 if test "$cross_compiling" = yes; then
11339 # Depending upon the size, compute the lo and hi bounds.
11340cat >conftest.$ac_ext <<_ACEOF
11341/* confdefs.h. */
11342_ACEOF
11343cat confdefs.h >>conftest.$ac_ext
11344cat >>conftest.$ac_ext <<_ACEOF
11345/* end confdefs.h. */
11346$ac_includes_default
11347 typedef long double ac__type_sizeof_;
11348int
11349main ()
11350{
11351static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
11352test_array [0] = 0
11353
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358rm -f conftest.$ac_objext
11359if { (ac_try="$ac_compile"
11360case "(($ac_try" in
11361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11362 *) ac_try_echo=$ac_try;;
11363esac
11364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11365 (eval "$ac_compile") 2>conftest.er1
11366 ac_status=$?
11367 grep -v '^ *+' conftest.er1 >conftest.err
11368 rm -f conftest.er1
11369 cat conftest.err >&5
11370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11371 (exit $ac_status); } && {
11372 test -z "$ac_c_werror_flag" ||
11373 test ! -s conftest.err
11374 } && test -s conftest.$ac_objext; then
11375 ac_lo=0 ac_mid=0
11376 while :; do
11377 cat >conftest.$ac_ext <<_ACEOF
11378/* confdefs.h. */
11379_ACEOF
11380cat confdefs.h >>conftest.$ac_ext
11381cat >>conftest.$ac_ext <<_ACEOF
11382/* end confdefs.h. */
11383$ac_includes_default
11384 typedef long double ac__type_sizeof_;
11385int
11386main ()
11387{
11388static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11389test_array [0] = 0
11390
11391 ;
11392 return 0;
11393}
11394_ACEOF
11395rm -f conftest.$ac_objext
11396if { (ac_try="$ac_compile"
11397case "(($ac_try" in
11398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11399 *) ac_try_echo=$ac_try;;
11400esac
11401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11402 (eval "$ac_compile") 2>conftest.er1
11403 ac_status=$?
11404 grep -v '^ *+' conftest.er1 >conftest.err
11405 rm -f conftest.er1
11406 cat conftest.err >&5
11407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11408 (exit $ac_status); } && {
11409 test -z "$ac_c_werror_flag" ||
11410 test ! -s conftest.err
11411 } && test -s conftest.$ac_objext; then
11412 ac_hi=$ac_mid; break
11413else
11414 echo "$as_me: failed program was:" >&5
11415sed 's/^/| /' conftest.$ac_ext >&5
11416
11417 ac_lo=`expr $ac_mid + 1`
11418 if test $ac_lo -le $ac_mid; then
11419 ac_lo= ac_hi=
11420 break
11421 fi
11422 ac_mid=`expr 2 '*' $ac_mid + 1`
11423fi
11424
11425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11426 done
11427else
11428 echo "$as_me: failed program was:" >&5
11429sed 's/^/| /' conftest.$ac_ext >&5
11430
11431 cat >conftest.$ac_ext <<_ACEOF
11432/* confdefs.h. */
11433_ACEOF
11434cat confdefs.h >>conftest.$ac_ext
11435cat >>conftest.$ac_ext <<_ACEOF
11436/* end confdefs.h. */
11437$ac_includes_default
11438 typedef long double ac__type_sizeof_;
11439int
11440main ()
11441{
11442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
11443test_array [0] = 0
11444
11445 ;
11446 return 0;
11447}
11448_ACEOF
11449rm -f conftest.$ac_objext
11450if { (ac_try="$ac_compile"
11451case "(($ac_try" in
11452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11453 *) ac_try_echo=$ac_try;;
11454esac
11455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11456 (eval "$ac_compile") 2>conftest.er1
11457 ac_status=$?
11458 grep -v '^ *+' conftest.er1 >conftest.err
11459 rm -f conftest.er1
11460 cat conftest.err >&5
11461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11462 (exit $ac_status); } && {
11463 test -z "$ac_c_werror_flag" ||
11464 test ! -s conftest.err
11465 } && test -s conftest.$ac_objext; then
11466 ac_hi=-1 ac_mid=-1
11467 while :; do
11468 cat >conftest.$ac_ext <<_ACEOF
11469/* confdefs.h. */
11470_ACEOF
11471cat confdefs.h >>conftest.$ac_ext
11472cat >>conftest.$ac_ext <<_ACEOF
11473/* end confdefs.h. */
11474$ac_includes_default
11475 typedef long double ac__type_sizeof_;
11476int
11477main ()
11478{
11479static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
11480test_array [0] = 0
11481
11482 ;
11483 return 0;
11484}
11485_ACEOF
11486rm -f conftest.$ac_objext
11487if { (ac_try="$ac_compile"
11488case "(($ac_try" in
11489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11490 *) ac_try_echo=$ac_try;;
11491esac
11492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11493 (eval "$ac_compile") 2>conftest.er1
11494 ac_status=$?
11495 grep -v '^ *+' conftest.er1 >conftest.err
11496 rm -f conftest.er1
11497 cat conftest.err >&5
11498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11499 (exit $ac_status); } && {
11500 test -z "$ac_c_werror_flag" ||
11501 test ! -s conftest.err
11502 } && test -s conftest.$ac_objext; then
11503 ac_lo=$ac_mid; break
11504else
11505 echo "$as_me: failed program was:" >&5
11506sed 's/^/| /' conftest.$ac_ext >&5
11507
11508 ac_hi=`expr '(' $ac_mid ')' - 1`
11509 if test $ac_mid -le $ac_hi; then
11510 ac_lo= ac_hi=
11511 break
11512 fi
11513 ac_mid=`expr 2 '*' $ac_mid`
11514fi
11515
11516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11517 done
11518else
11519 echo "$as_me: failed program was:" >&5
11520sed 's/^/| /' conftest.$ac_ext >&5
11521
11522 ac_lo= ac_hi=
11523fi
11524
11525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11526fi
11527
11528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11529# Binary search between lo and hi bounds.
11530while test "x$ac_lo" != "x$ac_hi"; do
11531 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11532 cat >conftest.$ac_ext <<_ACEOF
11533/* confdefs.h. */
11534_ACEOF
11535cat confdefs.h >>conftest.$ac_ext
11536cat >>conftest.$ac_ext <<_ACEOF
11537/* end confdefs.h. */
11538$ac_includes_default
11539 typedef long double ac__type_sizeof_;
11540int
11541main ()
11542{
11543static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
11544test_array [0] = 0
11545
11546 ;
11547 return 0;
11548}
11549_ACEOF
11550rm -f conftest.$ac_objext
11551if { (ac_try="$ac_compile"
11552case "(($ac_try" in
11553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11554 *) ac_try_echo=$ac_try;;
11555esac
11556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11557 (eval "$ac_compile") 2>conftest.er1
11558 ac_status=$?
11559 grep -v '^ *+' conftest.er1 >conftest.err
11560 rm -f conftest.er1
11561 cat conftest.err >&5
11562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11563 (exit $ac_status); } && {
11564 test -z "$ac_c_werror_flag" ||
11565 test ! -s conftest.err
11566 } && test -s conftest.$ac_objext; then
11567 ac_hi=$ac_mid
11568else
11569 echo "$as_me: failed program was:" >&5
11570sed 's/^/| /' conftest.$ac_ext >&5
11571
11572 ac_lo=`expr '(' $ac_mid ')' + 1`
11573fi
11574
11575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11576done
11577case $ac_lo in
11578?*) ac_cv_sizeof_long_double=$ac_lo;;
11579'') if test "$ac_cv_type_long_double" = yes; then
11580 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11581See \`config.log' for more details." >&5
11582echo "$as_me: error: cannot compute sizeof (long double)
11583See \`config.log' for more details." >&2;}
11584 { (exit 77); exit 77; }; }
11585 else
11586 ac_cv_sizeof_long_double=0
11587 fi ;;
11588esac
11589else
11590 cat >conftest.$ac_ext <<_ACEOF
11591/* confdefs.h. */
11592_ACEOF
11593cat confdefs.h >>conftest.$ac_ext
11594cat >>conftest.$ac_ext <<_ACEOF
11595/* end confdefs.h. */
11596$ac_includes_default
11597 typedef long double ac__type_sizeof_;
11598static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11599static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
11600#include <stdio.h>
11601#include <stdlib.h>
11602int
11603main ()
11604{
11605
11606 FILE *f = fopen ("conftest.val", "w");
11607 if (! f)
11608 return 1;
11609 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
11610 {
11611 long int i = longval ();
11612 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11613 return 1;
11614 fprintf (f, "%ld\n", i);
11615 }
11616 else
11617 {
11618 unsigned long int i = ulongval ();
11619 if (i != ((long int) (sizeof (ac__type_sizeof_))))
11620 return 1;
11621 fprintf (f, "%lu\n", i);
11622 }
11623 return ferror (f) || fclose (f) != 0;
11624
11625 ;
11626 return 0;
11627}
11628_ACEOF
11629rm -f conftest$ac_exeext
11630if { (ac_try="$ac_link"
11631case "(($ac_try" in
11632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11633 *) ac_try_echo=$ac_try;;
11634esac
11635eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11636 (eval "$ac_link") 2>&5
11637 ac_status=$?
11638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11639 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11640 { (case "(($ac_try" in
11641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11642 *) ac_try_echo=$ac_try;;
11643esac
11644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11645 (eval "$ac_try") 2>&5
11646 ac_status=$?
11647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11648 (exit $ac_status); }; }; then
11649 ac_cv_sizeof_long_double=`cat conftest.val`
11650else
11651 echo "$as_me: program exited with status $ac_status" >&5
11652echo "$as_me: failed program was:" >&5
11653sed 's/^/| /' conftest.$ac_ext >&5
11654
11655( exit $ac_status )
11656if test "$ac_cv_type_long_double" = yes; then
11657 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
11658See \`config.log' for more details." >&5
11659echo "$as_me: error: cannot compute sizeof (long double)
11660See \`config.log' for more details." >&2;}
11661 { (exit 77); exit 77; }; }
11662 else
11663 ac_cv_sizeof_long_double=0
11664 fi
11665fi
11666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11667fi
11668rm -f conftest.val
11669fi
11670{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11671echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
11672
11673
11674
11675cat >>confdefs.h <<_ACEOF
11676#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11677_ACEOF
11678
11679
11680fi
11681
Martin v. Löwiseba40652007-08-30 20:10:57 +000011682{ echo "$as_me:$LINENO: checking for _Bool support" >&5
11683echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011684have_c99_bool=no
11685cat >conftest.$ac_ext <<_ACEOF
11686/* confdefs.h. */
11687_ACEOF
11688cat confdefs.h >>conftest.$ac_ext
11689cat >>conftest.$ac_ext <<_ACEOF
11690/* end confdefs.h. */
11691
11692int
11693main ()
11694{
11695_Bool x; x = (_Bool)0;
11696 ;
11697 return 0;
11698}
11699_ACEOF
11700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011701if { (ac_try="$ac_compile"
11702case "(($ac_try" in
11703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11704 *) ac_try_echo=$ac_try;;
11705esac
11706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011708 ac_status=$?
11709 grep -v '^ *+' conftest.er1 >conftest.err
11710 rm -f conftest.er1
11711 cat conftest.err >&5
11712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011713 (exit $ac_status); } && {
11714 test -z "$ac_c_werror_flag" ||
11715 test ! -s conftest.err
11716 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011717
11718
11719cat >>confdefs.h <<\_ACEOF
11720#define HAVE_C99_BOOL 1
11721_ACEOF
11722
11723 have_c99_bool=yes
11724
11725else
11726 echo "$as_me: failed program was:" >&5
11727sed 's/^/| /' conftest.$ac_ext >&5
11728
Martin v. Löwiseba40652007-08-30 20:10:57 +000011729
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011731
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11733{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11734echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011735if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011736{ echo "$as_me:$LINENO: checking for _Bool" >&5
11737echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011738if test "${ac_cv_type__Bool+set}" = set; then
11739 echo $ECHO_N "(cached) $ECHO_C" >&6
11740else
11741 cat >conftest.$ac_ext <<_ACEOF
11742/* confdefs.h. */
11743_ACEOF
11744cat confdefs.h >>conftest.$ac_ext
11745cat >>conftest.$ac_ext <<_ACEOF
11746/* end confdefs.h. */
11747$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011748typedef _Bool ac__type_new_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011749int
11750main ()
11751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011752if ((ac__type_new_ *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011753 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011754if (sizeof (ac__type_new_))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011755 return 0;
11756 ;
11757 return 0;
11758}
11759_ACEOF
11760rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011761if { (ac_try="$ac_compile"
11762case "(($ac_try" in
11763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11764 *) ac_try_echo=$ac_try;;
11765esac
11766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11767 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011768 ac_status=$?
11769 grep -v '^ *+' conftest.er1 >conftest.err
11770 rm -f conftest.er1
11771 cat conftest.err >&5
11772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011773 (exit $ac_status); } && {
11774 test -z "$ac_c_werror_flag" ||
11775 test ! -s conftest.err
11776 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011777 ac_cv_type__Bool=yes
11778else
11779 echo "$as_me: failed program was:" >&5
11780sed 's/^/| /' conftest.$ac_ext >&5
11781
Martin v. Löwiseba40652007-08-30 20:10:57 +000011782 ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011783fi
Brett Cannon19fab762007-06-02 03:02:29 +000011784
Martin v. Löwiseba40652007-08-30 20:10:57 +000011785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11786fi
11787{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
11788echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
11789
11790# The cast to long int works around a bug in the HP C Compiler
11791# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11792# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11793# This bug is HP SR number 8606223364.
11794{ echo "$as_me:$LINENO: checking size of _Bool" >&5
11795echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011796if test "${ac_cv_sizeof__Bool+set}" = set; then
11797 echo $ECHO_N "(cached) $ECHO_C" >&6
11798else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011799 if test "$cross_compiling" = yes; then
11800 # Depending upon the size, compute the lo and hi bounds.
11801cat >conftest.$ac_ext <<_ACEOF
11802/* confdefs.h. */
11803_ACEOF
11804cat confdefs.h >>conftest.$ac_ext
11805cat >>conftest.$ac_ext <<_ACEOF
11806/* end confdefs.h. */
11807$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011808 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011809int
11810main ()
11811{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011812static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011813test_array [0] = 0
11814
11815 ;
11816 return 0;
11817}
11818_ACEOF
11819rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011820if { (ac_try="$ac_compile"
11821case "(($ac_try" in
11822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11823 *) ac_try_echo=$ac_try;;
11824esac
11825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011827 ac_status=$?
11828 grep -v '^ *+' conftest.er1 >conftest.err
11829 rm -f conftest.er1
11830 cat conftest.err >&5
11831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011832 (exit $ac_status); } && {
11833 test -z "$ac_c_werror_flag" ||
11834 test ! -s conftest.err
11835 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011836 ac_lo=0 ac_mid=0
11837 while :; do
11838 cat >conftest.$ac_ext <<_ACEOF
11839/* confdefs.h. */
11840_ACEOF
11841cat confdefs.h >>conftest.$ac_ext
11842cat >>conftest.$ac_ext <<_ACEOF
11843/* end confdefs.h. */
11844$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011845 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011846int
11847main ()
11848{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011849static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011850test_array [0] = 0
11851
11852 ;
11853 return 0;
11854}
11855_ACEOF
11856rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011857if { (ac_try="$ac_compile"
11858case "(($ac_try" in
11859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11860 *) ac_try_echo=$ac_try;;
11861esac
11862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011864 ac_status=$?
11865 grep -v '^ *+' conftest.er1 >conftest.err
11866 rm -f conftest.er1
11867 cat conftest.err >&5
11868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011869 (exit $ac_status); } && {
11870 test -z "$ac_c_werror_flag" ||
11871 test ! -s conftest.err
11872 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011873 ac_hi=$ac_mid; break
11874else
11875 echo "$as_me: failed program was:" >&5
11876sed 's/^/| /' conftest.$ac_ext >&5
11877
Martin v. Löwiseba40652007-08-30 20:10:57 +000011878 ac_lo=`expr $ac_mid + 1`
11879 if test $ac_lo -le $ac_mid; then
11880 ac_lo= ac_hi=
11881 break
11882 fi
11883 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011885
11886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011887 done
11888else
11889 echo "$as_me: failed program was:" >&5
11890sed 's/^/| /' conftest.$ac_ext >&5
11891
Martin v. Löwiseba40652007-08-30 20:10:57 +000011892 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
11898$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011899 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011900int
11901main ()
11902{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011903static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011904test_array [0] = 0
11905
11906 ;
11907 return 0;
11908}
11909_ACEOF
11910rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011911if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011918 ac_status=$?
11919 grep -v '^ *+' conftest.er1 >conftest.err
11920 rm -f conftest.er1
11921 cat conftest.err >&5
11922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011923 (exit $ac_status); } && {
11924 test -z "$ac_c_werror_flag" ||
11925 test ! -s conftest.err
11926 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011927 ac_hi=-1 ac_mid=-1
11928 while :; do
11929 cat >conftest.$ac_ext <<_ACEOF
11930/* confdefs.h. */
11931_ACEOF
11932cat confdefs.h >>conftest.$ac_ext
11933cat >>conftest.$ac_ext <<_ACEOF
11934/* end confdefs.h. */
11935$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000011936 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011937int
11938main ()
11939{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011940static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011941test_array [0] = 0
11942
11943 ;
11944 return 0;
11945}
11946_ACEOF
11947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011948if { (ac_try="$ac_compile"
11949case "(($ac_try" in
11950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11951 *) ac_try_echo=$ac_try;;
11952esac
11953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11954 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011955 ac_status=$?
11956 grep -v '^ *+' conftest.er1 >conftest.err
11957 rm -f conftest.er1
11958 cat conftest.err >&5
11959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011960 (exit $ac_status); } && {
11961 test -z "$ac_c_werror_flag" ||
11962 test ! -s conftest.err
11963 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011964 ac_lo=$ac_mid; break
11965else
11966 echo "$as_me: failed program was:" >&5
11967sed 's/^/| /' conftest.$ac_ext >&5
11968
Martin v. Löwiseba40652007-08-30 20:10:57 +000011969 ac_hi=`expr '(' $ac_mid ')' - 1`
11970 if test $ac_mid -le $ac_hi; then
11971 ac_lo= ac_hi=
11972 break
11973 fi
11974 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011976
11977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011978 done
11979else
11980 echo "$as_me: failed program was:" >&5
11981sed 's/^/| /' conftest.$ac_ext >&5
11982
Martin v. Löwiseba40652007-08-30 20:10:57 +000011983 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011984fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011985
11986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011987fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011988
11989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000011990# Binary search between lo and hi bounds.
11991while test "x$ac_lo" != "x$ac_hi"; do
11992 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11993 cat >conftest.$ac_ext <<_ACEOF
11994/* confdefs.h. */
11995_ACEOF
11996cat confdefs.h >>conftest.$ac_ext
11997cat >>conftest.$ac_ext <<_ACEOF
11998/* end confdefs.h. */
11999$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012000 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012001int
12002main ()
12003{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012004static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012005test_array [0] = 0
12006
12007 ;
12008 return 0;
12009}
12010_ACEOF
12011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012012if { (ac_try="$ac_compile"
12013case "(($ac_try" in
12014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12015 *) ac_try_echo=$ac_try;;
12016esac
12017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012019 ac_status=$?
12020 grep -v '^ *+' conftest.er1 >conftest.err
12021 rm -f conftest.er1
12022 cat conftest.err >&5
12023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012024 (exit $ac_status); } && {
12025 test -z "$ac_c_werror_flag" ||
12026 test ! -s conftest.err
12027 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012028 ac_hi=$ac_mid
12029else
12030 echo "$as_me: failed program was:" >&5
12031sed 's/^/| /' conftest.$ac_ext >&5
12032
Martin v. Löwiseba40652007-08-30 20:10:57 +000012033 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012035
12036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012037done
12038case $ac_lo in
12039?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012040'') if test "$ac_cv_type__Bool" = yes; then
12041 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012042See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012043echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012044See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012045 { (exit 77); exit 77; }; }
12046 else
12047 ac_cv_sizeof__Bool=0
12048 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012049esac
12050else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012051 cat >conftest.$ac_ext <<_ACEOF
12052/* confdefs.h. */
12053_ACEOF
12054cat confdefs.h >>conftest.$ac_ext
12055cat >>conftest.$ac_ext <<_ACEOF
12056/* end confdefs.h. */
12057$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012058 typedef _Bool ac__type_sizeof_;
12059static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12060static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012061#include <stdio.h>
12062#include <stdlib.h>
12063int
12064main ()
12065{
12066
12067 FILE *f = fopen ("conftest.val", "w");
12068 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012069 return 1;
12070 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012071 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012072 long int i = longval ();
12073 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12074 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012075 fprintf (f, "%ld\n", i);
12076 }
12077 else
12078 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012079 unsigned long int i = ulongval ();
12080 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12081 return 1;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012082 fprintf (f, "%lu\n", i);
12083 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012084 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012085
12086 ;
12087 return 0;
12088}
12089_ACEOF
12090rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012091if { (ac_try="$ac_link"
12092case "(($ac_try" in
12093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12094 *) ac_try_echo=$ac_try;;
12095esac
12096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12097 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012098 ac_status=$?
12099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12100 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012101 { (case "(($ac_try" in
12102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12103 *) ac_try_echo=$ac_try;;
12104esac
12105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12106 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012107 ac_status=$?
12108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12109 (exit $ac_status); }; }; then
12110 ac_cv_sizeof__Bool=`cat conftest.val`
12111else
12112 echo "$as_me: program exited with status $ac_status" >&5
12113echo "$as_me: failed program was:" >&5
12114sed 's/^/| /' conftest.$ac_ext >&5
12115
12116( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012117if test "$ac_cv_type__Bool" = yes; then
12118 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012119See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012120echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012121See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012122 { (exit 77); exit 77; }; }
12123 else
12124 ac_cv_sizeof__Bool=0
12125 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012126fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012127rm -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 +000012128fi
12129rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012130fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012131{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12132echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
12133
12134
12135
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012136cat >>confdefs.h <<_ACEOF
12137#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12138_ACEOF
12139
12140
12141fi
12142
Martin v. Löwiseba40652007-08-30 20:10:57 +000012143{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12144echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012145if test "${ac_cv_type_uintptr_t+set}" = set; then
12146 echo $ECHO_N "(cached) $ECHO_C" >&6
12147else
12148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012149/* confdefs.h. */
12150_ACEOF
12151cat confdefs.h >>conftest.$ac_ext
12152cat >>conftest.$ac_ext <<_ACEOF
12153/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012154#ifdef HAVE_STDINT_H
12155 #include <stdint.h>
12156 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012157
Martin v. Löwiseba40652007-08-30 20:10:57 +000012158typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012159int
12160main ()
12161{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012162if ((ac__type_new_ *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000012163 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012164if (sizeof (ac__type_new_))
Martin v. Löwisebe26702006-10-02 14:55:51 +000012165 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 ;
12167 return 0;
12168}
12169_ACEOF
12170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012171if { (ac_try="$ac_compile"
12172case "(($ac_try" in
12173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12174 *) ac_try_echo=$ac_try;;
12175esac
12176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12177 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012179 grep -v '^ *+' conftest.er1 >conftest.err
12180 rm -f conftest.er1
12181 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012183 (exit $ac_status); } && {
12184 test -z "$ac_c_werror_flag" ||
12185 test ! -s conftest.err
12186 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012187 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012188else
Martin v. Löwis11437992002-04-12 09:54:03 +000012189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012190sed 's/^/| /' conftest.$ac_ext >&5
12191
Martin v. Löwiseba40652007-08-30 20:10:57 +000012192 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012194
12195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012197{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12198echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012199if test $ac_cv_type_uintptr_t = yes; then
12200
12201cat >>confdefs.h <<_ACEOF
12202#define HAVE_UINTPTR_T 1
12203_ACEOF
12204
Martin v. Löwiseba40652007-08-30 20:10:57 +000012205{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12206echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012207if test "${ac_cv_type_uintptr_t+set}" = set; then
12208 echo $ECHO_N "(cached) $ECHO_C" >&6
12209else
12210 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012211/* confdefs.h. */
12212_ACEOF
12213cat confdefs.h >>conftest.$ac_ext
12214cat >>conftest.$ac_ext <<_ACEOF
12215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012216$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012217typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012218int
12219main ()
12220{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012221if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012223if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000012224 return 0;
12225 ;
12226 return 0;
12227}
12228_ACEOF
12229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012230if { (ac_try="$ac_compile"
12231case "(($ac_try" in
12232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12233 *) ac_try_echo=$ac_try;;
12234esac
12235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012238 grep -v '^ *+' conftest.er1 >conftest.err
12239 rm -f conftest.er1
12240 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012242 (exit $ac_status); } && {
12243 test -z "$ac_c_werror_flag" ||
12244 test ! -s conftest.err
12245 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 ac_cv_type_uintptr_t=yes
12247else
12248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012249sed 's/^/| /' conftest.$ac_ext >&5
12250
Martin v. Löwiseba40652007-08-30 20:10:57 +000012251 ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012252fi
Brett Cannon19fab762007-06-02 03:02:29 +000012253
Martin v. Löwiseba40652007-08-30 20:10:57 +000012254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12255fi
12256{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12257echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12258
12259# The cast to long int works around a bug in the HP C Compiler
12260# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12261# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12262# This bug is HP SR number 8606223364.
12263{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12264echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012265if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
12266 echo $ECHO_N "(cached) $ECHO_C" >&6
12267else
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 if test "$cross_compiling" = yes; then
12269 # Depending upon the size, compute the lo and hi bounds.
12270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012271/* confdefs.h. */
12272_ACEOF
12273cat confdefs.h >>conftest.$ac_ext
12274cat >>conftest.$ac_ext <<_ACEOF
12275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012276$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012278int
12279main ()
12280{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012281static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012282test_array [0] = 0
12283
12284 ;
12285 return 0;
12286}
12287_ACEOF
12288rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012289if { (ac_try="$ac_compile"
12290case "(($ac_try" in
12291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12292 *) ac_try_echo=$ac_try;;
12293esac
12294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12295 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012297 grep -v '^ *+' conftest.er1 >conftest.err
12298 rm -f conftest.er1
12299 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012301 (exit $ac_status); } && {
12302 test -z "$ac_c_werror_flag" ||
12303 test ! -s conftest.err
12304 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 ac_lo=0 ac_mid=0
12306 while :; do
12307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* confdefs.h. */
12309_ACEOF
12310cat confdefs.h >>conftest.$ac_ext
12311cat >>conftest.$ac_ext <<_ACEOF
12312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012313$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012314 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012315int
12316main ()
12317{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012318static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012319test_array [0] = 0
12320
12321 ;
12322 return 0;
12323}
12324_ACEOF
12325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012326if { (ac_try="$ac_compile"
12327case "(($ac_try" in
12328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12329 *) ac_try_echo=$ac_try;;
12330esac
12331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012334 grep -v '^ *+' conftest.er1 >conftest.err
12335 rm -f conftest.er1
12336 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012338 (exit $ac_status); } && {
12339 test -z "$ac_c_werror_flag" ||
12340 test ! -s conftest.err
12341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012342 ac_hi=$ac_mid; break
12343else
12344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012345sed 's/^/| /' conftest.$ac_ext >&5
12346
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347 ac_lo=`expr $ac_mid + 1`
12348 if test $ac_lo -le $ac_mid; then
12349 ac_lo= ac_hi=
12350 break
12351 fi
12352 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012354
12355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012356 done
12357else
12358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012359sed 's/^/| /' conftest.$ac_ext >&5
12360
Martin v. Löwiseba40652007-08-30 20:10:57 +000012361 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* confdefs.h. */
12363_ACEOF
12364cat confdefs.h >>conftest.$ac_ext
12365cat >>conftest.$ac_ext <<_ACEOF
12366/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012367$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012369int
12370main ()
12371{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012372static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012373test_array [0] = 0
12374
12375 ;
12376 return 0;
12377}
12378_ACEOF
12379rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012380if { (ac_try="$ac_compile"
12381case "(($ac_try" in
12382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12383 *) ac_try_echo=$ac_try;;
12384esac
12385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012388 grep -v '^ *+' conftest.er1 >conftest.err
12389 rm -f conftest.er1
12390 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012392 (exit $ac_status); } && {
12393 test -z "$ac_c_werror_flag" ||
12394 test ! -s conftest.err
12395 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012396 ac_hi=-1 ac_mid=-1
12397 while :; do
12398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012399/* confdefs.h. */
12400_ACEOF
12401cat confdefs.h >>conftest.$ac_ext
12402cat >>conftest.$ac_ext <<_ACEOF
12403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012404$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012405 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012406int
12407main ()
12408{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012409static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012410test_array [0] = 0
12411
12412 ;
12413 return 0;
12414}
12415_ACEOF
12416rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417if { (ac_try="$ac_compile"
12418case "(($ac_try" in
12419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12420 *) ac_try_echo=$ac_try;;
12421esac
12422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12423 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012425 grep -v '^ *+' conftest.er1 >conftest.err
12426 rm -f conftest.er1
12427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012429 (exit $ac_status); } && {
12430 test -z "$ac_c_werror_flag" ||
12431 test ! -s conftest.err
12432 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 ac_lo=$ac_mid; break
12434else
12435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012436sed 's/^/| /' conftest.$ac_ext >&5
12437
Martin v. Löwiseba40652007-08-30 20:10:57 +000012438 ac_hi=`expr '(' $ac_mid ')' - 1`
12439 if test $ac_mid -le $ac_hi; then
12440 ac_lo= ac_hi=
12441 break
12442 fi
12443 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445
12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 done
12448else
12449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012450sed 's/^/| /' conftest.$ac_ext >&5
12451
Martin v. Löwiseba40652007-08-30 20:10:57 +000012452 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454
12455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012457
12458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012459# Binary search between lo and hi bounds.
12460while test "x$ac_lo" != "x$ac_hi"; do
12461 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012463/* confdefs.h. */
12464_ACEOF
12465cat confdefs.h >>conftest.$ac_ext
12466cat >>conftest.$ac_ext <<_ACEOF
12467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012468$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012469 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012470int
12471main ()
12472{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012474test_array [0] = 0
12475
12476 ;
12477 return 0;
12478}
12479_ACEOF
12480rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012481if { (ac_try="$ac_compile"
12482case "(($ac_try" in
12483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12484 *) ac_try_echo=$ac_try;;
12485esac
12486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12487 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012489 grep -v '^ *+' conftest.er1 >conftest.err
12490 rm -f conftest.er1
12491 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493 (exit $ac_status); } && {
12494 test -z "$ac_c_werror_flag" ||
12495 test ! -s conftest.err
12496 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012497 ac_hi=$ac_mid
12498else
12499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012500sed 's/^/| /' conftest.$ac_ext >&5
12501
Martin v. Löwiseba40652007-08-30 20:10:57 +000012502 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012504
12505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012506done
12507case $ac_lo in
12508?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509'') if test "$ac_cv_type_uintptr_t" = yes; then
12510 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012511See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012512echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012513See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012514 { (exit 77); exit 77; }; }
12515 else
12516 ac_cv_sizeof_uintptr_t=0
12517 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012518esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012519else
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012521/* confdefs.h. */
12522_ACEOF
12523cat confdefs.h >>conftest.$ac_ext
12524cat >>conftest.$ac_ext <<_ACEOF
12525/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012526$ac_includes_default
Martin v. Löwiseba40652007-08-30 20:10:57 +000012527 typedef uintptr_t ac__type_sizeof_;
12528static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12529static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012530#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012531#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012532int
12533main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012534{
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
12536 FILE *f = fopen ("conftest.val", "w");
12537 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012538 return 1;
12539 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012541 long int i = longval ();
12542 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12543 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012544 fprintf (f, "%ld\n", i);
12545 }
12546 else
12547 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012548 unsigned long int i = ulongval ();
12549 if (i != ((long int) (sizeof (ac__type_sizeof_))))
12550 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000012551 fprintf (f, "%lu\n", i);
12552 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012553 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012554
12555 ;
12556 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012557}
Martin v. Löwis11437992002-04-12 09:54:03 +000012558_ACEOF
12559rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012560if { (ac_try="$ac_link"
12561case "(($ac_try" in
12562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12563 *) ac_try_echo=$ac_try;;
12564esac
12565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12566 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012567 ac_status=$?
12568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12569 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570 { (case "(($ac_try" in
12571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12572 *) ac_try_echo=$ac_try;;
12573esac
12574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12575 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012576 ac_status=$?
12577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12578 (exit $ac_status); }; }; then
12579 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012580else
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 echo "$as_me: program exited with status $ac_status" >&5
12582echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012583sed 's/^/| /' conftest.$ac_ext >&5
12584
Martin v. Löwis11437992002-04-12 09:54:03 +000012585( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012586if test "$ac_cv_type_uintptr_t" = yes; then
12587 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012588See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012589echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012590See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591 { (exit 77); exit 77; }; }
12592 else
12593 ac_cv_sizeof_uintptr_t=0
12594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012595fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596rm -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 +000012597fi
12598rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012600{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12601echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
12602
12603
12604
Martin v. Löwis11437992002-04-12 09:54:03 +000012605cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012606#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012607_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012608
Michael W. Hudson54241132001-12-07 15:38:26 +000012609
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012610fi
12611
Martin v. Löwisebe26702006-10-02 14:55:51 +000012612
12613
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012614# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615{ echo "$as_me:$LINENO: checking size of off_t" >&5
12616echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012617if test "${ac_cv_sizeof_off_t+set}" = set; then
12618 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012619else
12620 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012621 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012622else
Martin v. Löwis11437992002-04-12 09:54:03 +000012623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012629#include <stdio.h>
12630#include <sys/types.h>
12631main()
12632{
12633 FILE *f=fopen("conftestval", "w");
12634 if (!f) exit(1);
12635 fprintf(f, "%d\n", sizeof(off_t));
12636 exit(0);
12637}
Martin v. Löwis11437992002-04-12 09:54:03 +000012638_ACEOF
12639rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012640if { (ac_try="$ac_link"
12641case "(($ac_try" in
12642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12643 *) ac_try_echo=$ac_try;;
12644esac
12645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12646 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012647 ac_status=$?
12648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12649 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012650 { (case "(($ac_try" in
12651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12652 *) ac_try_echo=$ac_try;;
12653esac
12654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12655 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012656 ac_status=$?
12657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12658 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012659 ac_cv_sizeof_off_t=`cat conftestval`
12660else
Martin v. Löwis11437992002-04-12 09:54:03 +000012661 echo "$as_me: program exited with status $ac_status" >&5
12662echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012663sed 's/^/| /' conftest.$ac_ext >&5
12664
Martin v. Löwis11437992002-04-12 09:54:03 +000012665( exit $ac_status )
12666ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012668rm -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 +000012669fi
12670
Martin v. Löwiseba40652007-08-30 20:10:57 +000012671
12672
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012673fi
12674
Martin v. Löwiseba40652007-08-30 20:10:57 +000012675{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12676echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012677
12678cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012679#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012680_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012681
Michael W. Hudson54241132001-12-07 15:38:26 +000012682
Martin v. Löwiseba40652007-08-30 20:10:57 +000012683{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12684echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012685if test "$have_long_long" = yes -a \
12686 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12687 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012688
Martin v. Löwis11437992002-04-12 09:54:03 +000012689cat >>confdefs.h <<\_ACEOF
12690#define HAVE_LARGEFILE_SUPPORT 1
12691_ACEOF
12692
Martin v. Löwiseba40652007-08-30 20:10:57 +000012693 { echo "$as_me:$LINENO: result: yes" >&5
12694echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012695else
Martin v. Löwiseba40652007-08-30 20:10:57 +000012696 { echo "$as_me:$LINENO: result: no" >&5
12697echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012698fi
12699
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012700# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701{ echo "$as_me:$LINENO: checking size of time_t" >&5
12702echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012703if test "${ac_cv_sizeof_time_t+set}" = set; then
12704 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012705else
12706 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012707 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012708else
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012710/* confdefs.h. */
12711_ACEOF
12712cat confdefs.h >>conftest.$ac_ext
12713cat >>conftest.$ac_ext <<_ACEOF
12714/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012715#include <stdio.h>
12716#include <time.h>
12717main()
12718{
12719 FILE *f=fopen("conftestval", "w");
12720 if (!f) exit(1);
12721 fprintf(f, "%d\n", sizeof(time_t));
12722 exit(0);
12723}
Martin v. Löwis11437992002-04-12 09:54:03 +000012724_ACEOF
12725rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726if { (ac_try="$ac_link"
12727case "(($ac_try" in
12728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12729 *) ac_try_echo=$ac_try;;
12730esac
12731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12732 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 ac_status=$?
12734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12735 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736 { (case "(($ac_try" in
12737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12738 *) ac_try_echo=$ac_try;;
12739esac
12740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12741 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012742 ac_status=$?
12743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12744 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012745 ac_cv_sizeof_time_t=`cat conftestval`
12746else
Martin v. Löwis11437992002-04-12 09:54:03 +000012747 echo "$as_me: program exited with status $ac_status" >&5
12748echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012749sed 's/^/| /' conftest.$ac_ext >&5
12750
Martin v. Löwis11437992002-04-12 09:54:03 +000012751( exit $ac_status )
12752ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012754rm -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 +000012755fi
12756
Martin v. Löwiseba40652007-08-30 20:10:57 +000012757
12758
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012759fi
12760
Martin v. Löwiseba40652007-08-30 20:10:57 +000012761{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12762echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012763
12764cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012765#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012766_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012767
Michael W. Hudson54241132001-12-07 15:38:26 +000012768
12769
Trent Mick635f6fb2000-08-23 21:33:05 +000012770# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012771ac_save_cc="$CC"
12772if test "$ac_cv_kpthread" = "yes"
12773then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012774elif test "$ac_cv_kthread" = "yes"
12775then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012776elif test "$ac_cv_pthread" = "yes"
12777then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012778fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012779{ echo "$as_me:$LINENO: checking for pthread_t" >&5
12780echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012781have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012783/* confdefs.h. */
12784_ACEOF
12785cat confdefs.h >>conftest.$ac_ext
12786cat >>conftest.$ac_ext <<_ACEOF
12787/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012788#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012789int
12790main ()
12791{
Guido van Rossum12580492000-09-24 16:47:19 +000012792pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
12797rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012798if { (ac_try="$ac_compile"
12799case "(($ac_try" in
12800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12801 *) ac_try_echo=$ac_try;;
12802esac
12803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12804 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012806 grep -v '^ *+' conftest.er1 >conftest.err
12807 rm -f conftest.er1
12808 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012810 (exit $ac_status); } && {
12811 test -z "$ac_c_werror_flag" ||
12812 test ! -s conftest.err
12813 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012814 have_pthread_t=yes
12815else
Martin v. Löwis11437992002-04-12 09:54:03 +000012816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012817sed 's/^/| /' conftest.$ac_ext >&5
12818
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819
Trent Mick635f6fb2000-08-23 21:33:05 +000012820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012821
12822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12823{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12824echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012825if test "$have_pthread_t" = yes ; then
12826 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwiseba40652007-08-30 20:10:57 +000012827 { echo "$as_me:$LINENO: checking size of pthread_t" >&5
12828echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
12830 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012831else
12832 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012833 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012834else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012836/* confdefs.h. */
12837_ACEOF
12838cat confdefs.h >>conftest.$ac_ext
12839cat >>conftest.$ac_ext <<_ACEOF
12840/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012841#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012842#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000012843 main()
12844 {
12845 FILE *f=fopen("conftestval", "w");
12846 if (!f) exit(1);
12847 fprintf(f, "%d\n", sizeof(pthread_t));
12848 exit(0);
12849 }
Martin v. Löwis11437992002-04-12 09:54:03 +000012850_ACEOF
12851rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852if { (ac_try="$ac_link"
12853case "(($ac_try" in
12854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12855 *) ac_try_echo=$ac_try;;
12856esac
12857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12858 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 ac_status=$?
12860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12861 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862 { (case "(($ac_try" in
12863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12864 *) ac_try_echo=$ac_try;;
12865esac
12866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12867 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 ac_status=$?
12869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12870 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012871 ac_cv_sizeof_pthread_t=`cat conftestval`
12872else
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 echo "$as_me: program exited with status $ac_status" >&5
12874echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012875sed 's/^/| /' conftest.$ac_ext >&5
12876
Martin v. Löwis11437992002-04-12 09:54:03 +000012877( exit $ac_status )
12878ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000012879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880rm -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 +000012881fi
12882
Martin v. Löwiseba40652007-08-30 20:10:57 +000012883
12884
Trent Mick635f6fb2000-08-23 21:33:05 +000012885fi
12886
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887 { echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
12888echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
12890cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012891#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012892_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000012893
12894fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012895CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000012896
Martin v. Löwiseba40652007-08-30 20:10:57 +000012897{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
12898echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
12899# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000012900if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 enableval=$enable_toolbox_glue;
12902fi
Jack Jansene578a632001-08-15 01:27:14 +000012903
12904
12905if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000012906then
Jack Jansene578a632001-08-15 01:27:14 +000012907 case $ac_sys_system/$ac_sys_release in
12908 Darwin/*)
12909 enable_toolbox_glue="yes";;
12910 *)
12911 enable_toolbox_glue="no";;
12912 esac
12913fi
12914case "$enable_toolbox_glue" in
12915yes)
Jack Jansene578a632001-08-15 01:27:14 +000012916 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000012917 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000012918
12919cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012920#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012921_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000012922
12923 ;;
12924*)
Jack Jansene578a632001-08-15 01:27:14 +000012925 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000012926 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000012927 ;;
12928esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000012929{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
12930echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012931
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012932
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000012933
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000012934case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012935 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012936 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
12937 ;;
12938 Darwin/*)
12939 OTHER_LIBTOOL_OPT=""
12940 ;;
12941esac
12942
12943
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012944ARCH_RUN_32BIT=""
12945
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012946case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000012947 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000012948 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
12949 if test "${enable_universalsdk}"; then
12950 :
12951 else
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012952 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000012953 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000012954 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000012955 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000012956 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000012957 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
12958 if test ${gcc_version} '<' 4.0
12959 then
12960 LIBTOOL_CRUFT="-lcc_dynamic"
12961 else
12962 LIBTOOL_CRUFT=""
12963 fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000012964 if test "$cross_compiling" = yes; then
12965 ac_osx_32bit=yes
12966else
12967 cat >conftest.$ac_ext <<_ACEOF
12968/* confdefs.h. */
12969_ACEOF
12970cat confdefs.h >>conftest.$ac_ext
12971cat >>conftest.$ac_ext <<_ACEOF
12972/* end confdefs.h. */
12973
12974 #include <unistd.h>
12975 int main(int argc, char*argv[])
12976 {
12977 if (sizeof(long) == 4) {
12978 return 0;
12979 } else {
12980 return 1;
12981 }
12982 }
12983
12984_ACEOF
12985rm -f conftest$ac_exeext
12986if { (ac_try="$ac_link"
12987case "(($ac_try" in
12988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12989 *) ac_try_echo=$ac_try;;
12990esac
12991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12992 (eval "$ac_link") 2>&5
12993 ac_status=$?
12994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12996 { (case "(($ac_try" in
12997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12998 *) ac_try_echo=$ac_try;;
12999esac
13000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13001 (eval "$ac_try") 2>&5
13002 ac_status=$?
13003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13004 (exit $ac_status); }; }; then
13005 ac_osx_32bit=yes
13006else
13007 echo "$as_me: program exited with status $ac_status" >&5
13008echo "$as_me: failed program was:" >&5
13009sed 's/^/| /' conftest.$ac_ext >&5
13010
13011( exit $ac_status )
13012ac_osx_32bit=no
13013fi
13014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13015fi
13016
13017
13018
13019 if test "${ac_osx_32bit}" = "yes"; then
13020 case `arch` in
13021 i386)
13022 MACOSX_DEFAULT_ARCH="i386"
13023 ;;
13024 ppc)
13025 MACOSX_DEFAULT_ARCH="ppc"
13026 ;;
13027 *)
13028 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13029echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
13030 { (exit 1); exit 1; }; }
13031 ;;
13032 esac
13033 else
13034 case `arch` in
13035 i386)
13036 MACOSX_DEFAULT_ARCH="x86_64"
13037 ;;
13038 ppc)
13039 MACOSX_DEFAULT_ARCH="ppc64"
13040 ;;
13041 *)
13042 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13043echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
13044 { (exit 1); exit 1; }; }
13045 ;;
13046 esac
13047
13048 #ARCH_RUN_32BIT="true"
13049 fi
13050
13051 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013052 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013053 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013054esac
13055
Martin v. Löwiseba40652007-08-30 20:10:57 +000013056{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
13057echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013058if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013059then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013060 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013062 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013063
Martin v. Löwis11437992002-04-12 09:54:03 +000013064cat >>confdefs.h <<\_ACEOF
13065#define WITH_NEXT_FRAMEWORK 1
13066_ACEOF
13067
Martin v. Löwiseba40652007-08-30 20:10:57 +000013068 { echo "$as_me:$LINENO: result: yes" >&5
13069echo "${ECHO_T}yes" >&6; }
Ronald Oussorene6e62672009-06-08 21:19:36 +000013070 if test $enable_shared = "yes"
13071 then
13072 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13073echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
13074 { (exit 1); exit 1; }; }
13075 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013076else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013077 { echo "$as_me:$LINENO: result: no" >&5
13078echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013079fi
13080
Martin v. Löwiseba40652007-08-30 20:10:57 +000013081{ echo "$as_me:$LINENO: checking for dyld" >&5
13082echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013083case $ac_sys_system/$ac_sys_release in
13084 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013085
Martin v. Löwis11437992002-04-12 09:54:03 +000013086cat >>confdefs.h <<\_ACEOF
13087#define WITH_DYLD 1
13088_ACEOF
13089
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
13091echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013092 ;;
13093 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013094 { echo "$as_me:$LINENO: result: no" >&5
13095echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013096 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013097esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013098
Guido van Rossum0a516c91994-09-12 10:58:40 +000013099# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013100
Michael W. Hudson54241132001-12-07 15:38:26 +000013101
13102
13103
13104
Guido van Rossum0a516c91994-09-12 10:58:40 +000013105# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013106# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwiseba40652007-08-30 20:10:57 +000013107{ echo "$as_me:$LINENO: checking SO" >&5
13108echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013109if test -z "$SO"
13110then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013111 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013112 hp*|HP*)
13113 case `uname -m` in
13114 ia64) SO=.so;;
13115 *) SO=.sl;;
13116 esac
13117 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013118 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013119 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013120 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013121else
13122 # this might also be a termcap variable, see #610332
13123 echo
13124 echo '====================================================================='
13125 echo '+ +'
13126 echo '+ WARNING: You have set SO in your environment. +'
13127 echo '+ Do you really mean to change the extension for shared libraries? +'
13128 echo '+ Continuing in 10 seconds to let you to ponder. +'
13129 echo '+ +'
13130 echo '====================================================================='
13131 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013132fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013133{ echo "$as_me:$LINENO: result: $SO" >&5
13134echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013135
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013136
Neal Norwitz58e28882006-05-19 07:00:58 +000013137cat >>confdefs.h <<_ACEOF
13138#define SHLIB_EXT "$SO"
13139_ACEOF
13140
Guido van Rossum0a516c91994-09-12 10:58:40 +000013141# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013142# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013143# (Shared libraries in this instance are shared modules to be loaded into
13144# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013145{ echo "$as_me:$LINENO: checking LDSHARED" >&5
13146echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013147if test -z "$LDSHARED"
13148then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013149 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013150 AIX*)
13151 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013152 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013153 ;;
13154 BeOS*)
13155 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013156 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013157 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013158 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013159 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013161 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013162 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013163 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013164 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013165 hp*|HP*)
13166 if test "$GCC" = "yes"
13167 then LDSHARED='$(CC) -shared'
13168 else LDSHARED='ld -b';
13169 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013170 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013171 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013172 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13173 if test "$enable_framework" ; then
13174 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013175 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13176 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013177 else
13178 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013179 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013180 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013181 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013182 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13183 if test "$enable_framework" ; then
13184 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013185 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13186 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013187 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013188 # No framework, use the Python app as bundle-loader
13189 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013190 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013191 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013192 Darwin/*)
13193 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13194 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013195
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013196 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013197 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013198 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013199 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013200 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013201 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13202 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013203 else
13204 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13205 if test "$enable_framework" ; then
13206 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013207 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13208 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013209 else
13210 # No framework, use the Python app as bundle-loader
13211 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13212 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13213 fi
13214 fi
13215 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013216 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013217 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013218 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013219 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013220 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013221 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013222 else
13223 LDSHARED="ld -Bshareable ${LDFLAGS}"
13224 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013225 OpenBSD*)
13226 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13227 then
13228 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13229 else
13230 case `uname -r` in
13231 [01].* | 2.[0-7] | 2.[0-7].*)
13232 LDSHARED="ld -Bshareable ${LDFLAGS}"
13233 ;;
13234 *)
13235 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13236 ;;
13237 esac
13238 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013239 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013240 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013241 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013242 then LDSHARED='$(CC) -shared'
13243 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013244 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013245 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013246 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013247 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013248 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013249 *) LDSHARED="ld";;
13250 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013251fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013252{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
13253echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013254BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013255# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013256# library (module) -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013257{ echo "$as_me:$LINENO: checking CCSHARED" >&5
13258echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013259if test -z "$CCSHARED"
13260then
Guido van Rossum07397971997-04-29 21:49:50 +000013261 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013262 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013263 then CCSHARED="-fPIC";
13264 elif test `uname -p` = sparc;
13265 then CCSHARED="-xcode=pic32";
13266 else CCSHARED="-Kpic";
13267 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013268 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013269 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013270 else CCSHARED="+z";
13271 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013272 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013273 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013274 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013275 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013276 if test "$GCC" = "yes"
13277 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013278 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013279 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013280 SCO_SV*)
13281 if test "$GCC" = "yes"
13282 then CCSHARED="-fPIC"
13283 else CCSHARED="-Kpic -belf"
13284 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013285 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013286 IRIX*/6*) case $CC in
13287 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013288 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013289 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013290 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013291 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013292fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013293{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
13294echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013295# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013296# the python executable -- this is only needed for a few systems
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13298echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013299if test -z "$LINKFORSHARED"
13300then
Guido van Rossum07397971997-04-29 21:49:50 +000013301 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013302 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013303 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013304 LINKFORSHARED="-Wl,-E -Wl,+s";;
13305# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013306 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013307 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013308 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013310 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13311 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013312 # not used by the core itself but which needs to be in the core so
13313 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013314 # -prebind is no longer used, because it actually seems to give a
13315 # slowdown in stead of a speedup, maybe due to the large number of
13316 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013317
13318 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013319 if test "$enable_framework"
13320 then
Jack Jansenda49e192005-01-07 13:08:22 +000013321 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013322 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013323 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013324 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013325 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013326 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013327 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013328 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13329 then
13330 LINKFORSHARED="-Wl,--export-dynamic"
13331 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013332 SunOS/5*) case $CC in
13333 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013334 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013335 then
13336 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013337 fi;;
13338 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013339 CYGWIN*)
13340 if test $enable_shared = "no"
13341 then
13342 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13343 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013344 QNX*)
13345 # -Wl,-E causes the symbols to be added to the dynamic
13346 # symbol table so that they can be found when a module
13347 # is loaded. -N 2048K causes the stack size to be set
13348 # to 2048 kilobytes so that the stack doesn't overflow
13349 # when running test_compile.py.
13350 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013351 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013352fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013353{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13354echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013355
Michael W. Hudson54241132001-12-07 15:38:26 +000013356
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013357
Martin v. Löwiseba40652007-08-30 20:10:57 +000013358{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13359echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013360if test ! "$LIBRARY" = "$LDLIBRARY"
13361then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013362 case $ac_sys_system in
13363 CYGWIN*)
13364 # Cygwin needs CCSHARED when building extension DLLs
13365 # but not when building the interpreter DLL.
13366 CFLAGSFORSHARED='';;
13367 *)
13368 CFLAGSFORSHARED='$(CCSHARED)'
13369 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013370fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013371{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13372echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013373
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013374# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13375# library (with --enable-shared).
13376# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013377# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13378# if it is not required, since it creates a dependency of the shared library
13379# to LIBS. This, in turn, means that applications linking the shared libpython
13380# don't need to link LIBS explicitly. The default should be only changed
13381# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013382
Martin v. Löwiseba40652007-08-30 20:10:57 +000013383{ echo "$as_me:$LINENO: checking SHLIBS" >&5
13384echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013385case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013386 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013387 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013388esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000013389{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
13390echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013391
13392
Guido van Rossum627b2d71993-12-24 10:39:16 +000013393# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013394
Martin v. Löwiseba40652007-08-30 20:10:57 +000013395{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13396echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013397if test "${ac_cv_lib_dl_dlopen+set}" = set; then
13398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013399else
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013401LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013403/* confdefs.h. */
13404_ACEOF
13405cat confdefs.h >>conftest.$ac_ext
13406cat >>conftest.$ac_ext <<_ACEOF
13407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Martin v. Löwiseba40652007-08-30 20:10:57 +000013409/* Override any GCC internal prototype to avoid an error.
13410 Use char because int might match the return type of a GCC
13411 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013412#ifdef __cplusplus
13413extern "C"
13414#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013415char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013416int
13417main ()
13418{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013419return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 ;
13421 return 0;
13422}
13423_ACEOF
13424rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013425if { (ac_try="$ac_link"
13426case "(($ac_try" in
13427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13428 *) ac_try_echo=$ac_try;;
13429esac
13430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013433 grep -v '^ *+' conftest.er1 >conftest.err
13434 rm -f conftest.er1
13435 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013437 (exit $ac_status); } && {
13438 test -z "$ac_c_werror_flag" ||
13439 test ! -s conftest.err
13440 } && test -s conftest$ac_exeext &&
13441 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013442 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013443else
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013445sed 's/^/| /' conftest.$ac_ext >&5
13446
Martin v. Löwiseba40652007-08-30 20:10:57 +000013447 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013449
13450rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013454{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13455echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013456if test $ac_cv_lib_dl_dlopen = yes; then
13457 cat >>confdefs.h <<_ACEOF
13458#define HAVE_LIBDL 1
13459_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013460
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013461 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013462
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013463fi
13464 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
Martin v. Löwiseba40652007-08-30 20:10:57 +000013466{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13467echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013468if test "${ac_cv_lib_dld_shl_load+set}" = set; then
13469 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013470else
Martin v. Löwis11437992002-04-12 09:54:03 +000013471 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013472LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013473cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013474/* confdefs.h. */
13475_ACEOF
13476cat confdefs.h >>conftest.$ac_ext
13477cat >>conftest.$ac_ext <<_ACEOF
13478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013479
Martin v. Löwiseba40652007-08-30 20:10:57 +000013480/* Override any GCC internal prototype to avoid an error.
13481 Use char because int might match the return type of a GCC
13482 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013483#ifdef __cplusplus
13484extern "C"
13485#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013486char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013487int
13488main ()
13489{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013490return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 ;
13492 return 0;
13493}
13494_ACEOF
13495rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013496if { (ac_try="$ac_link"
13497case "(($ac_try" in
13498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13499 *) ac_try_echo=$ac_try;;
13500esac
13501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13502 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013504 grep -v '^ *+' conftest.er1 >conftest.err
13505 rm -f conftest.er1
13506 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013508 (exit $ac_status); } && {
13509 test -z "$ac_c_werror_flag" ||
13510 test ! -s conftest.err
13511 } && test -s conftest$ac_exeext &&
13512 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514else
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013516sed 's/^/| /' conftest.$ac_ext >&5
13517
Martin v. Löwiseba40652007-08-30 20:10:57 +000013518 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013520
13521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013523LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013525{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13526echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013527if test $ac_cv_lib_dld_shl_load = yes; then
13528 cat >>confdefs.h <<_ACEOF
13529#define HAVE_LIBDLD 1
13530_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013531
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013532 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013533
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013534fi
13535 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013536
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013537# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013538if test "$with_threads" = "yes" -o -z "$with_threads"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013539 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13540echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013541if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013543else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013544 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013546/* confdefs.h. */
13547_ACEOF
13548cat confdefs.h >>conftest.$ac_ext
13549cat >>conftest.$ac_ext <<_ACEOF
13550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013551
Martin v. Löwiseba40652007-08-30 20:10:57 +000013552/* Override any GCC internal prototype to avoid an error.
13553 Use char because int might match the return type of a GCC
13554 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013555#ifdef __cplusplus
13556extern "C"
13557#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013558char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013559int
13560main ()
13561{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013562return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 ;
13564 return 0;
13565}
13566_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013567for ac_lib in '' pthread rt posix4; do
13568 if test -z "$ac_lib"; then
13569 ac_res="none required"
13570 else
13571 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013572 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013573 fi
13574 rm -f conftest.$ac_objext conftest$ac_exeext
13575if { (ac_try="$ac_link"
13576case "(($ac_try" in
13577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13578 *) ac_try_echo=$ac_try;;
13579esac
13580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13581 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013582 ac_status=$?
13583 grep -v '^ *+' conftest.er1 >conftest.err
13584 rm -f conftest.er1
13585 cat conftest.err >&5
13586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587 (exit $ac_status); } && {
13588 test -z "$ac_c_werror_flag" ||
13589 test ! -s conftest.err
13590 } && test -s conftest$ac_exeext &&
13591 $as_test_x conftest$ac_exeext; then
13592 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013593else
Skip Montanaro89e975f2007-08-22 19:05:21 +000013594 echo "$as_me: failed program was:" >&5
13595sed 's/^/| /' conftest.$ac_ext >&5
13596
Martin v. Löwiseba40652007-08-30 20:10:57 +000013597
Brett Cannon19fab762007-06-02 03:02:29 +000013598fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013599
13600rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13601 conftest$ac_exeext
13602 if test "${ac_cv_search_sem_init+set}" = set; then
13603 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013604fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013605done
13606if test "${ac_cv_search_sem_init+set}" = set; then
13607 :
13608else
13609 ac_cv_search_sem_init=no
13610fi
13611rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013612LIBS=$ac_func_search_save_LIBS
13613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013614{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13615echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
13616ac_res=$ac_cv_search_sem_init
13617if test "$ac_res" != no; then
13618 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013619
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013620fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013621 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013622 # posix4 on Solaris 2.6
13623 # pthread (first!) on Linux
13624fi
13625
Martin v. Löwis19d17342003-06-14 21:03:05 +000013626# check if we need libintl for locale functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000013627{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13628echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013629if test "${ac_cv_lib_intl_textdomain+set}" = set; then
13630 echo $ECHO_N "(cached) $ECHO_C" >&6
13631else
13632 ac_check_lib_save_LIBS=$LIBS
13633LIBS="-lintl $LIBS"
13634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013635/* confdefs.h. */
13636_ACEOF
13637cat confdefs.h >>conftest.$ac_ext
13638cat >>conftest.$ac_ext <<_ACEOF
13639/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013640
Martin v. Löwiseba40652007-08-30 20:10:57 +000013641/* Override any GCC internal prototype to avoid an error.
13642 Use char because int might match the return type of a GCC
13643 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013644#ifdef __cplusplus
13645extern "C"
13646#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013647char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013648int
13649main ()
13650{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013651return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013652 ;
13653 return 0;
13654}
13655_ACEOF
13656rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013657if { (ac_try="$ac_link"
13658case "(($ac_try" in
13659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13660 *) ac_try_echo=$ac_try;;
13661esac
13662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013665 grep -v '^ *+' conftest.er1 >conftest.err
13666 rm -f conftest.er1
13667 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000013668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669 (exit $ac_status); } && {
13670 test -z "$ac_c_werror_flag" ||
13671 test ! -s conftest.err
13672 } && test -s conftest$ac_exeext &&
13673 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013674 ac_cv_lib_intl_textdomain=yes
13675else
13676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013677sed 's/^/| /' conftest.$ac_ext >&5
13678
Martin v. Löwiseba40652007-08-30 20:10:57 +000013679 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013680fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013681
13682rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013683 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013684LIBS=$ac_check_lib_save_LIBS
13685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013686{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13687echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013688if test $ac_cv_lib_intl_textdomain = yes; then
13689
13690cat >>confdefs.h <<\_ACEOF
13691#define WITH_LIBINTL 1
13692_ACEOF
13693
13694fi
13695
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013696
13697# checks for system dependent C++ extensions support
13698case "$ac_sys_system" in
Martin v. Löwiseba40652007-08-30 20:10:57 +000013699 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13700echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013702/* confdefs.h. */
13703_ACEOF
13704cat confdefs.h >>conftest.$ac_ext
13705cat >>conftest.$ac_ext <<_ACEOF
13706/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013707#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013708int
13709main ()
13710{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013711loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013712 ;
13713 return 0;
13714}
13715_ACEOF
13716rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013717if { (ac_try="$ac_link"
13718case "(($ac_try" in
13719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13720 *) ac_try_echo=$ac_try;;
13721esac
13722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13723 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013725 grep -v '^ *+' conftest.er1 >conftest.err
13726 rm -f conftest.er1
13727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013729 (exit $ac_status); } && {
13730 test -z "$ac_c_werror_flag" ||
13731 test ! -s conftest.err
13732 } && test -s conftest$ac_exeext &&
13733 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013734
Martin v. Löwis11437992002-04-12 09:54:03 +000013735cat >>confdefs.h <<\_ACEOF
13736#define AIX_GENUINE_CPLUSPLUS 1
13737_ACEOF
13738
Martin v. Löwiseba40652007-08-30 20:10:57 +000013739 { echo "$as_me:$LINENO: result: yes" >&5
13740echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013741else
Martin v. Löwis11437992002-04-12 09:54:03 +000013742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013743sed 's/^/| /' conftest.$ac_ext >&5
13744
Martin v. Löwiseba40652007-08-30 20:10:57 +000013745 { echo "$as_me:$LINENO: result: no" >&5
13746echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013748
13749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013750 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013751 *) ;;
13752esac
13753
Guido van Rossum70c7f481998-03-26 18:44:10 +000013754# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013755# BeOS' sockets are stashed in libnet.
Martin v. Löwiseba40652007-08-30 20:10:57 +000013756{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13757echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013758if test "${ac_cv_lib_nsl_t_open+set}" = set; then
13759 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013760else
Martin v. Löwis11437992002-04-12 09:54:03 +000013761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013762LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013764/* confdefs.h. */
13765_ACEOF
13766cat confdefs.h >>conftest.$ac_ext
13767cat >>conftest.$ac_ext <<_ACEOF
13768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013769
Martin v. Löwiseba40652007-08-30 20:10:57 +000013770/* Override any GCC internal prototype to avoid an error.
13771 Use char because int might match the return type of a GCC
13772 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013773#ifdef __cplusplus
13774extern "C"
13775#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013776char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013777int
13778main ()
13779{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013780return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 ;
13782 return 0;
13783}
13784_ACEOF
13785rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013786if { (ac_try="$ac_link"
13787case "(($ac_try" in
13788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13789 *) ac_try_echo=$ac_try;;
13790esac
13791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13792 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013794 grep -v '^ *+' conftest.er1 >conftest.err
13795 rm -f conftest.er1
13796 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013798 (exit $ac_status); } && {
13799 test -z "$ac_c_werror_flag" ||
13800 test ! -s conftest.err
13801 } && test -s conftest$ac_exeext &&
13802 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013803 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013804else
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013806sed 's/^/| /' conftest.$ac_ext >&5
13807
Martin v. Löwiseba40652007-08-30 20:10:57 +000013808 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013809fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013810
13811rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013813LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013814fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013815{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13816echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013817if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013818 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013819fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013820 # SVR4
Martin v. Löwiseba40652007-08-30 20:10:57 +000013821{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13822echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013823if test "${ac_cv_lib_socket_socket+set}" = set; then
13824 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013825else
Martin v. Löwis11437992002-04-12 09:54:03 +000013826 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013827LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013828cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013829/* confdefs.h. */
13830_ACEOF
13831cat confdefs.h >>conftest.$ac_ext
13832cat >>conftest.$ac_ext <<_ACEOF
13833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013834
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835/* Override any GCC internal prototype to avoid an error.
13836 Use char because int might match the return type of a GCC
13837 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013838#ifdef __cplusplus
13839extern "C"
13840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013841char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013842int
13843main ()
13844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013845return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ;
13847 return 0;
13848}
13849_ACEOF
13850rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013851if { (ac_try="$ac_link"
13852case "(($ac_try" in
13853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13854 *) ac_try_echo=$ac_try;;
13855esac
13856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13857 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013858 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013859 grep -v '^ *+' conftest.er1 >conftest.err
13860 rm -f conftest.er1
13861 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013863 (exit $ac_status); } && {
13864 test -z "$ac_c_werror_flag" ||
13865 test ! -s conftest.err
13866 } && test -s conftest$ac_exeext &&
13867 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013869else
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013871sed 's/^/| /' conftest.$ac_ext >&5
13872
Martin v. Löwiseba40652007-08-30 20:10:57 +000013873 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013874fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875
13876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013878LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013879fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013880{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13881echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013882if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013883 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013884fi
13885 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013886
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000013887case "$ac_sys_system" in
13888BeOS*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013889{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
13890echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013891if test "${ac_cv_lib_net_socket+set}" = set; then
13892 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000013893else
Martin v. Löwis11437992002-04-12 09:54:03 +000013894 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013895LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013896cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013897/* confdefs.h. */
13898_ACEOF
13899cat confdefs.h >>conftest.$ac_ext
13900cat >>conftest.$ac_ext <<_ACEOF
13901/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013902
Martin v. Löwiseba40652007-08-30 20:10:57 +000013903/* Override any GCC internal prototype to avoid an error.
13904 Use char because int might match the return type of a GCC
13905 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013906#ifdef __cplusplus
13907extern "C"
13908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013909char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013910int
13911main ()
13912{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013913return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013914 ;
13915 return 0;
13916}
13917_ACEOF
13918rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013919if { (ac_try="$ac_link"
13920case "(($ac_try" in
13921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13922 *) ac_try_echo=$ac_try;;
13923esac
13924eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13925 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013927 grep -v '^ *+' conftest.er1 >conftest.err
13928 rm -f conftest.er1
13929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931 (exit $ac_status); } && {
13932 test -z "$ac_c_werror_flag" ||
13933 test ! -s conftest.err
13934 } && test -s conftest$ac_exeext &&
13935 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013936 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013937else
Martin v. Löwis11437992002-04-12 09:54:03 +000013938 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013939sed 's/^/| /' conftest.$ac_ext >&5
13940
Martin v. Löwiseba40652007-08-30 20:10:57 +000013941 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013942fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013943
13944rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013945 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013946LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000013947fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013948{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
13949echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013950if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013951 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013952fi
13953 # BeOS
13954;;
13955esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000013956
Martin v. Löwiseba40652007-08-30 20:10:57 +000013957{ echo "$as_me:$LINENO: checking for --with-libs" >&5
13958echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013959
Martin v. Löwiseba40652007-08-30 20:10:57 +000013960# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013961if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013962 withval=$with_libs;
13963{ echo "$as_me:$LINENO: result: $withval" >&5
13964echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013965LIBS="$withval $LIBS"
13966
13967else
Martin v. Löwiseba40652007-08-30 20:10:57 +000013968 { echo "$as_me:$LINENO: result: no" >&5
13969echo "${ECHO_T}no" >&6; }
13970fi
13971
Guido van Rossum7f43da71994-08-01 12:15:30 +000013972
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013973# Check for use of the system libffi library
Martin v. Löwiseba40652007-08-30 20:10:57 +000013974{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13975echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013976
Martin v. Löwiseba40652007-08-30 20:10:57 +000013977# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013978if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013979 withval=$with_system_ffi;
13980fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013981
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013982
Martin v. Löwiseba40652007-08-30 20:10:57 +000013983{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13984echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000013985
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013986# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013987
13988
Martin v. Löwiseba40652007-08-30 20:10:57 +000013989{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13990echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013991
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013993if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994 withval=$with_signal_module;
13995fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013996
13997
13998if test -z "$with_signal_module"
13999then with_signal_module="yes"
14000fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014001{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
14002echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014003
14004if test "${with_signal_module}" = "yes"; then
14005 USE_SIGNAL_MODULE=""
14006 SIGNAL_OBJS=""
14007else
14008 USE_SIGNAL_MODULE="#"
14009 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14010fi
14011
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014012# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014013
Barry Warsawc0d24d82000-06-29 16:12:00 +000014014USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014015
Martin v. Löwiseba40652007-08-30 20:10:57 +000014016{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14017echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
Guido van Rossumec2f0731997-01-22 20:54:01 +000014019
Martin v. Löwiseba40652007-08-30 20:10:57 +000014020# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014021if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014022 withval=$with_dec_threads;
14023{ echo "$as_me:$LINENO: result: $withval" >&5
14024echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014025LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014026if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014027 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014028fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014029else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014030 { echo "$as_me:$LINENO: result: no" >&5
14031echo "${ECHO_T}no" >&6; }
14032fi
14033
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
14035# Templates for things AC_DEFINEd more than once.
14036# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014037
14038
Martin v. Löwis11437992002-04-12 09:54:03 +000014039
14040
14041
14042
14043
Martin v. Löwiseba40652007-08-30 20:10:57 +000014044{ echo "$as_me:$LINENO: checking for --with-threads" >&5
14045echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014046
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014048if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014049 withval=$with_threads;
14050fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014051
14052
Barry Warsawc0d24d82000-06-29 16:12:00 +000014053# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014054
Martin v. Löwiseba40652007-08-30 20:10:57 +000014055# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014056if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014057 withval=$with_thread; with_threads=$with_thread
14058fi
14059
Barry Warsawc0d24d82000-06-29 16:12:00 +000014060
14061if test -z "$with_threads"
14062then with_threads="yes"
14063fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014064{ echo "$as_me:$LINENO: result: $with_threads" >&5
14065echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014066
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014067
Barry Warsawc0d24d82000-06-29 16:12:00 +000014068if test "$with_threads" = "no"
14069then
14070 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014071elif test "$ac_cv_pthread_is_default" = yes
14072then
Martin v. Löwis11437992002-04-12 09:54:03 +000014073 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014074#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014075_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014076
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014077 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014079#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014080_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014081
14082 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014083 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014084elif test "$ac_cv_kpthread" = "yes"
14085then
14086 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014087 if test "$ac_cv_cxx_thread" = "yes"; then
14088 CXX="$CXX -Kpthread"
14089 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014090 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014091#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014092_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014093
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014094 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014095 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014096elif test "$ac_cv_kthread" = "yes"
14097then
14098 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014099 if test "$ac_cv_cxx_thread" = "yes"; then
14100 CXX="$CXX -Kthread"
14101 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014102 cat >>confdefs.h <<\_ACEOF
14103#define WITH_THREAD 1
14104_ACEOF
14105
14106 posix_threads=yes
14107 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014108elif test "$ac_cv_pthread" = "yes"
14109then
14110 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014111 if test "$ac_cv_cxx_thread" = "yes"; then
14112 CXX="$CXX -pthread"
14113 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014114 cat >>confdefs.h <<\_ACEOF
14115#define WITH_THREAD 1
14116_ACEOF
14117
14118 posix_threads=yes
14119 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014120else
14121 if test ! -z "$with_threads" -a -d "$with_threads"
14122 then LDFLAGS="$LDFLAGS -L$with_threads"
14123 fi
14124 if test ! -z "$withval" -a -d "$withval"
14125 then LDFLAGS="$LDFLAGS -L$withval"
14126 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014127
14128 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014129 # define _POSIX_THREADS in unistd.h. Some apparently don't
14130 # (e.g. gnu pth with pthread emulation)
Martin v. Löwiseba40652007-08-30 20:10:57 +000014131 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14132echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014134/* confdefs.h. */
14135_ACEOF
14136cat confdefs.h >>conftest.$ac_ext
14137cat >>conftest.$ac_ext <<_ACEOF
14138/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014139
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014140#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014141#ifdef _POSIX_THREADS
14142yes
14143#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014144
14145_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014146if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014147 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014148 unistd_defines_pthreads=yes
14149else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014150 unistd_defines_pthreads=no
14151fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000014152rm -f -r conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014153
Martin v. Löwiseba40652007-08-30 20:10:57 +000014154 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14155echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014156
Martin v. Löwis11437992002-04-12 09:54:03 +000014157 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014158#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014159_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014160
Martin v. Löwis11437992002-04-12 09:54:03 +000014161 if test "${ac_cv_header_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014162 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
14163echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014164if test "${ac_cv_header_cthreads_h+set}" = set; then
14165 echo $ECHO_N "(cached) $ECHO_C" >&6
14166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014167{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14168echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14172echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014173cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014174/* confdefs.h. */
14175_ACEOF
14176cat confdefs.h >>conftest.$ac_ext
14177cat >>conftest.$ac_ext <<_ACEOF
14178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014179$ac_includes_default
14180#include <cthreads.h>
14181_ACEOF
14182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014183if { (ac_try="$ac_compile"
14184case "(($ac_try" in
14185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14186 *) ac_try_echo=$ac_try;;
14187esac
14188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14189 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014190 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014191 grep -v '^ *+' conftest.er1 >conftest.err
14192 rm -f conftest.er1
14193 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014195 (exit $ac_status); } && {
14196 test -z "$ac_c_werror_flag" ||
14197 test ! -s conftest.err
14198 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014199 ac_header_compiler=yes
14200else
14201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014202sed 's/^/| /' conftest.$ac_ext >&5
14203
Martin v. Löwiseba40652007-08-30 20:10:57 +000014204 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014206
14207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14208{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14209echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014210
14211# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014212{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14213echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014215/* confdefs.h. */
14216_ACEOF
14217cat confdefs.h >>conftest.$ac_ext
14218cat >>conftest.$ac_ext <<_ACEOF
14219/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014220#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014221_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014222if { (ac_try="$ac_cpp conftest.$ac_ext"
14223case "(($ac_try" in
14224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14225 *) ac_try_echo=$ac_try;;
14226esac
14227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14228 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014229 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014230 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014231 rm -f conftest.er1
14232 cat conftest.err >&5
14233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014234 (exit $ac_status); } >/dev/null && {
14235 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14236 test ! -s conftest.err
14237 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014238 ac_header_preproc=yes
14239else
14240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014241sed 's/^/| /' conftest.$ac_ext >&5
14242
Martin v. Löwis11437992002-04-12 09:54:03 +000014243 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014245
Martin v. Löwis11437992002-04-12 09:54:03 +000014246rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014247{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14248echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014249
14250# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014251case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14252 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014253 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14254echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014255 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14256echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
14257 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014258 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014259 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014260 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14261echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014262 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14263echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14264 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14265echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14266 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14267echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014268 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14269echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014270 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14271echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014272 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014273## ------------------------------------------------ ##
14274## Report this to http://www.python.org/python-bugs ##
14275## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014276_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014277 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014278 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014279esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
14281echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014282if test "${ac_cv_header_cthreads_h+set}" = set; then
14283 echo $ECHO_N "(cached) $ECHO_C" >&6
14284else
14285 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014287{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14288echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
14290fi
14291if test $ac_cv_header_cthreads_h = yes; then
14292 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014293#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014294_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014295
Martin v. Löwis11437992002-04-12 09:54:03 +000014296 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014297#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014298_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014299
Martin v. Löwis11437992002-04-12 09:54:03 +000014300
14301cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014302#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014303_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014304
14305 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014306 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014307else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014308
Martin v. Löwis11437992002-04-12 09:54:03 +000014309 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014310 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14311echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014312if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14313 echo $ECHO_N "(cached) $ECHO_C" >&6
14314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14316echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014317else
Martin v. Löwis11437992002-04-12 09:54:03 +000014318 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014319{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14320echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014321cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014322/* confdefs.h. */
14323_ACEOF
14324cat confdefs.h >>conftest.$ac_ext
14325cat >>conftest.$ac_ext <<_ACEOF
14326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014327$ac_includes_default
14328#include <mach/cthreads.h>
14329_ACEOF
14330rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014331if { (ac_try="$ac_compile"
14332case "(($ac_try" in
14333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14334 *) ac_try_echo=$ac_try;;
14335esac
14336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014339 grep -v '^ *+' conftest.er1 >conftest.err
14340 rm -f conftest.er1
14341 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014343 (exit $ac_status); } && {
14344 test -z "$ac_c_werror_flag" ||
14345 test ! -s conftest.err
14346 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 ac_header_compiler=yes
14348else
14349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014350sed 's/^/| /' conftest.$ac_ext >&5
14351
Martin v. Löwiseba40652007-08-30 20:10:57 +000014352 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014354
14355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14356{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14357echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014358
14359# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014360{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14361echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014363/* confdefs.h. */
14364_ACEOF
14365cat confdefs.h >>conftest.$ac_ext
14366cat >>conftest.$ac_ext <<_ACEOF
14367/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014368#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014369_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370if { (ac_try="$ac_cpp conftest.$ac_ext"
14371case "(($ac_try" in
14372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14373 *) ac_try_echo=$ac_try;;
14374esac
14375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14376 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014377 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014378 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014379 rm -f conftest.er1
14380 cat conftest.err >&5
14381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014382 (exit $ac_status); } >/dev/null && {
14383 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14384 test ! -s conftest.err
14385 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014386 ac_header_preproc=yes
14387else
14388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014389sed 's/^/| /' conftest.$ac_ext >&5
14390
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393
Martin v. Löwis11437992002-04-12 09:54:03 +000014394rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014395{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14396echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014397
14398# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014399case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14400 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014401 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14402echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014403 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14404echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
14405 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014406 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014407 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014408 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14409echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014410 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14411echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14412 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14413echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14414 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14415echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014416 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14417echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014418 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14419echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014420 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014421## ------------------------------------------------ ##
14422## Report this to http://www.python.org/python-bugs ##
14423## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014424_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014425 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014426 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014427esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14429echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014430if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
14431 echo $ECHO_N "(cached) $ECHO_C" >&6
14432else
14433 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014434fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14436echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014437
14438fi
14439if test $ac_cv_header_mach_cthreads_h = yes; then
14440 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014441#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014442_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014443
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014445#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014446_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014447
Martin v. Löwis11437992002-04-12 09:54:03 +000014448
14449cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014450#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014451_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014452
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014453 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014454else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014455
Martin v. Löwiseba40652007-08-30 20:10:57 +000014456 { echo "$as_me:$LINENO: checking for --with-pth" >&5
14457echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014458
Martin v. Löwiseba40652007-08-30 20:10:57 +000014459# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014460if test "${with_pth+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014461 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
14462echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014463 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014464#define WITH_THREAD 1
14465_ACEOF
14466
14467
14468cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014469#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014470_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014471
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014472 LIBS="-lpth $LIBS"
14473 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014474else
Martin v. Löwiseba40652007-08-30 20:10:57 +000014475 { echo "$as_me:$LINENO: result: no" >&5
14476echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014477
14478 # Just looking for pthread_create in libpthread is not enough:
14479 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14480 # So we really have to include pthread.h, and then link.
14481 _libs=$LIBS
14482 LIBS="$LIBS -lpthread"
Martin v. Löwiseba40652007-08-30 20:10:57 +000014483 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14484echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014485 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014486/* confdefs.h. */
14487_ACEOF
14488cat confdefs.h >>conftest.$ac_ext
14489cat >>conftest.$ac_ext <<_ACEOF
14490/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014491#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014492
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014493void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014494int
14495main ()
14496{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014497
14498pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 ;
14500 return 0;
14501}
14502_ACEOF
14503rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504if { (ac_try="$ac_link"
14505case "(($ac_try" in
14506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14507 *) ac_try_echo=$ac_try;;
14508esac
14509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14510 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014512 grep -v '^ *+' conftest.er1 >conftest.err
14513 rm -f conftest.er1
14514 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014516 (exit $ac_status); } && {
14517 test -z "$ac_c_werror_flag" ||
14518 test ! -s conftest.err
14519 } && test -s conftest$ac_exeext &&
14520 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014521
Martin v. Löwiseba40652007-08-30 20:10:57 +000014522 { echo "$as_me:$LINENO: result: yes" >&5
14523echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014525#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014526_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014527
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014528 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014529 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +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öwis11437992002-04-12 09:54:03 +000014534
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014535 LIBS=$_libs
Martin v. Löwiseba40652007-08-30 20:10:57 +000014536 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
14537echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014538if test "${ac_cv_func_pthread_detach+set}" = set; then
14539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014540else
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014542/* confdefs.h. */
14543_ACEOF
14544cat confdefs.h >>conftest.$ac_ext
14545cat >>conftest.$ac_ext <<_ACEOF
14546/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014547/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14548 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14549#define pthread_detach innocuous_pthread_detach
14550
Guido van Rossumad678af1998-10-02 14:42:15 +000014551/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014552 which can conflict with char pthread_detach (); below.
14553 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014554 <limits.h> exists even on freestanding compilers. */
14555
14556#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014557# include <limits.h>
14558#else
14559# include <assert.h>
14560#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014561
14562#undef pthread_detach
14563
Martin v. Löwiseba40652007-08-30 20:10:57 +000014564/* Override any GCC internal prototype to avoid an error.
14565 Use char because int might match the return type of a GCC
14566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014567#ifdef __cplusplus
14568extern "C"
14569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014570char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014571/* The GNU C library defines this for functions which it implements
14572 to always fail with ENOSYS. Some functions are actually named
14573 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014575choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014576#endif
14577
Skip Montanaro6dead952003-09-25 14:50:04 +000014578int
14579main ()
14580{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014581return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014582 ;
14583 return 0;
14584}
14585_ACEOF
14586rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014587if { (ac_try="$ac_link"
14588case "(($ac_try" in
14589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14590 *) ac_try_echo=$ac_try;;
14591esac
14592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14593 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014595 grep -v '^ *+' conftest.er1 >conftest.err
14596 rm -f conftest.er1
14597 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014599 (exit $ac_status); } && {
14600 test -z "$ac_c_werror_flag" ||
14601 test ! -s conftest.err
14602 } && test -s conftest$ac_exeext &&
14603 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014605else
Martin v. Löwis11437992002-04-12 09:54:03 +000014606 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014607sed 's/^/| /' conftest.$ac_ext >&5
14608
Martin v. Löwiseba40652007-08-30 20:10:57 +000014609 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014611
14612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014613 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014614fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014615{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14616echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014617if test $ac_cv_func_pthread_detach = yes; then
14618 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014619#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014620_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014621
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014622 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014623 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014624else
Guido van Rossumad678af1998-10-02 14:42:15 +000014625
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014626 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014627 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14628echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014629if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14630 echo $ECHO_N "(cached) $ECHO_C" >&6
14631fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014632{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14633echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014634else
14635 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014636{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14637echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014639/* confdefs.h. */
14640_ACEOF
14641cat confdefs.h >>conftest.$ac_ext
14642cat >>conftest.$ac_ext <<_ACEOF
14643/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014644$ac_includes_default
14645#include <atheos/threads.h>
14646_ACEOF
14647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014648if { (ac_try="$ac_compile"
14649case "(($ac_try" in
14650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14651 *) ac_try_echo=$ac_try;;
14652esac
14653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014656 grep -v '^ *+' conftest.er1 >conftest.err
14657 rm -f conftest.er1
14658 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014660 (exit $ac_status); } && {
14661 test -z "$ac_c_werror_flag" ||
14662 test ! -s conftest.err
14663 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014664 ac_header_compiler=yes
14665else
14666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014667sed 's/^/| /' conftest.$ac_ext >&5
14668
Martin v. Löwiseba40652007-08-30 20:10:57 +000014669 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014670fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014671
14672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14673{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14674echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014675
14676# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014677{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14678echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014680/* confdefs.h. */
14681_ACEOF
14682cat confdefs.h >>conftest.$ac_ext
14683cat >>conftest.$ac_ext <<_ACEOF
14684/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014685#include <atheos/threads.h>
14686_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014687if { (ac_try="$ac_cpp conftest.$ac_ext"
14688case "(($ac_try" in
14689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14690 *) ac_try_echo=$ac_try;;
14691esac
14692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14693 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014694 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014695 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014696 rm -f conftest.er1
14697 cat conftest.err >&5
14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014699 (exit $ac_status); } >/dev/null && {
14700 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14701 test ! -s conftest.err
14702 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014703 ac_header_preproc=yes
14704else
14705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014706sed 's/^/| /' conftest.$ac_ext >&5
14707
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014708 ac_header_preproc=no
14709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014710
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014711rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014712{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14713echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014714
14715# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014716case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14717 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014718 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14719echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014720 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14721echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
14722 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014723 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014724 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014725 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14726echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014727 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14728echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14729 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14730echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14731 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14732echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014733 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14734echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014735 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14736echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014737 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014738## ------------------------------------------------ ##
14739## Report this to http://www.python.org/python-bugs ##
14740## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014741_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014742 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014743 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014744esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014745{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14746echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014747if test "${ac_cv_header_atheos_threads_h+set}" = set; then
14748 echo $ECHO_N "(cached) $ECHO_C" >&6
14749else
14750 ac_cv_header_atheos_threads_h=$ac_header_preproc
14751fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014752{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14753echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014754
14755fi
14756if test $ac_cv_header_atheos_threads_h = yes; then
14757 cat >>confdefs.h <<\_ACEOF
14758#define WITH_THREAD 1
14759_ACEOF
14760
14761
14762cat >>confdefs.h <<\_ACEOF
14763#define ATHEOS_THREADS 1
14764_ACEOF
14765
14766 THREADOBJ="Python/thread.o"
14767else
14768
Martin v. Löwis11437992002-04-12 09:54:03 +000014769 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014770 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14771echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014772if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14773 echo $ECHO_N "(cached) $ECHO_C" >&6
14774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014775{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14776echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014777else
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014779{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
14780echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014782/* confdefs.h. */
14783_ACEOF
14784cat confdefs.h >>conftest.$ac_ext
14785cat >>conftest.$ac_ext <<_ACEOF
14786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014787$ac_includes_default
14788#include <kernel/OS.h>
14789_ACEOF
14790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014791if { (ac_try="$ac_compile"
14792case "(($ac_try" in
14793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14794 *) ac_try_echo=$ac_try;;
14795esac
14796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014799 grep -v '^ *+' conftest.er1 >conftest.err
14800 rm -f conftest.er1
14801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014803 (exit $ac_status); } && {
14804 test -z "$ac_c_werror_flag" ||
14805 test ! -s conftest.err
14806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014807 ac_header_compiler=yes
14808else
14809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014810sed 's/^/| /' conftest.$ac_ext >&5
14811
Martin v. Löwiseba40652007-08-30 20:10:57 +000014812 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014813fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014814
14815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14816{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14817echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014818
14819# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000014820{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
14821echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014822cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014823/* confdefs.h. */
14824_ACEOF
14825cat confdefs.h >>conftest.$ac_ext
14826cat >>conftest.$ac_ext <<_ACEOF
14827/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014828#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014829_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014830if { (ac_try="$ac_cpp conftest.$ac_ext"
14831case "(($ac_try" in
14832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14833 *) ac_try_echo=$ac_try;;
14834esac
14835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14836 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014837 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014838 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 rm -f conftest.er1
14840 cat conftest.err >&5
14841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014842 (exit $ac_status); } >/dev/null && {
14843 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14844 test ! -s conftest.err
14845 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014846 ac_header_preproc=yes
14847else
14848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014849sed 's/^/| /' conftest.$ac_ext >&5
14850
Martin v. Löwis11437992002-04-12 09:54:03 +000014851 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014853
Martin v. Löwis11437992002-04-12 09:54:03 +000014854rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014855{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14856echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014857
Martin v. Löwis11437992002-04-12 09:54:03 +000014858# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014859case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14860 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
14862echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014863 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
14864echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
14865 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014866 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014867 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014868 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
14869echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014870 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
14871echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
14872 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
14873echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
14874 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
14875echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014876 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
14877echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
14879echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014880 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014881## ------------------------------------------------ ##
14882## Report this to http://www.python.org/python-bugs ##
14883## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014884_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014885 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014886 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014887esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000014888{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
14889echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014890if test "${ac_cv_header_kernel_OS_h+set}" = set; then
14891 echo $ECHO_N "(cached) $ECHO_C" >&6
14892else
14893 ac_cv_header_kernel_OS_h=$ac_header_preproc
14894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014895{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
14896echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014897
14898fi
14899if test $ac_cv_header_kernel_OS_h = yes; then
14900 cat >>confdefs.h <<\_ACEOF
14901#define WITH_THREAD 1
14902_ACEOF
14903
14904
14905cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014906#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014907_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014908
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014909 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014910else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014911
Martin v. Löwiseba40652007-08-30 20:10:57 +000014912 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14913echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014914if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
14915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014916else
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014918LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014920/* confdefs.h. */
14921_ACEOF
14922cat confdefs.h >>conftest.$ac_ext
14923cat >>conftest.$ac_ext <<_ACEOF
14924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014925
Martin v. Löwiseba40652007-08-30 20:10:57 +000014926/* Override any GCC internal prototype to avoid an error.
14927 Use char because int might match the return type of a GCC
14928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014929#ifdef __cplusplus
14930extern "C"
14931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014932char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014933int
14934main ()
14935{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014936return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014937 ;
14938 return 0;
14939}
14940_ACEOF
14941rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014942if { (ac_try="$ac_link"
14943case "(($ac_try" in
14944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14945 *) ac_try_echo=$ac_try;;
14946esac
14947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14948 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014950 grep -v '^ *+' conftest.er1 >conftest.err
14951 rm -f conftest.er1
14952 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014954 (exit $ac_status); } && {
14955 test -z "$ac_c_werror_flag" ||
14956 test ! -s conftest.err
14957 } && test -s conftest$ac_exeext &&
14958 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014959 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014960else
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014962sed 's/^/| /' conftest.$ac_ext >&5
14963
Martin v. Löwiseba40652007-08-30 20:10:57 +000014964 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014965fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014966
14967rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014969LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014971{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14972echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014973if test $ac_cv_lib_pthreads_pthread_create = yes; then
14974 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014975#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014976_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014977
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014978 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014979 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014980 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014981else
Greg Steinadf63d62000-07-05 10:38:09 +000014982
Martin v. Löwiseba40652007-08-30 20:10:57 +000014983 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14984echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014985if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
14986 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014987else
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014989LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014991/* confdefs.h. */
14992_ACEOF
14993cat confdefs.h >>conftest.$ac_ext
14994cat >>conftest.$ac_ext <<_ACEOF
14995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014996
Martin v. Löwiseba40652007-08-30 20:10:57 +000014997/* Override any GCC internal prototype to avoid an error.
14998 Use char because int might match the return type of a GCC
14999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015000#ifdef __cplusplus
15001extern "C"
15002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015003char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015004int
15005main ()
15006{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ;
15009 return 0;
15010}
15011_ACEOF
15012rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015013if { (ac_try="$ac_link"
15014case "(($ac_try" in
15015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15016 *) ac_try_echo=$ac_try;;
15017esac
15018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15019 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015021 grep -v '^ *+' conftest.er1 >conftest.err
15022 rm -f conftest.er1
15023 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015025 (exit $ac_status); } && {
15026 test -z "$ac_c_werror_flag" ||
15027 test ! -s conftest.err
15028 } && test -s conftest$ac_exeext &&
15029 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015030 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015031else
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015033sed 's/^/| /' conftest.$ac_ext >&5
15034
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037
15038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015040LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15043echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015044if test $ac_cv_lib_c_r_pthread_create = yes; then
15045 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015046#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015047_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015048
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015049 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015050 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015051 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015052else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015053
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15055echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015056if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
15057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015058else
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015060LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015062/* confdefs.h. */
15063_ACEOF
15064cat confdefs.h >>conftest.$ac_ext
15065cat >>conftest.$ac_ext <<_ACEOF
15066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015067
Martin v. Löwiseba40652007-08-30 20:10:57 +000015068/* Override any GCC internal prototype to avoid an error.
15069 Use char because int might match the return type of a GCC
15070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015071#ifdef __cplusplus
15072extern "C"
15073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015074char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015075int
15076main ()
15077{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015078return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015079 ;
15080 return 0;
15081}
15082_ACEOF
15083rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015084if { (ac_try="$ac_link"
15085case "(($ac_try" in
15086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15087 *) ac_try_echo=$ac_try;;
15088esac
15089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015092 grep -v '^ *+' conftest.er1 >conftest.err
15093 rm -f conftest.er1
15094 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096 (exit $ac_status); } && {
15097 test -z "$ac_c_werror_flag" ||
15098 test ! -s conftest.err
15099 } && test -s conftest$ac_exeext &&
15100 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015102else
Martin v. Löwis11437992002-04-12 09:54:03 +000015103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015104sed 's/^/| /' conftest.$ac_ext >&5
15105
Martin v. Löwiseba40652007-08-30 20:10:57 +000015106 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108
15109rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015110 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015111LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015113{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15114echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015115if test $ac_cv_lib_pthread___pthread_create_system = yes; then
15116 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015117#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015118_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015119
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015120 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015121 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015122 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015123else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15126echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015127if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
15128 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015129else
Martin v. Löwis11437992002-04-12 09:54:03 +000015130 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015131LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015133/* confdefs.h. */
15134_ACEOF
15135cat confdefs.h >>conftest.$ac_ext
15136cat >>conftest.$ac_ext <<_ACEOF
15137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015138
Martin v. Löwiseba40652007-08-30 20:10:57 +000015139/* Override any GCC internal prototype to avoid an error.
15140 Use char because int might match the return type of a GCC
15141 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015142#ifdef __cplusplus
15143extern "C"
15144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015145char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015146int
15147main ()
15148{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015149return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015150 ;
15151 return 0;
15152}
15153_ACEOF
15154rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015155if { (ac_try="$ac_link"
15156case "(($ac_try" in
15157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15158 *) ac_try_echo=$ac_try;;
15159esac
15160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15161 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015163 grep -v '^ *+' conftest.er1 >conftest.err
15164 rm -f conftest.er1
15165 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015167 (exit $ac_status); } && {
15168 test -z "$ac_c_werror_flag" ||
15169 test ! -s conftest.err
15170 } && test -s conftest$ac_exeext &&
15171 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015173else
Martin v. Löwis11437992002-04-12 09:54:03 +000015174 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015175sed 's/^/| /' conftest.$ac_ext >&5
15176
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015179
15180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015182LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015184{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15185echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015186if test $ac_cv_lib_cma_pthread_create = yes; then
15187 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015188#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015189_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015190
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015191 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015192 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015193 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015194else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015195
Martin v. Löwis130fb172001-07-19 11:00:41 +000015196 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015197fi
15198
Guido van Rossum627b2d71993-12-24 10:39:16 +000015199
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015200fi
15201
Guido van Rossum0be3e491997-05-22 20:33:33 +000015202fi
15203
Guido van Rossum49545951997-12-02 19:28:29 +000015204fi
15205
Guido van Rossumb93a8621998-05-07 13:27:32 +000015206fi
15207
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015208
Michael W. Hudson54241132001-12-07 15:38:26 +000015209fi
15210
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015211
15212fi
15213
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015214fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215
15216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015218fi
15219
Martin v. Löwis11437992002-04-12 09:54:03 +000015220fi
15221
15222
15223fi
15224
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015225
Michael W. Hudson54241132001-12-07 15:38:26 +000015226
Martin v. Löwiseba40652007-08-30 20:10:57 +000015227 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15228echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015229if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
15230 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231else
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015233LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015235/* confdefs.h. */
15236_ACEOF
15237cat confdefs.h >>conftest.$ac_ext
15238cat >>conftest.$ac_ext <<_ACEOF
15239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015240
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241/* Override any GCC internal prototype to avoid an error.
15242 Use char because int might match the return type of a GCC
15243 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015244#ifdef __cplusplus
15245extern "C"
15246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015247char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015248int
15249main ()
15250{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015251return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015252 ;
15253 return 0;
15254}
15255_ACEOF
15256rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015257if { (ac_try="$ac_link"
15258case "(($ac_try" in
15259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15260 *) ac_try_echo=$ac_try;;
15261esac
15262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15263 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015265 grep -v '^ *+' conftest.er1 >conftest.err
15266 rm -f conftest.er1
15267 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269 (exit $ac_status); } && {
15270 test -z "$ac_c_werror_flag" ||
15271 test ! -s conftest.err
15272 } && test -s conftest$ac_exeext &&
15273 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015275else
Martin v. Löwis11437992002-04-12 09:54:03 +000015276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015277sed 's/^/| /' conftest.$ac_ext >&5
15278
Martin v. Löwiseba40652007-08-30 20:10:57 +000015279 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015281
15282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015283 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015284LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015286{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15287echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015288if test $ac_cv_lib_mpc_usconfig = yes; then
15289 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015290#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015291_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015292
Martin v. Löwis130fb172001-07-19 11:00:41 +000015293 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015294 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015295 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015296fi
15297
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015298
Neal Norwitza978ab02002-11-02 16:58:05 +000015299 if test "$posix_threads" != "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015300 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15301echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015302if test "${ac_cv_lib_thread_thr_create+set}" = set; then
15303 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015304else
Martin v. Löwis11437992002-04-12 09:54:03 +000015305 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015306LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015308/* confdefs.h. */
15309_ACEOF
15310cat confdefs.h >>conftest.$ac_ext
15311cat >>conftest.$ac_ext <<_ACEOF
15312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
Martin v. Löwiseba40652007-08-30 20:10:57 +000015314/* Override any GCC internal prototype to avoid an error.
15315 Use char because int might match the return type of a GCC
15316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015317#ifdef __cplusplus
15318extern "C"
15319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015320char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015321int
15322main ()
15323{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015324return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015325 ;
15326 return 0;
15327}
15328_ACEOF
15329rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015330if { (ac_try="$ac_link"
15331case "(($ac_try" in
15332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15333 *) ac_try_echo=$ac_try;;
15334esac
15335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15336 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015338 grep -v '^ *+' conftest.er1 >conftest.err
15339 rm -f conftest.er1
15340 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015342 (exit $ac_status); } && {
15343 test -z "$ac_c_werror_flag" ||
15344 test ! -s conftest.err
15345 } && test -s conftest$ac_exeext &&
15346 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015348else
Martin v. Löwis11437992002-04-12 09:54:03 +000015349 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015350sed 's/^/| /' conftest.$ac_ext >&5
15351
Martin v. Löwiseba40652007-08-30 20:10:57 +000015352 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015353fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354
15355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015356 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015357LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015359{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15360echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015361if test $ac_cv_lib_thread_thr_create = yes; then
15362 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015363#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015364_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015365
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015366 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015367 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015368 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015369fi
15370
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015371 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015372
Martin v. Löwis130fb172001-07-19 11:00:41 +000015373 if test "$USE_THREAD_MODULE" != "#"
15374 then
15375 # If the above checks didn't disable threads, (at least) OSF1
15376 # needs this '-threads' argument during linking.
15377 case $ac_sys_system in
15378 OSF1) LDLAST=-threads;;
15379 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015380 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015381fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015382
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015383if test "$posix_threads" = "yes"; then
15384 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015385
15386cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015387#define _POSIX_THREADS 1
15388_ACEOF
15389
15390 fi
15391
15392 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15393 case $ac_sys_system/$ac_sys_release in
15394 SunOS/5.6)
15395cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015396#define HAVE_PTHREAD_DESTRUCTOR 1
15397_ACEOF
15398
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015399 ;;
15400 SunOS/5.8)
15401cat >>confdefs.h <<\_ACEOF
15402#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15403_ACEOF
15404
15405 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015406 AIX/5)
15407cat >>confdefs.h <<\_ACEOF
15408#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15409_ACEOF
15410
15411 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015412 esac
15413
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15415echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015416 if test "${ac_cv_pthread_system_supported+set}" = set; then
15417 echo $ECHO_N "(cached) $ECHO_C" >&6
15418else
15419 if test "$cross_compiling" = yes; then
15420 ac_cv_pthread_system_supported=no
15421else
15422 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015423/* confdefs.h. */
15424_ACEOF
15425cat confdefs.h >>conftest.$ac_ext
15426cat >>conftest.$ac_ext <<_ACEOF
15427/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015428#include <pthread.h>
15429 void *foo(void *parm) {
15430 return NULL;
15431 }
15432 main() {
15433 pthread_attr_t attr;
15434 pthread_t id;
15435 if (pthread_attr_init(&attr)) exit(-1);
15436 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15437 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15438 exit(0);
15439 }
15440_ACEOF
15441rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015442if { (ac_try="$ac_link"
15443case "(($ac_try" in
15444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15445 *) ac_try_echo=$ac_try;;
15446esac
15447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15448 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015449 ac_status=$?
15450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15451 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015452 { (case "(($ac_try" in
15453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15454 *) ac_try_echo=$ac_try;;
15455esac
15456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15457 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015458 ac_status=$?
15459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15460 (exit $ac_status); }; }; then
15461 ac_cv_pthread_system_supported=yes
15462else
15463 echo "$as_me: program exited with status $ac_status" >&5
15464echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015465sed 's/^/| /' conftest.$ac_ext >&5
15466
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015467( exit $ac_status )
15468ac_cv_pthread_system_supported=no
15469fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015470rm -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 +000015471fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015472
Martin v. Löwiseba40652007-08-30 20:10:57 +000015473
15474
Guido van Rossum627b2d71993-12-24 10:39:16 +000015475fi
15476
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15478echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015479 if test "$ac_cv_pthread_system_supported" = "yes"; then
15480
15481cat >>confdefs.h <<\_ACEOF
15482#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15483_ACEOF
15484
15485 fi
15486
15487for ac_func in pthread_sigmask
15488do
15489as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015490{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15491echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15492if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015493 echo $ECHO_N "(cached) $ECHO_C" >&6
15494else
15495 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015496/* confdefs.h. */
15497_ACEOF
15498cat confdefs.h >>conftest.$ac_ext
15499cat >>conftest.$ac_ext <<_ACEOF
15500/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015501/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15502 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15503#define $ac_func innocuous_$ac_func
15504
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015505/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015506 which can conflict with char $ac_func (); below.
15507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015508 <limits.h> exists even on freestanding compilers. */
15509
15510#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015511# include <limits.h>
15512#else
15513# include <assert.h>
15514#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015515
15516#undef $ac_func
15517
Martin v. Löwiseba40652007-08-30 20:10:57 +000015518/* Override any GCC internal prototype to avoid an error.
15519 Use char because int might match the return type of a GCC
15520 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015521#ifdef __cplusplus
15522extern "C"
15523#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015524char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015525/* The GNU C library defines this for functions which it implements
15526 to always fail with ENOSYS. Some functions are actually named
15527 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015528#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015529choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015530#endif
15531
Skip Montanaro6dead952003-09-25 14:50:04 +000015532int
15533main ()
15534{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015535return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015536 ;
15537 return 0;
15538}
15539_ACEOF
15540rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015541if { (ac_try="$ac_link"
15542case "(($ac_try" in
15543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15544 *) ac_try_echo=$ac_try;;
15545esac
15546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15547 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015548 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015549 grep -v '^ *+' conftest.er1 >conftest.err
15550 rm -f conftest.er1
15551 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553 (exit $ac_status); } && {
15554 test -z "$ac_c_werror_flag" ||
15555 test ! -s conftest.err
15556 } && test -s conftest$ac_exeext &&
15557 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015558 eval "$as_ac_var=yes"
15559else
15560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015561sed 's/^/| /' conftest.$ac_ext >&5
15562
Martin v. Löwiseba40652007-08-30 20:10:57 +000015563 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565
15566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015567 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015569ac_res=`eval echo '${'$as_ac_var'}'`
15570 { echo "$as_me:$LINENO: result: $ac_res" >&5
15571echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015572if test `eval echo '${'$as_ac_var'}'` = yes; then
15573 cat >>confdefs.h <<_ACEOF
15574#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15575_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015576 case $ac_sys_system in
15577 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015578
Jason Tishlerfac083d2003-07-22 15:20:49 +000015579cat >>confdefs.h <<\_ACEOF
15580#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15581_ACEOF
15582
15583 ;;
15584 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015585fi
15586done
15587
15588fi
15589
15590
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015591# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015592
15593
Martin v. Löwiseba40652007-08-30 20:10:57 +000015594{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15595echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
15596# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015597if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015599 no)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600 { echo "$as_me:$LINENO: result: no" >&5
15601echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015602 ipv6=no
15603 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604 *) { echo "$as_me:$LINENO: result: yes" >&5
15605echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015606 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015607#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015608_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015609
15610 ipv6=yes
15611 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015613else
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015615 if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616 { echo "$as_me:$LINENO: result: no" >&5
15617echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015618 ipv6=no
15619
15620else
Martin v. Löwis11437992002-04-12 09:54:03 +000015621 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015622/* confdefs.h. */
15623_ACEOF
15624cat confdefs.h >>conftest.$ac_ext
15625cat >>conftest.$ac_ext <<_ACEOF
15626/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015627 /* AF_INET6 available check */
15628#include <sys/types.h>
15629#include <sys/socket.h>
15630main()
15631{
15632 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15633 exit(1);
15634 else
15635 exit(0);
15636}
15637
Martin v. Löwis11437992002-04-12 09:54:03 +000015638_ACEOF
15639rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015640if { (ac_try="$ac_link"
15641case "(($ac_try" in
15642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15643 *) ac_try_echo=$ac_try;;
15644esac
15645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15646 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015647 ac_status=$?
15648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15649 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015650 { (case "(($ac_try" in
15651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15652 *) ac_try_echo=$ac_try;;
15653esac
15654eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15655 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015656 ac_status=$?
15657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15658 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015659 { echo "$as_me:$LINENO: result: yes" >&5
15660echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015661 ipv6=yes
15662else
Martin v. Löwis11437992002-04-12 09:54:03 +000015663 echo "$as_me: program exited with status $ac_status" >&5
15664echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015665sed 's/^/| /' conftest.$ac_ext >&5
15666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668{ echo "$as_me:$LINENO: result: no" >&5
15669echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015670 ipv6=no
15671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672rm -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 +000015673fi
15674
Martin v. Löwiseba40652007-08-30 20:10:57 +000015675
15676
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015677if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015678 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15679echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015681/* confdefs.h. */
15682_ACEOF
15683cat confdefs.h >>conftest.$ac_ext
15684cat >>conftest.$ac_ext <<_ACEOF
15685/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015686#include <sys/types.h>
15687#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015688int
15689main ()
15690{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015691struct sockaddr_in6 x;
15692x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 ;
15694 return 0;
15695}
15696_ACEOF
15697rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015698if { (ac_try="$ac_compile"
15699case "(($ac_try" in
15700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15701 *) ac_try_echo=$ac_try;;
15702esac
15703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015706 grep -v '^ *+' conftest.er1 >conftest.err
15707 rm -f conftest.er1
15708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015710 (exit $ac_status); } && {
15711 test -z "$ac_c_werror_flag" ||
15712 test ! -s conftest.err
15713 } && test -s conftest.$ac_objext; then
15714 { echo "$as_me:$LINENO: result: yes" >&5
15715echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015716 ipv6=yes
15717else
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015719sed 's/^/| /' conftest.$ac_ext >&5
15720
Martin v. Löwiseba40652007-08-30 20:10:57 +000015721 { echo "$as_me:$LINENO: result: no" >&5
15722echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015723 ipv6=no
15724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015725
15726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015727fi
15728
15729if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015731#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015732_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015733
15734fi
15735
Martin v. Löwiseba40652007-08-30 20:10:57 +000015736fi
15737
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015738
15739ipv6type=unknown
15740ipv6lib=none
15741ipv6trylibc=no
15742
15743if test "$ipv6" = "yes"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015744 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15745echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015746 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15747 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015748 case $i in
15749 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015751/* confdefs.h. */
15752_ACEOF
15753cat confdefs.h >>conftest.$ac_ext
15754cat >>conftest.$ac_ext <<_ACEOF
15755/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015756
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015757#include <netinet/in.h>
15758#ifdef IPV6_INRIA_VERSION
15759yes
15760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015761_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015763 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015764 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015765fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000015766rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015767
15768 ;;
15769 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015771/* confdefs.h. */
15772_ACEOF
15773cat confdefs.h >>conftest.$ac_ext
15774cat >>conftest.$ac_ext <<_ACEOF
15775/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015776
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015777#include <netinet/in.h>
15778#ifdef __KAME__
15779yes
15780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015783 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015784 ipv6type=$i;
15785 ipv6lib=inet6
15786 ipv6libdir=/usr/local/v6/lib
15787 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015788fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000015789rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015790
15791 ;;
15792 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015794/* confdefs.h. */
15795_ACEOF
15796cat confdefs.h >>conftest.$ac_ext
15797cat >>conftest.$ac_ext <<_ACEOF
15798/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015800#include <features.h>
15801#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15802yes
15803#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015804_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015806 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015807 ipv6type=$i;
15808 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015809fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000015810rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015811
15812 ;;
15813 linux-inet6)
15814 if test -d /usr/inet6; then
15815 ipv6type=$i
15816 ipv6lib=inet6
15817 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015818 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015819 fi
15820 ;;
15821 solaris)
15822 if test -f /etc/netconfig; then
15823 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15824 ipv6type=$i
15825 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015826 fi
15827 fi
15828 ;;
15829 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015831/* confdefs.h. */
15832_ACEOF
15833cat confdefs.h >>conftest.$ac_ext
15834cat >>conftest.$ac_ext <<_ACEOF
15835/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015837#include <sys/param.h>
15838#ifdef _TOSHIBA_INET6
15839yes
15840#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015842if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015843 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015844 ipv6type=$i;
15845 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015846 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015847fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000015848rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015849
15850 ;;
15851 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015852 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015853/* confdefs.h. */
15854_ACEOF
15855cat confdefs.h >>conftest.$ac_ext
15856cat >>conftest.$ac_ext <<_ACEOF
15857/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015858
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015859#include </usr/local/v6/include/sys/v6config.h>
15860#ifdef __V6D__
15861yes
15862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015863_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015864if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015865 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015866 ipv6type=$i;
15867 ipv6lib=v6;
15868 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015869 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015870fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000015871rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015872
15873 ;;
15874 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 cat >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öwisa5f73f92001-10-15 08:06:29 +000015881
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015882#include <sys/param.h>
15883#ifdef _ZETA_MINAMI_INET6
15884yes
15885#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015886_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015888 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015889 ipv6type=$i;
15890 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015891 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015892fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000015893rm -f -r conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015894
15895 ;;
15896 esac
15897 if test "$ipv6type" != "unknown"; then
15898 break
15899 fi
15900 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901 { echo "$as_me:$LINENO: result: $ipv6type" >&5
15902echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015903fi
15904
15905if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15906 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15907 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15908 echo "using lib$ipv6lib"
15909 else
15910 if test $ipv6trylibc = "yes"; then
15911 echo "using libc"
15912 else
15913 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15914 echo "You need to fetch lib$ipv6lib.a from appropriate"
15915 echo 'ipv6 kit and compile beforehand.'
15916 exit 1
15917 fi
15918 fi
15919fi
15920
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015921{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15922echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
15923cat >conftest.$ac_ext <<_ACEOF
15924/* confdefs.h. */
15925_ACEOF
15926cat confdefs.h >>conftest.$ac_ext
15927cat >>conftest.$ac_ext <<_ACEOF
15928/* end confdefs.h. */
15929#include <Carbon/Carbon.h>
15930int
15931main ()
15932{
15933FSIORefNum fRef = 0
15934 ;
15935 return 0;
15936}
15937_ACEOF
15938rm -f conftest.$ac_objext
15939if { (ac_try="$ac_compile"
15940case "(($ac_try" in
15941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15942 *) ac_try_echo=$ac_try;;
15943esac
15944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15945 (eval "$ac_compile") 2>conftest.er1
15946 ac_status=$?
15947 grep -v '^ *+' conftest.er1 >conftest.err
15948 rm -f conftest.er1
15949 cat conftest.err >&5
15950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15951 (exit $ac_status); } && {
15952 test -z "$ac_c_werror_flag" ||
15953 test ! -s conftest.err
15954 } && test -s conftest.$ac_objext; then
15955
15956cat >>confdefs.h <<\_ACEOF
15957#define HAVE_OSX105_SDK 1
15958_ACEOF
15959
15960 { echo "$as_me:$LINENO: result: yes" >&5
15961echo "${ECHO_T}yes" >&6; }
15962else
15963 echo "$as_me: failed program was:" >&5
15964sed 's/^/| /' conftest.$ac_ext >&5
15965
15966 { echo "$as_me:$LINENO: result: no" >&5
15967echo "${ECHO_T}no" >&6; }
15968
15969fi
15970
15971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15972
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015973# Check for --with-doc-strings
Martin v. Löwiseba40652007-08-30 20:10:57 +000015974{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15975echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015976
Martin v. Löwiseba40652007-08-30 20:10:57 +000015977# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015978if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015979 withval=$with_doc_strings;
15980fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015981
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015982
15983if test -z "$with_doc_strings"
15984then with_doc_strings="yes"
15985fi
15986if test "$with_doc_strings" != "no"
15987then
15988
15989cat >>confdefs.h <<\_ACEOF
15990#define WITH_DOC_STRINGS 1
15991_ACEOF
15992
15993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015994{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15995echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015996
Neil Schemenauera35c6882001-02-27 04:45:05 +000015997# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000015998{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
15999echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016000
Martin v. Löwiseba40652007-08-30 20:10:57 +000016001# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016002if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016004if test "$withval" != no
16005then
16006
16007cat >>confdefs.h <<\_ACEOF
16008#define WITH_TSC 1
16009_ACEOF
16010
Martin v. Löwiseba40652007-08-30 20:10:57 +000016011 { echo "$as_me:$LINENO: result: yes" >&5
16012echo "${ECHO_T}yes" >&6; }
16013else { echo "$as_me:$LINENO: result: no" >&5
16014echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016015fi
16016else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017 { echo "$as_me:$LINENO: result: no" >&5
16018echo "${ECHO_T}no" >&6; }
16019fi
16020
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016021
16022# Check for Python-specific malloc support
Martin v. Löwiseba40652007-08-30 20:10:57 +000016023{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16024echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016025
Martin v. Löwiseba40652007-08-30 20:10:57 +000016026# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016027if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016028 withval=$with_pymalloc;
16029fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016030
Neil Schemenauera35c6882001-02-27 04:45:05 +000016031
Neil Schemenauer16c22972002-03-22 15:34:49 +000016032if test -z "$with_pymalloc"
16033then with_pymalloc="yes"
16034fi
16035if test "$with_pymalloc" != "no"
16036then
Martin v. Löwis11437992002-04-12 09:54:03 +000016037
16038cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016039#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016040_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016041
16042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016043{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16044echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016045
Barry Warsawef82cd72000-06-30 16:21:01 +000016046# Check for --with-wctype-functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000016047{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16048echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016049
Martin v. Löwiseba40652007-08-30 20:10:57 +000016050# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016051if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016052 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016053if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016054then
16055
16056cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016057#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016058_ACEOF
16059
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060 { echo "$as_me:$LINENO: result: yes" >&5
16061echo "${ECHO_T}yes" >&6; }
16062else { echo "$as_me:$LINENO: result: no" >&5
16063echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016064fi
16065else
Martin v. Löwiseba40652007-08-30 20:10:57 +000016066 { echo "$as_me:$LINENO: result: no" >&5
16067echo "${ECHO_T}no" >&6; }
16068fi
16069
Barry Warsawef82cd72000-06-30 16:21:01 +000016070
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016071# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016072
Guido van Rossum98935bf2001-09-05 19:13:16 +000016073DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016074
Guido van Rossume97ee181999-12-20 21:27:22 +000016075# the dlopen() function means we might want to use dynload_shlib.o. some
16076# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016077
Thomas Wouters3a584202000-08-05 23:28:51 +000016078for ac_func in dlopen
16079do
Martin v. Löwis11437992002-04-12 09:54:03 +000016080as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016081{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16082echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16083if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016084 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016085else
Martin v. Löwis11437992002-04-12 09:54:03 +000016086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016087/* confdefs.h. */
16088_ACEOF
16089cat confdefs.h >>conftest.$ac_ext
16090cat >>conftest.$ac_ext <<_ACEOF
16091/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016092/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16093 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16094#define $ac_func innocuous_$ac_func
16095
Guido van Rossume97ee181999-12-20 21:27:22 +000016096/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016097 which can conflict with char $ac_func (); below.
16098 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016099 <limits.h> exists even on freestanding compilers. */
16100
16101#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016102# include <limits.h>
16103#else
16104# include <assert.h>
16105#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016106
16107#undef $ac_func
16108
Martin v. Löwiseba40652007-08-30 20:10:57 +000016109/* Override any GCC internal prototype to avoid an error.
16110 Use char because int might match the return type of a GCC
16111 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016112#ifdef __cplusplus
16113extern "C"
16114#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016115char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016116/* The GNU C library defines this for functions which it implements
16117 to always fail with ENOSYS. Some functions are actually named
16118 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016119#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016120choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016121#endif
16122
Skip Montanaro6dead952003-09-25 14:50:04 +000016123int
16124main ()
16125{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 ;
16128 return 0;
16129}
16130_ACEOF
16131rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132if { (ac_try="$ac_link"
16133case "(($ac_try" in
16134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16135 *) ac_try_echo=$ac_try;;
16136esac
16137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16138 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016140 grep -v '^ *+' conftest.er1 >conftest.err
16141 rm -f conftest.er1
16142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144 (exit $ac_status); } && {
16145 test -z "$ac_c_werror_flag" ||
16146 test ! -s conftest.err
16147 } && test -s conftest$ac_exeext &&
16148 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016149 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016150else
Martin v. Löwis11437992002-04-12 09:54:03 +000016151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016152sed 's/^/| /' conftest.$ac_ext >&5
16153
Martin v. Löwiseba40652007-08-30 20:10:57 +000016154 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016155fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016156
16157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016158 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160ac_res=`eval echo '${'$as_ac_var'}'`
16161 { echo "$as_me:$LINENO: result: $ac_res" >&5
16162echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016163if test `eval echo '${'$as_ac_var'}'` = yes; then
16164 cat >>confdefs.h <<_ACEOF
16165#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16166_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016167
Guido van Rossume97ee181999-12-20 21:27:22 +000016168fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016169done
Guido van Rossume97ee181999-12-20 21:27:22 +000016170
Michael W. Hudson54241132001-12-07 15:38:26 +000016171
Guido van Rossume97ee181999-12-20 21:27:22 +000016172# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16173# loading of modules.
16174
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16176echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016177if test -z "$DYNLOADFILE"
16178then
16179 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016180 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16181 if test "$ac_cv_func_dlopen" = yes
16182 then DYNLOADFILE="dynload_shlib.o"
16183 else DYNLOADFILE="dynload_aix.o"
16184 fi
16185 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016186 BeOS*) DYNLOADFILE="dynload_beos.o";;
16187 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016188 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16189 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016190 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016191 *)
16192 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16193 # out any dynamic loading
16194 if test "$ac_cv_func_dlopen" = yes
16195 then DYNLOADFILE="dynload_shlib.o"
16196 else DYNLOADFILE="dynload_stub.o"
16197 fi
16198 ;;
16199 esac
16200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016201{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16202echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016203if test "$DYNLOADFILE" != "dynload_stub.o"
16204then
Martin v. Löwis11437992002-04-12 09:54:03 +000016205
16206cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016207#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016208_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016209
16210fi
16211
Neil Schemenauer4e425612001-06-19 15:44:15 +000016212# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16213
Michael W. Hudson54241132001-12-07 15:38:26 +000016214
Martin v. Löwiseba40652007-08-30 20:10:57 +000016215{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16216echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016217if test -z "$MACHDEP_OBJS"
16218then
Jack Jansene578a632001-08-15 01:27:14 +000016219 MACHDEP_OBJS=$extra_machdep_objs
16220else
16221 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16224echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016225
Guido van Rossum627b2d71993-12-24 10:39:16 +000016226# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
Martin v. Löwisd6320502004-08-12 13:45:08 +000016298
Martin v. Löwisc3001752005-01-23 09:27:24 +000016299
16300
Neal Norwitz05a45592006-03-20 06:30:08 +000016301
16302
Martin v. Löwis382abef2007-02-19 10:55:19 +000016303
16304
Christian Heimes36281872007-11-30 21:11:28 +000016305
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016306
16307
16308for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16309 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016310 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016311 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016312 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016313 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016314 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016315 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016316 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016317 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016318 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016319 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016320do
Martin v. Löwis11437992002-04-12 09:54:03 +000016321as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016322{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16323echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16324if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016326else
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016328/* confdefs.h. */
16329_ACEOF
16330cat confdefs.h >>conftest.$ac_ext
16331cat >>conftest.$ac_ext <<_ACEOF
16332/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016333/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16334 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16335#define $ac_func innocuous_$ac_func
16336
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016337/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016338 which can conflict with char $ac_func (); below.
16339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016340 <limits.h> exists even on freestanding compilers. */
16341
16342#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016343# include <limits.h>
16344#else
16345# include <assert.h>
16346#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016347
16348#undef $ac_func
16349
Martin v. Löwiseba40652007-08-30 20:10:57 +000016350/* Override any GCC internal prototype to avoid an error.
16351 Use char because int might match the return type of a GCC
16352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016353#ifdef __cplusplus
16354extern "C"
16355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016356char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016357/* The GNU C library defines this for functions which it implements
16358 to always fail with ENOSYS. Some functions are actually named
16359 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016360#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016361choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016362#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016363
Skip Montanaro6dead952003-09-25 14:50:04 +000016364int
16365main ()
16366{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016367return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016368 ;
16369 return 0;
16370}
16371_ACEOF
16372rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016373if { (ac_try="$ac_link"
16374case "(($ac_try" in
16375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16376 *) ac_try_echo=$ac_try;;
16377esac
16378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16379 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016381 grep -v '^ *+' conftest.er1 >conftest.err
16382 rm -f conftest.er1
16383 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016385 (exit $ac_status); } && {
16386 test -z "$ac_c_werror_flag" ||
16387 test ! -s conftest.err
16388 } && test -s conftest$ac_exeext &&
16389 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016390 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016391else
Martin v. Löwis11437992002-04-12 09:54:03 +000016392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016393sed 's/^/| /' conftest.$ac_ext >&5
16394
Martin v. Löwiseba40652007-08-30 20:10:57 +000016395 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016397
16398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016399 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016400fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016401ac_res=`eval echo '${'$as_ac_var'}'`
16402 { echo "$as_me:$LINENO: result: $ac_res" >&5
16403echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016404if test `eval echo '${'$as_ac_var'}'` = yes; then
16405 cat >>confdefs.h <<_ACEOF
16406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16407_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016408
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016409fi
16410done
16411
Michael W. Hudson54241132001-12-07 15:38:26 +000016412
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016413# For some functions, having a definition is not sufficient, since
16414# we want to take their address.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016415{ echo "$as_me:$LINENO: checking for chroot" >&5
16416echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016417cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016418/* confdefs.h. */
16419_ACEOF
16420cat confdefs.h >>conftest.$ac_ext
16421cat >>conftest.$ac_ext <<_ACEOF
16422/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016423#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016424int
16425main ()
16426{
16427void *x=chroot
16428 ;
16429 return 0;
16430}
16431_ACEOF
16432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016433if { (ac_try="$ac_compile"
16434case "(($ac_try" in
16435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16436 *) ac_try_echo=$ac_try;;
16437esac
16438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016441 grep -v '^ *+' conftest.er1 >conftest.err
16442 rm -f conftest.er1
16443 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016445 (exit $ac_status); } && {
16446 test -z "$ac_c_werror_flag" ||
16447 test ! -s conftest.err
16448 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016449
16450cat >>confdefs.h <<\_ACEOF
16451#define HAVE_CHROOT 1
16452_ACEOF
16453
Martin v. Löwiseba40652007-08-30 20:10:57 +000016454 { echo "$as_me:$LINENO: result: yes" >&5
16455echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016456else
16457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016458sed 's/^/| /' conftest.$ac_ext >&5
16459
Martin v. Löwiseba40652007-08-30 20:10:57 +000016460 { echo "$as_me:$LINENO: result: no" >&5
16461echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016462
16463fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016464
16465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16466{ echo "$as_me:$LINENO: checking for link" >&5
16467echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016468cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016469/* confdefs.h. */
16470_ACEOF
16471cat confdefs.h >>conftest.$ac_ext
16472cat >>conftest.$ac_ext <<_ACEOF
16473/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016474#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016475int
16476main ()
16477{
16478void *x=link
16479 ;
16480 return 0;
16481}
16482_ACEOF
16483rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016484if { (ac_try="$ac_compile"
16485case "(($ac_try" in
16486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16487 *) ac_try_echo=$ac_try;;
16488esac
16489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016492 grep -v '^ *+' conftest.er1 >conftest.err
16493 rm -f conftest.er1
16494 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016496 (exit $ac_status); } && {
16497 test -z "$ac_c_werror_flag" ||
16498 test ! -s conftest.err
16499 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016500
16501cat >>confdefs.h <<\_ACEOF
16502#define HAVE_LINK 1
16503_ACEOF
16504
Martin v. Löwiseba40652007-08-30 20:10:57 +000016505 { echo "$as_me:$LINENO: result: yes" >&5
16506echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016507else
16508 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016509sed 's/^/| /' conftest.$ac_ext >&5
16510
Martin v. Löwiseba40652007-08-30 20:10:57 +000016511 { echo "$as_me:$LINENO: result: no" >&5
16512echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016513
16514fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016515
16516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16517{ echo "$as_me:$LINENO: checking for symlink" >&5
16518echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016519cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016520/* confdefs.h. */
16521_ACEOF
16522cat confdefs.h >>conftest.$ac_ext
16523cat >>conftest.$ac_ext <<_ACEOF
16524/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016525#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016526int
16527main ()
16528{
16529void *x=symlink
16530 ;
16531 return 0;
16532}
16533_ACEOF
16534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016535if { (ac_try="$ac_compile"
16536case "(($ac_try" in
16537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16538 *) ac_try_echo=$ac_try;;
16539esac
16540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016543 grep -v '^ *+' conftest.er1 >conftest.err
16544 rm -f conftest.er1
16545 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016547 (exit $ac_status); } && {
16548 test -z "$ac_c_werror_flag" ||
16549 test ! -s conftest.err
16550 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016551
16552cat >>confdefs.h <<\_ACEOF
16553#define HAVE_SYMLINK 1
16554_ACEOF
16555
Martin v. Löwiseba40652007-08-30 20:10:57 +000016556 { echo "$as_me:$LINENO: result: yes" >&5
16557echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016558else
16559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016560sed 's/^/| /' conftest.$ac_ext >&5
16561
Martin v. Löwiseba40652007-08-30 20:10:57 +000016562 { echo "$as_me:$LINENO: result: no" >&5
16563echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016564
16565fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016566
16567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16568{ echo "$as_me:$LINENO: checking for fchdir" >&5
16569echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016570cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016571/* confdefs.h. */
16572_ACEOF
16573cat confdefs.h >>conftest.$ac_ext
16574cat >>conftest.$ac_ext <<_ACEOF
16575/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016576#include <unistd.h>
16577int
16578main ()
16579{
16580void *x=fchdir
16581 ;
16582 return 0;
16583}
16584_ACEOF
16585rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016586if { (ac_try="$ac_compile"
16587case "(($ac_try" in
16588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16589 *) ac_try_echo=$ac_try;;
16590esac
16591eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016594 grep -v '^ *+' conftest.er1 >conftest.err
16595 rm -f conftest.er1
16596 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016598 (exit $ac_status); } && {
16599 test -z "$ac_c_werror_flag" ||
16600 test ! -s conftest.err
16601 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016602
16603cat >>confdefs.h <<\_ACEOF
16604#define HAVE_FCHDIR 1
16605_ACEOF
16606
Martin v. Löwiseba40652007-08-30 20:10:57 +000016607 { echo "$as_me:$LINENO: result: yes" >&5
16608echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016609else
16610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016611sed 's/^/| /' conftest.$ac_ext >&5
16612
Martin v. Löwiseba40652007-08-30 20:10:57 +000016613 { echo "$as_me:$LINENO: result: no" >&5
16614echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016615
16616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016617
16618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16619{ echo "$as_me:$LINENO: checking for fsync" >&5
16620echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016621cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016622/* confdefs.h. */
16623_ACEOF
16624cat confdefs.h >>conftest.$ac_ext
16625cat >>conftest.$ac_ext <<_ACEOF
16626/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016627#include <unistd.h>
16628int
16629main ()
16630{
16631void *x=fsync
16632 ;
16633 return 0;
16634}
16635_ACEOF
16636rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016637if { (ac_try="$ac_compile"
16638case "(($ac_try" in
16639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16640 *) ac_try_echo=$ac_try;;
16641esac
16642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16643 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016645 grep -v '^ *+' conftest.er1 >conftest.err
16646 rm -f conftest.er1
16647 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016649 (exit $ac_status); } && {
16650 test -z "$ac_c_werror_flag" ||
16651 test ! -s conftest.err
16652 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016653
16654cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016655#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016656_ACEOF
16657
Martin v. Löwiseba40652007-08-30 20:10:57 +000016658 { echo "$as_me:$LINENO: result: yes" >&5
16659echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016660else
16661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016662sed 's/^/| /' conftest.$ac_ext >&5
16663
Martin v. Löwiseba40652007-08-30 20:10:57 +000016664 { echo "$as_me:$LINENO: result: no" >&5
16665echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016666
16667fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016668
16669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16670{ echo "$as_me:$LINENO: checking for fdatasync" >&5
16671echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016673/* confdefs.h. */
16674_ACEOF
16675cat confdefs.h >>conftest.$ac_ext
16676cat >>conftest.$ac_ext <<_ACEOF
16677/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016678#include <unistd.h>
16679int
16680main ()
16681{
16682void *x=fdatasync
16683 ;
16684 return 0;
16685}
16686_ACEOF
16687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016688if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +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öwisa64988c2003-09-20 15:30:20 +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_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016704
16705cat >>confdefs.h <<\_ACEOF
16706#define HAVE_FDATASYNC 1
16707_ACEOF
16708
Martin v. Löwiseba40652007-08-30 20:10:57 +000016709 { echo "$as_me:$LINENO: result: yes" >&5
16710echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016711else
16712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016713sed 's/^/| /' conftest.$ac_ext >&5
16714
Martin v. Löwiseba40652007-08-30 20:10:57 +000016715 { echo "$as_me:$LINENO: result: no" >&5
16716echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016717
16718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016719
16720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016721{ echo "$as_me:$LINENO: checking for epoll" >&5
16722echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
16723cat >conftest.$ac_ext <<_ACEOF
16724/* confdefs.h. */
16725_ACEOF
16726cat confdefs.h >>conftest.$ac_ext
16727cat >>conftest.$ac_ext <<_ACEOF
16728/* end confdefs.h. */
16729#include <sys/epoll.h>
16730int
16731main ()
16732{
16733void *x=epoll_create
16734 ;
16735 return 0;
16736}
16737_ACEOF
16738rm -f conftest.$ac_objext
16739if { (ac_try="$ac_compile"
16740case "(($ac_try" in
16741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16742 *) ac_try_echo=$ac_try;;
16743esac
16744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16745 (eval "$ac_compile") 2>conftest.er1
16746 ac_status=$?
16747 grep -v '^ *+' conftest.er1 >conftest.err
16748 rm -f conftest.er1
16749 cat conftest.err >&5
16750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16751 (exit $ac_status); } && {
16752 test -z "$ac_c_werror_flag" ||
16753 test ! -s conftest.err
16754 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016755
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000016756cat >>confdefs.h <<\_ACEOF
16757#define HAVE_EPOLL 1
16758_ACEOF
16759
16760 { echo "$as_me:$LINENO: result: yes" >&5
16761echo "${ECHO_T}yes" >&6; }
16762else
16763 echo "$as_me: failed program was:" >&5
16764sed 's/^/| /' conftest.$ac_ext >&5
16765
16766 { echo "$as_me:$LINENO: result: no" >&5
16767echo "${ECHO_T}no" >&6; }
16768
16769fi
16770
16771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16772{ echo "$as_me:$LINENO: checking for kqueue" >&5
16773echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
16774cat >conftest.$ac_ext <<_ACEOF
16775/* confdefs.h. */
16776_ACEOF
16777cat confdefs.h >>conftest.$ac_ext
16778cat >>conftest.$ac_ext <<_ACEOF
16779/* end confdefs.h. */
16780
16781#include <sys/types.h>
16782#include <sys/event.h>
16783
16784int
16785main ()
16786{
16787int x=kqueue()
16788 ;
16789 return 0;
16790}
16791_ACEOF
16792rm -f conftest.$ac_objext
16793if { (ac_try="$ac_compile"
16794case "(($ac_try" in
16795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16796 *) ac_try_echo=$ac_try;;
16797esac
16798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16799 (eval "$ac_compile") 2>conftest.er1
16800 ac_status=$?
16801 grep -v '^ *+' conftest.er1 >conftest.err
16802 rm -f conftest.er1
16803 cat conftest.err >&5
16804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16805 (exit $ac_status); } && {
16806 test -z "$ac_c_werror_flag" ||
16807 test ! -s conftest.err
16808 } && test -s conftest.$ac_objext; then
16809
16810cat >>confdefs.h <<\_ACEOF
16811#define HAVE_KQUEUE 1
16812_ACEOF
16813
16814 { echo "$as_me:$LINENO: result: yes" >&5
16815echo "${ECHO_T}yes" >&6; }
16816else
16817 echo "$as_me: failed program was:" >&5
16818sed 's/^/| /' conftest.$ac_ext >&5
16819
16820 { echo "$as_me:$LINENO: result: no" >&5
16821echo "${ECHO_T}no" >&6; }
16822
16823fi
16824
16825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016826# On some systems (eg. FreeBSD 5), we would find a definition of the
16827# functions ctermid_r, setgroups in the library, but no prototype
16828# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16829# address to avoid compiler warnings and potential miscompilations
16830# because of the missing prototypes.
16831
Martin v. Löwiseba40652007-08-30 20:10:57 +000016832{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
16833echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016835/* confdefs.h. */
16836_ACEOF
16837cat confdefs.h >>conftest.$ac_ext
16838cat >>conftest.$ac_ext <<_ACEOF
16839/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016840
16841#include "confdefs.h"
16842#include <stdio.h>
16843
Martin v. Löwisd5843682002-11-21 20:41:28 +000016844int
16845main ()
16846{
16847void* p = ctermid_r
16848 ;
16849 return 0;
16850}
16851_ACEOF
16852rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016853if { (ac_try="$ac_compile"
16854case "(($ac_try" in
16855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16856 *) ac_try_echo=$ac_try;;
16857esac
16858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016861 grep -v '^ *+' conftest.er1 >conftest.err
16862 rm -f conftest.er1
16863 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000016864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016865 (exit $ac_status); } && {
16866 test -z "$ac_c_werror_flag" ||
16867 test ! -s conftest.err
16868 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016869
16870cat >>confdefs.h <<\_ACEOF
16871#define HAVE_CTERMID_R 1
16872_ACEOF
16873
Martin v. Löwiseba40652007-08-30 20:10:57 +000016874 { echo "$as_me:$LINENO: result: yes" >&5
16875echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016876else
16877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016878sed 's/^/| /' conftest.$ac_ext >&5
16879
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880 { echo "$as_me:$LINENO: result: no" >&5
16881echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016882
16883fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000016884
Martin v. Löwiseba40652007-08-30 20:10:57 +000016885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16886
16887{ echo "$as_me:$LINENO: checking for flock" >&5
16888echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016890/* confdefs.h. */
16891_ACEOF
16892cat confdefs.h >>conftest.$ac_ext
16893cat >>conftest.$ac_ext <<_ACEOF
16894/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016895
16896#include "confdefs.h"
16897#include <sys/file.h>
16898
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016899int
16900main ()
16901{
16902void* p = flock
16903 ;
16904 return 0;
16905}
16906_ACEOF
16907rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016908if { (ac_try="$ac_compile"
16909case "(($ac_try" in
16910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16911 *) ac_try_echo=$ac_try;;
16912esac
16913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016916 grep -v '^ *+' conftest.er1 >conftest.err
16917 rm -f conftest.er1
16918 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920 (exit $ac_status); } && {
16921 test -z "$ac_c_werror_flag" ||
16922 test ! -s conftest.err
16923 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016924
16925cat >>confdefs.h <<\_ACEOF
16926#define HAVE_FLOCK 1
16927_ACEOF
16928
Martin v. Löwiseba40652007-08-30 20:10:57 +000016929 { echo "$as_me:$LINENO: result: yes" >&5
16930echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016931else
16932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016933sed 's/^/| /' conftest.$ac_ext >&5
16934
Martin v. Löwiseba40652007-08-30 20:10:57 +000016935 { echo "$as_me:$LINENO: result: no" >&5
16936echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016937
16938fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016939
Martin v. Löwiseba40652007-08-30 20:10:57 +000016940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16941
16942{ echo "$as_me:$LINENO: checking for getpagesize" >&5
16943echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016945/* confdefs.h. */
16946_ACEOF
16947cat confdefs.h >>conftest.$ac_ext
16948cat >>conftest.$ac_ext <<_ACEOF
16949/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016950
16951#include "confdefs.h"
16952#include <unistd.h>
16953
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016954int
16955main ()
16956{
16957void* p = getpagesize
16958 ;
16959 return 0;
16960}
16961_ACEOF
16962rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016963if { (ac_try="$ac_compile"
16964case "(($ac_try" in
16965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16966 *) ac_try_echo=$ac_try;;
16967esac
16968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16969 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016971 grep -v '^ *+' conftest.er1 >conftest.err
16972 rm -f conftest.er1
16973 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016975 (exit $ac_status); } && {
16976 test -z "$ac_c_werror_flag" ||
16977 test ! -s conftest.err
16978 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016979
16980cat >>confdefs.h <<\_ACEOF
16981#define HAVE_GETPAGESIZE 1
16982_ACEOF
16983
Martin v. Löwiseba40652007-08-30 20:10:57 +000016984 { echo "$as_me:$LINENO: result: yes" >&5
16985echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016986else
16987 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016988sed 's/^/| /' conftest.$ac_ext >&5
16989
Martin v. Löwiseba40652007-08-30 20:10:57 +000016990 { echo "$as_me:$LINENO: result: no" >&5
16991echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016992
16993fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016994
16995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016996
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016997for ac_prog in true
16998do
16999 # Extract the first word of "$ac_prog", so it can be a program name with args.
17000set dummy $ac_prog; ac_word=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +000017001{ echo "$as_me:$LINENO: checking for $ac_word" >&5
17002echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017003if test "${ac_cv_prog_TRUE+set}" = set; then
17004 echo $ECHO_N "(cached) $ECHO_C" >&6
17005else
17006 if test -n "$TRUE"; then
17007 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17008else
17009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17010for as_dir in $PATH
17011do
17012 IFS=$as_save_IFS
17013 test -z "$as_dir" && as_dir=.
17014 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017015 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 +000017016 ac_cv_prog_TRUE="$ac_prog"
17017 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
17018 break 2
17019 fi
17020done
17021done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017022IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017023
17024fi
17025fi
17026TRUE=$ac_cv_prog_TRUE
17027if test -n "$TRUE"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017028 { echo "$as_me:$LINENO: result: $TRUE" >&5
17029echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017030else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017031 { echo "$as_me:$LINENO: result: no" >&5
17032echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017033fi
17034
Martin v. Löwiseba40652007-08-30 20:10:57 +000017035
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017036 test -n "$TRUE" && break
17037done
17038test -n "$TRUE" || TRUE="/bin/true"
17039
17040
Martin v. Löwiseba40652007-08-30 20:10:57 +000017041{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17042echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017043if test "${ac_cv_lib_c_inet_aton+set}" = set; then
17044 echo $ECHO_N "(cached) $ECHO_C" >&6
17045else
17046 ac_check_lib_save_LIBS=$LIBS
17047LIBS="-lc $LIBS"
17048cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017049/* confdefs.h. */
17050_ACEOF
17051cat confdefs.h >>conftest.$ac_ext
17052cat >>conftest.$ac_ext <<_ACEOF
17053/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017054
Martin v. Löwiseba40652007-08-30 20:10:57 +000017055/* Override any GCC internal prototype to avoid an error.
17056 Use char because int might match the return type of a GCC
17057 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017058#ifdef __cplusplus
17059extern "C"
17060#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017061char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017062int
17063main ()
17064{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017065return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017066 ;
17067 return 0;
17068}
17069_ACEOF
17070rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017071if { (ac_try="$ac_link"
17072case "(($ac_try" in
17073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17074 *) ac_try_echo=$ac_try;;
17075esac
17076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17077 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017078 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017079 grep -v '^ *+' conftest.er1 >conftest.err
17080 rm -f conftest.er1
17081 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017083 (exit $ac_status); } && {
17084 test -z "$ac_c_werror_flag" ||
17085 test ! -s conftest.err
17086 } && test -s conftest$ac_exeext &&
17087 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017088 ac_cv_lib_c_inet_aton=yes
17089else
17090 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017091sed 's/^/| /' conftest.$ac_ext >&5
17092
Martin v. Löwiseba40652007-08-30 20:10:57 +000017093 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017095
17096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017098LIBS=$ac_check_lib_save_LIBS
17099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017100{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17101echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017102if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017103 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017104else
17105
Martin v. Löwiseba40652007-08-30 20:10:57 +000017106{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17107echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017108if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
17109 echo $ECHO_N "(cached) $ECHO_C" >&6
17110else
17111 ac_check_lib_save_LIBS=$LIBS
17112LIBS="-lresolv $LIBS"
17113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017114/* confdefs.h. */
17115_ACEOF
17116cat confdefs.h >>conftest.$ac_ext
17117cat >>conftest.$ac_ext <<_ACEOF
17118/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017119
Martin v. Löwiseba40652007-08-30 20:10:57 +000017120/* Override any GCC internal prototype to avoid an error.
17121 Use char because int might match the return type of a GCC
17122 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017123#ifdef __cplusplus
17124extern "C"
17125#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017126char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017127int
17128main ()
17129{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017130return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017131 ;
17132 return 0;
17133}
17134_ACEOF
17135rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017136if { (ac_try="$ac_link"
17137case "(($ac_try" in
17138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17139 *) ac_try_echo=$ac_try;;
17140esac
17141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17142 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017144 grep -v '^ *+' conftest.er1 >conftest.err
17145 rm -f conftest.er1
17146 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017148 (exit $ac_status); } && {
17149 test -z "$ac_c_werror_flag" ||
17150 test ! -s conftest.err
17151 } && test -s conftest$ac_exeext &&
17152 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017153 ac_cv_lib_resolv_inet_aton=yes
17154else
17155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017156sed 's/^/| /' conftest.$ac_ext >&5
17157
Martin v. Löwiseba40652007-08-30 20:10:57 +000017158 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017159fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017160
17161rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017163LIBS=$ac_check_lib_save_LIBS
17164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017165{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17166echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017167if test $ac_cv_lib_resolv_inet_aton = yes; then
17168 cat >>confdefs.h <<_ACEOF
17169#define HAVE_LIBRESOLV 1
17170_ACEOF
17171
17172 LIBS="-lresolv $LIBS"
17173
17174fi
17175
17176
17177fi
17178
17179
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017180# On Tru64, chflags seems to be present, but calling it will
17181# exit Python
17182{ echo "$as_me:$LINENO: checking for chflags" >&5
17183echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
17184if test "$cross_compiling" = yes; then
17185 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17186See \`config.log' for more details." >&5
17187echo "$as_me: error: cannot run test program while cross compiling
17188See \`config.log' for more details." >&2;}
17189 { (exit 1); exit 1; }; }
17190else
17191 cat >conftest.$ac_ext <<_ACEOF
17192/* confdefs.h. */
17193_ACEOF
17194cat confdefs.h >>conftest.$ac_ext
17195cat >>conftest.$ac_ext <<_ACEOF
17196/* end confdefs.h. */
17197
17198#include <sys/stat.h>
17199#include <unistd.h>
17200int main(int argc, char*argv[])
17201{
17202 if(chflags(argv[0], 0) != 0)
17203 return 1;
17204 return 0;
17205}
17206
17207_ACEOF
17208rm -f conftest$ac_exeext
17209if { (ac_try="$ac_link"
17210case "(($ac_try" in
17211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17212 *) ac_try_echo=$ac_try;;
17213esac
17214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17215 (eval "$ac_link") 2>&5
17216 ac_status=$?
17217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17218 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17219 { (case "(($ac_try" in
17220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17221 *) ac_try_echo=$ac_try;;
17222esac
17223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17224 (eval "$ac_try") 2>&5
17225 ac_status=$?
17226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17227 (exit $ac_status); }; }; then
17228
17229cat >>confdefs.h <<\_ACEOF
17230#define HAVE_CHFLAGS 1
17231_ACEOF
17232
17233 { echo "$as_me:$LINENO: result: yes" >&5
17234echo "${ECHO_T}yes" >&6; }
17235else
17236 echo "$as_me: program exited with status $ac_status" >&5
17237echo "$as_me: failed program was:" >&5
17238sed 's/^/| /' conftest.$ac_ext >&5
17239
17240( exit $ac_status )
17241{ echo "$as_me:$LINENO: result: no" >&5
17242echo "${ECHO_T}no" >&6; }
17243
17244fi
17245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17246fi
17247
17248
17249
17250{ echo "$as_me:$LINENO: checking for lchflags" >&5
17251echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
17252if test "$cross_compiling" = yes; then
17253 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
17254See \`config.log' for more details." >&5
17255echo "$as_me: error: cannot run test program while cross compiling
17256See \`config.log' for more details." >&2;}
17257 { (exit 1); exit 1; }; }
17258else
17259 cat >conftest.$ac_ext <<_ACEOF
17260/* confdefs.h. */
17261_ACEOF
17262cat confdefs.h >>conftest.$ac_ext
17263cat >>conftest.$ac_ext <<_ACEOF
17264/* end confdefs.h. */
17265
17266#include <sys/stat.h>
17267#include <unistd.h>
17268int main(int argc, char*argv[])
17269{
17270 if(lchflags(argv[0], 0) != 0)
17271 return 1;
17272 return 0;
17273}
17274
17275_ACEOF
17276rm -f conftest$ac_exeext
17277if { (ac_try="$ac_link"
17278case "(($ac_try" in
17279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17280 *) ac_try_echo=$ac_try;;
17281esac
17282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17283 (eval "$ac_link") 2>&5
17284 ac_status=$?
17285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17286 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17287 { (case "(($ac_try" in
17288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17289 *) ac_try_echo=$ac_try;;
17290esac
17291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17292 (eval "$ac_try") 2>&5
17293 ac_status=$?
17294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17295 (exit $ac_status); }; }; then
17296
17297cat >>confdefs.h <<\_ACEOF
17298#define HAVE_LCHFLAGS 1
17299_ACEOF
17300
17301 { echo "$as_me:$LINENO: result: yes" >&5
17302echo "${ECHO_T}yes" >&6; }
17303else
17304 echo "$as_me: program exited with status $ac_status" >&5
17305echo "$as_me: failed program was:" >&5
17306sed 's/^/| /' conftest.$ac_ext >&5
17307
17308( exit $ac_status )
17309{ echo "$as_me:$LINENO: result: no" >&5
17310echo "${ECHO_T}no" >&6; }
17311
17312fi
17313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17314fi
17315
17316
17317
Ronald Oussorenf8752642006-07-06 10:13:35 +000017318case $ac_sys_system/$ac_sys_release in
17319Darwin/*)
17320 _CUR_CFLAGS="${CFLAGS}"
17321 _CUR_LDFLAGS="${LDFLAGS}"
17322 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17323 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17324 ;;
17325esac
17326
Martin v. Löwiseba40652007-08-30 20:10:57 +000017327{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17328echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017329if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
17330 echo $ECHO_N "(cached) $ECHO_C" >&6
17331else
17332 ac_check_lib_save_LIBS=$LIBS
17333LIBS="-lz $LIBS"
17334cat >conftest.$ac_ext <<_ACEOF
17335/* confdefs.h. */
17336_ACEOF
17337cat confdefs.h >>conftest.$ac_ext
17338cat >>conftest.$ac_ext <<_ACEOF
17339/* end confdefs.h. */
17340
Martin v. Löwiseba40652007-08-30 20:10:57 +000017341/* Override any GCC internal prototype to avoid an error.
17342 Use char because int might match the return type of a GCC
17343 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017344#ifdef __cplusplus
17345extern "C"
17346#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017347char inflateCopy ();
17348int
17349main ()
17350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017351return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017352 ;
17353 return 0;
17354}
17355_ACEOF
17356rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017357if { (ac_try="$ac_link"
17358case "(($ac_try" in
17359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17360 *) ac_try_echo=$ac_try;;
17361esac
17362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17363 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017364 ac_status=$?
17365 grep -v '^ *+' conftest.er1 >conftest.err
17366 rm -f conftest.er1
17367 cat conftest.err >&5
17368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017369 (exit $ac_status); } && {
17370 test -z "$ac_c_werror_flag" ||
17371 test ! -s conftest.err
17372 } && test -s conftest$ac_exeext &&
17373 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017374 ac_cv_lib_z_inflateCopy=yes
17375else
17376 echo "$as_me: failed program was:" >&5
17377sed 's/^/| /' conftest.$ac_ext >&5
17378
Martin v. Löwiseba40652007-08-30 20:10:57 +000017379 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017380fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017381
17382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017383 conftest$ac_exeext conftest.$ac_ext
17384LIBS=$ac_check_lib_save_LIBS
17385fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017386{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17387echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017388if test $ac_cv_lib_z_inflateCopy = yes; then
17389
17390cat >>confdefs.h <<\_ACEOF
17391#define HAVE_ZLIB_COPY 1
17392_ACEOF
17393
17394fi
17395
17396
Ronald Oussorenf8752642006-07-06 10:13:35 +000017397case $ac_sys_system/$ac_sys_release in
17398Darwin/*)
17399 CFLAGS="${_CUR_CFLAGS}"
17400 LDFLAGS="${_CUR_LDFLAGS}"
17401 ;;
17402esac
17403
Martin v. Löwiseba40652007-08-30 20:10:57 +000017404{ echo "$as_me:$LINENO: checking for hstrerror" >&5
17405echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017406cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017407/* confdefs.h. */
17408_ACEOF
17409cat confdefs.h >>conftest.$ac_ext
17410cat >>conftest.$ac_ext <<_ACEOF
17411/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017412
17413#include "confdefs.h"
17414#include <netdb.h>
17415
Martin v. Löwise9416172003-05-03 10:12:45 +000017416int
17417main ()
17418{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017419void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017420 ;
17421 return 0;
17422}
17423_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017424rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017425if { (ac_try="$ac_link"
17426case "(($ac_try" in
17427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17428 *) ac_try_echo=$ac_try;;
17429esac
17430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017433 grep -v '^ *+' conftest.er1 >conftest.err
17434 rm -f conftest.er1
17435 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017437 (exit $ac_status); } && {
17438 test -z "$ac_c_werror_flag" ||
17439 test ! -s conftest.err
17440 } && test -s conftest$ac_exeext &&
17441 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017442
17443cat >>confdefs.h <<\_ACEOF
17444#define HAVE_HSTRERROR 1
17445_ACEOF
17446
Martin v. Löwiseba40652007-08-30 20:10:57 +000017447 { echo "$as_me:$LINENO: result: yes" >&5
17448echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017449else
17450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017451sed 's/^/| /' conftest.$ac_ext >&5
17452
Martin v. Löwiseba40652007-08-30 20:10:57 +000017453 { echo "$as_me:$LINENO: result: no" >&5
17454echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017455
17456fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017457
17458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017460
Martin v. Löwiseba40652007-08-30 20:10:57 +000017461{ echo "$as_me:$LINENO: checking for inet_aton" >&5
17462echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017463cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017464/* confdefs.h. */
17465_ACEOF
17466cat confdefs.h >>conftest.$ac_ext
17467cat >>conftest.$ac_ext <<_ACEOF
17468/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017469
17470#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017471#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017472#include <sys/socket.h>
17473#include <netinet/in.h>
17474#include <arpa/inet.h>
17475
Martin v. Löwise9416172003-05-03 10:12:45 +000017476int
17477main ()
17478{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017479void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017480 ;
17481 return 0;
17482}
17483_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017484rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017485if { (ac_try="$ac_link"
17486case "(($ac_try" in
17487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17488 *) ac_try_echo=$ac_try;;
17489esac
17490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17491 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017493 grep -v '^ *+' conftest.er1 >conftest.err
17494 rm -f conftest.er1
17495 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017497 (exit $ac_status); } && {
17498 test -z "$ac_c_werror_flag" ||
17499 test ! -s conftest.err
17500 } && test -s conftest$ac_exeext &&
17501 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017502
17503cat >>confdefs.h <<\_ACEOF
17504#define HAVE_INET_ATON 1
17505_ACEOF
17506
Martin v. Löwiseba40652007-08-30 20:10:57 +000017507 { echo "$as_me:$LINENO: result: yes" >&5
17508echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017509else
17510 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017511sed 's/^/| /' conftest.$ac_ext >&5
17512
Martin v. Löwiseba40652007-08-30 20:10:57 +000017513 { echo "$as_me:$LINENO: result: no" >&5
17514echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017515
17516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017517
17518rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017519 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017520
Martin v. Löwiseba40652007-08-30 20:10:57 +000017521{ echo "$as_me:$LINENO: checking for inet_pton" >&5
17522echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017523cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017524/* confdefs.h. */
17525_ACEOF
17526cat confdefs.h >>conftest.$ac_ext
17527cat >>conftest.$ac_ext <<_ACEOF
17528/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017529
17530#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017531#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017532#include <sys/socket.h>
17533#include <netinet/in.h>
17534#include <arpa/inet.h>
17535
Martin v. Löwise9416172003-05-03 10:12:45 +000017536int
17537main ()
17538{
17539void* p = inet_pton
17540 ;
17541 return 0;
17542}
17543_ACEOF
17544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017545if { (ac_try="$ac_compile"
17546case "(($ac_try" in
17547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17548 *) ac_try_echo=$ac_try;;
17549esac
17550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017553 grep -v '^ *+' conftest.er1 >conftest.err
17554 rm -f conftest.er1
17555 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000017556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017557 (exit $ac_status); } && {
17558 test -z "$ac_c_werror_flag" ||
17559 test ! -s conftest.err
17560 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017561
17562cat >>confdefs.h <<\_ACEOF
17563#define HAVE_INET_PTON 1
17564_ACEOF
17565
Martin v. Löwiseba40652007-08-30 20:10:57 +000017566 { echo "$as_me:$LINENO: result: yes" >&5
17567echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017568else
17569 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017570sed 's/^/| /' conftest.$ac_ext >&5
17571
Martin v. Löwiseba40652007-08-30 20:10:57 +000017572 { echo "$as_me:$LINENO: result: no" >&5
17573echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017574
17575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017576
17577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017578
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017579# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000017580{ echo "$as_me:$LINENO: checking for setgroups" >&5
17581echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017582cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017583/* confdefs.h. */
17584_ACEOF
17585cat confdefs.h >>conftest.$ac_ext
17586cat >>conftest.$ac_ext <<_ACEOF
17587/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017588
17589#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017590#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017591#ifdef HAVE_GRP_H
17592#include <grp.h>
17593#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017594
Martin v. Löwisd5843682002-11-21 20:41:28 +000017595int
17596main ()
17597{
17598void* p = setgroups
17599 ;
17600 return 0;
17601}
17602_ACEOF
17603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017604if { (ac_try="$ac_compile"
17605case "(($ac_try" in
17606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17607 *) ac_try_echo=$ac_try;;
17608esac
17609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017612 grep -v '^ *+' conftest.er1 >conftest.err
17613 rm -f conftest.er1
17614 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000017615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017616 (exit $ac_status); } && {
17617 test -z "$ac_c_werror_flag" ||
17618 test ! -s conftest.err
17619 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017620
17621cat >>confdefs.h <<\_ACEOF
17622#define HAVE_SETGROUPS 1
17623_ACEOF
17624
Martin v. Löwiseba40652007-08-30 20:10:57 +000017625 { echo "$as_me:$LINENO: result: yes" >&5
17626echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017627else
17628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017629sed 's/^/| /' conftest.$ac_ext >&5
17630
Martin v. Löwiseba40652007-08-30 20:10:57 +000017631 { echo "$as_me:$LINENO: result: no" >&5
17632echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017633
17634fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017635
17636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017637
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017638# check for openpty and forkpty
17639
Martin v. Löwis11437992002-04-12 09:54:03 +000017640
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017641for ac_func in openpty
17642do
Martin v. Löwis11437992002-04-12 09:54:03 +000017643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017644{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17646if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017648else
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017650/* confdefs.h. */
17651_ACEOF
17652cat confdefs.h >>conftest.$ac_ext
17653cat >>conftest.$ac_ext <<_ACEOF
17654/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17657#define $ac_func innocuous_$ac_func
17658
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017659/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017660 which can conflict with char $ac_func (); below.
17661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017662 <limits.h> exists even on freestanding compilers. */
17663
17664#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017665# include <limits.h>
17666#else
17667# include <assert.h>
17668#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017669
17670#undef $ac_func
17671
Martin v. Löwiseba40652007-08-30 20:10:57 +000017672/* Override any GCC internal prototype to avoid an error.
17673 Use char because int might match the return type of a GCC
17674 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017675#ifdef __cplusplus
17676extern "C"
17677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017678char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017679/* The GNU C library defines this for functions which it implements
17680 to always fail with ENOSYS. Some functions are actually named
17681 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017682#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017683choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017684#endif
17685
Skip Montanaro6dead952003-09-25 14:50:04 +000017686int
17687main ()
17688{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017689return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017690 ;
17691 return 0;
17692}
17693_ACEOF
17694rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017695if { (ac_try="$ac_link"
17696case "(($ac_try" in
17697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17698 *) ac_try_echo=$ac_try;;
17699esac
17700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17701 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017703 grep -v '^ *+' conftest.er1 >conftest.err
17704 rm -f conftest.er1
17705 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017707 (exit $ac_status); } && {
17708 test -z "$ac_c_werror_flag" ||
17709 test ! -s conftest.err
17710 } && test -s conftest$ac_exeext &&
17711 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017713else
Martin v. Löwis11437992002-04-12 09:54:03 +000017714 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017715sed 's/^/| /' conftest.$ac_ext >&5
17716
Martin v. Löwiseba40652007-08-30 20:10:57 +000017717 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017719
17720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017721 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017722fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017723ac_res=`eval echo '${'$as_ac_var'}'`
17724 { echo "$as_me:$LINENO: result: $ac_res" >&5
17725echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017726if test `eval echo '${'$as_ac_var'}'` = yes; then
17727 cat >>confdefs.h <<_ACEOF
17728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17729_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017730
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017731else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017732 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17733echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017734if test "${ac_cv_lib_util_openpty+set}" = set; then
17735 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017736else
Martin v. Löwis11437992002-04-12 09:54:03 +000017737 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017738LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017740/* confdefs.h. */
17741_ACEOF
17742cat confdefs.h >>conftest.$ac_ext
17743cat >>conftest.$ac_ext <<_ACEOF
17744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017745
Martin v. Löwiseba40652007-08-30 20:10:57 +000017746/* Override any GCC internal prototype to avoid an error.
17747 Use char because int might match the return type of a GCC
17748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017749#ifdef __cplusplus
17750extern "C"
17751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017752char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017753int
17754main ()
17755{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017756return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017757 ;
17758 return 0;
17759}
17760_ACEOF
17761rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017762if { (ac_try="$ac_link"
17763case "(($ac_try" in
17764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17765 *) ac_try_echo=$ac_try;;
17766esac
17767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17768 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017770 grep -v '^ *+' conftest.er1 >conftest.err
17771 rm -f conftest.er1
17772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017774 (exit $ac_status); } && {
17775 test -z "$ac_c_werror_flag" ||
17776 test ! -s conftest.err
17777 } && test -s conftest$ac_exeext &&
17778 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017779 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017780else
Martin v. Löwis11437992002-04-12 09:54:03 +000017781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017782sed 's/^/| /' conftest.$ac_ext >&5
17783
Martin v. Löwiseba40652007-08-30 20:10:57 +000017784 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017786
17787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017789LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017791{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17792echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017793if test $ac_cv_lib_util_openpty = yes; then
17794 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017795#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017796_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017797 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017798else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017799 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17800echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017801if test "${ac_cv_lib_bsd_openpty+set}" = set; then
17802 echo $ECHO_N "(cached) $ECHO_C" >&6
17803else
17804 ac_check_lib_save_LIBS=$LIBS
17805LIBS="-lbsd $LIBS"
17806cat >conftest.$ac_ext <<_ACEOF
17807/* confdefs.h. */
17808_ACEOF
17809cat confdefs.h >>conftest.$ac_ext
17810cat >>conftest.$ac_ext <<_ACEOF
17811/* end confdefs.h. */
17812
Martin v. Löwiseba40652007-08-30 20:10:57 +000017813/* Override any GCC internal prototype to avoid an error.
17814 Use char because int might match the return type of a GCC
17815 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017816#ifdef __cplusplus
17817extern "C"
17818#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017819char openpty ();
17820int
17821main ()
17822{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017823return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017824 ;
17825 return 0;
17826}
17827_ACEOF
17828rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017829if { (ac_try="$ac_link"
17830case "(($ac_try" in
17831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17832 *) ac_try_echo=$ac_try;;
17833esac
17834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17835 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017836 ac_status=$?
17837 grep -v '^ *+' conftest.er1 >conftest.err
17838 rm -f conftest.er1
17839 cat conftest.err >&5
17840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017841 (exit $ac_status); } && {
17842 test -z "$ac_c_werror_flag" ||
17843 test ! -s conftest.err
17844 } && test -s conftest$ac_exeext &&
17845 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017846 ac_cv_lib_bsd_openpty=yes
17847else
17848 echo "$as_me: failed program was:" >&5
17849sed 's/^/| /' conftest.$ac_ext >&5
17850
Martin v. Löwiseba40652007-08-30 20:10:57 +000017851 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017853
17854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017855 conftest$ac_exeext conftest.$ac_ext
17856LIBS=$ac_check_lib_save_LIBS
17857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017858{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17859echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017860if test $ac_cv_lib_bsd_openpty = yes; then
17861 cat >>confdefs.h <<\_ACEOF
17862#define HAVE_OPENPTY 1
17863_ACEOF
17864 LIBS="$LIBS -lbsd"
17865fi
17866
17867
17868fi
17869
Fred Drake8cef4cf2000-06-28 16:40:38 +000017870
17871fi
17872done
17873
Martin v. Löwis11437992002-04-12 09:54:03 +000017874
Fred Drake8cef4cf2000-06-28 16:40:38 +000017875for ac_func in forkpty
17876do
Martin v. Löwis11437992002-04-12 09:54:03 +000017877as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000017878{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17879echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17880if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017881 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017882else
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017884/* confdefs.h. */
17885_ACEOF
17886cat confdefs.h >>conftest.$ac_ext
17887cat >>conftest.$ac_ext <<_ACEOF
17888/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017889/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17890 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17891#define $ac_func innocuous_$ac_func
17892
Fred Drake8cef4cf2000-06-28 16:40:38 +000017893/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017894 which can conflict with char $ac_func (); below.
17895 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017896 <limits.h> exists even on freestanding compilers. */
17897
17898#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017899# include <limits.h>
17900#else
17901# include <assert.h>
17902#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017903
17904#undef $ac_func
17905
Martin v. Löwiseba40652007-08-30 20:10:57 +000017906/* Override any GCC internal prototype to avoid an error.
17907 Use char because int might match the return type of a GCC
17908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017909#ifdef __cplusplus
17910extern "C"
17911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017912char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017913/* The GNU C library defines this for functions which it implements
17914 to always fail with ENOSYS. Some functions are actually named
17915 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017916#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017917choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017918#endif
17919
Skip Montanaro6dead952003-09-25 14:50:04 +000017920int
17921main ()
17922{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017923return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017924 ;
17925 return 0;
17926}
17927_ACEOF
17928rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017929if { (ac_try="$ac_link"
17930case "(($ac_try" in
17931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17932 *) ac_try_echo=$ac_try;;
17933esac
17934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17935 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017937 grep -v '^ *+' conftest.er1 >conftest.err
17938 rm -f conftest.er1
17939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017941 (exit $ac_status); } && {
17942 test -z "$ac_c_werror_flag" ||
17943 test ! -s conftest.err
17944 } && test -s conftest$ac_exeext &&
17945 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017947else
Martin v. Löwis11437992002-04-12 09:54:03 +000017948 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017949sed 's/^/| /' conftest.$ac_ext >&5
17950
Martin v. Löwiseba40652007-08-30 20:10:57 +000017951 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017952fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017953
17954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017955 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017957ac_res=`eval echo '${'$as_ac_var'}'`
17958 { echo "$as_me:$LINENO: result: $ac_res" >&5
17959echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017960if test `eval echo '${'$as_ac_var'}'` = yes; then
17961 cat >>confdefs.h <<_ACEOF
17962#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17963_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017964
Fred Drake8cef4cf2000-06-28 16:40:38 +000017965else
Martin v. Löwiseba40652007-08-30 20:10:57 +000017966 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17967echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017968if test "${ac_cv_lib_util_forkpty+set}" = set; then
17969 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017970else
Martin v. Löwis11437992002-04-12 09:54:03 +000017971 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017972LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017974/* confdefs.h. */
17975_ACEOF
17976cat confdefs.h >>conftest.$ac_ext
17977cat >>conftest.$ac_ext <<_ACEOF
17978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017979
Martin v. Löwiseba40652007-08-30 20:10:57 +000017980/* Override any GCC internal prototype to avoid an error.
17981 Use char because int might match the return type of a GCC
17982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017983#ifdef __cplusplus
17984extern "C"
17985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017986char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017987int
17988main ()
17989{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017990return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017991 ;
17992 return 0;
17993}
17994_ACEOF
17995rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017996if { (ac_try="$ac_link"
17997case "(($ac_try" in
17998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17999 *) ac_try_echo=$ac_try;;
18000esac
18001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18002 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018004 grep -v '^ *+' conftest.er1 >conftest.err
18005 rm -f conftest.er1
18006 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018008 (exit $ac_status); } && {
18009 test -z "$ac_c_werror_flag" ||
18010 test ! -s conftest.err
18011 } && test -s conftest$ac_exeext &&
18012 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018013 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018014else
Martin v. Löwis11437992002-04-12 09:54:03 +000018015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018016sed 's/^/| /' conftest.$ac_ext >&5
18017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018018 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018019fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018020
18021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018023LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018024fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018025{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18026echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018027if test $ac_cv_lib_util_forkpty = yes; then
18028 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018029#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018030_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018031 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018032else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018033 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18034echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018035if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
18036 echo $ECHO_N "(cached) $ECHO_C" >&6
18037else
18038 ac_check_lib_save_LIBS=$LIBS
18039LIBS="-lbsd $LIBS"
18040cat >conftest.$ac_ext <<_ACEOF
18041/* confdefs.h. */
18042_ACEOF
18043cat confdefs.h >>conftest.$ac_ext
18044cat >>conftest.$ac_ext <<_ACEOF
18045/* end confdefs.h. */
18046
Martin v. Löwiseba40652007-08-30 20:10:57 +000018047/* Override any GCC internal prototype to avoid an error.
18048 Use char because int might match the return type of a GCC
18049 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018050#ifdef __cplusplus
18051extern "C"
18052#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018053char forkpty ();
18054int
18055main ()
18056{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018057return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018058 ;
18059 return 0;
18060}
18061_ACEOF
18062rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018063if { (ac_try="$ac_link"
18064case "(($ac_try" in
18065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18066 *) ac_try_echo=$ac_try;;
18067esac
18068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18069 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018070 ac_status=$?
18071 grep -v '^ *+' conftest.er1 >conftest.err
18072 rm -f conftest.er1
18073 cat conftest.err >&5
18074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075 (exit $ac_status); } && {
18076 test -z "$ac_c_werror_flag" ||
18077 test ! -s conftest.err
18078 } && test -s conftest$ac_exeext &&
18079 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018080 ac_cv_lib_bsd_forkpty=yes
18081else
18082 echo "$as_me: failed program was:" >&5
18083sed 's/^/| /' conftest.$ac_ext >&5
18084
Martin v. Löwiseba40652007-08-30 20:10:57 +000018085 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018087
18088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018089 conftest$ac_exeext conftest.$ac_ext
18090LIBS=$ac_check_lib_save_LIBS
18091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018092{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18093echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018094if test $ac_cv_lib_bsd_forkpty = yes; then
18095 cat >>confdefs.h <<\_ACEOF
18096#define HAVE_FORKPTY 1
18097_ACEOF
18098 LIBS="$LIBS -lbsd"
18099fi
18100
18101
18102fi
18103
Fred Drake8cef4cf2000-06-28 16:40:38 +000018104
18105fi
18106done
18107
Jack Jansendd19cf82001-12-06 22:36:17 +000018108
Brett Cannonaa5778d2008-03-18 04:09:00 +000018109# Stuff for expat.
18110
18111for ac_func in memmove
18112do
18113as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18114{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18115echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18116if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18117 echo $ECHO_N "(cached) $ECHO_C" >&6
18118else
18119 cat >conftest.$ac_ext <<_ACEOF
18120/* confdefs.h. */
18121_ACEOF
18122cat confdefs.h >>conftest.$ac_ext
18123cat >>conftest.$ac_ext <<_ACEOF
18124/* end confdefs.h. */
18125/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18126 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18127#define $ac_func innocuous_$ac_func
18128
18129/* System header to define __stub macros and hopefully few prototypes,
18130 which can conflict with char $ac_func (); below.
18131 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18132 <limits.h> exists even on freestanding compilers. */
18133
18134#ifdef __STDC__
18135# include <limits.h>
18136#else
18137# include <assert.h>
18138#endif
18139
18140#undef $ac_func
18141
18142/* Override any GCC internal prototype to avoid an error.
18143 Use char because int might match the return type of a GCC
18144 builtin and then its argument prototype would still apply. */
18145#ifdef __cplusplus
18146extern "C"
18147#endif
18148char $ac_func ();
18149/* The GNU C library defines this for functions which it implements
18150 to always fail with ENOSYS. Some functions are actually named
18151 something starting with __ and the normal name is an alias. */
18152#if defined __stub_$ac_func || defined __stub___$ac_func
18153choke me
18154#endif
18155
18156int
18157main ()
18158{
18159return $ac_func ();
18160 ;
18161 return 0;
18162}
18163_ACEOF
18164rm -f conftest.$ac_objext conftest$ac_exeext
18165if { (ac_try="$ac_link"
18166case "(($ac_try" in
18167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18168 *) ac_try_echo=$ac_try;;
18169esac
18170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18171 (eval "$ac_link") 2>conftest.er1
18172 ac_status=$?
18173 grep -v '^ *+' conftest.er1 >conftest.err
18174 rm -f conftest.er1
18175 cat conftest.err >&5
18176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18177 (exit $ac_status); } && {
18178 test -z "$ac_c_werror_flag" ||
18179 test ! -s conftest.err
18180 } && test -s conftest$ac_exeext &&
18181 $as_test_x conftest$ac_exeext; then
18182 eval "$as_ac_var=yes"
18183else
18184 echo "$as_me: failed program was:" >&5
18185sed 's/^/| /' conftest.$ac_ext >&5
18186
18187 eval "$as_ac_var=no"
18188fi
18189
18190rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18191 conftest$ac_exeext conftest.$ac_ext
18192fi
18193ac_res=`eval echo '${'$as_ac_var'}'`
18194 { echo "$as_me:$LINENO: result: $ac_res" >&5
18195echo "${ECHO_T}$ac_res" >&6; }
18196if test `eval echo '${'$as_ac_var'}'` = yes; then
18197 cat >>confdefs.h <<_ACEOF
18198#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18199_ACEOF
18200
18201fi
18202done
18203
18204
Michael W. Hudson54241132001-12-07 15:38:26 +000018205# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018206
18207
18208
18209
18210
18211
Fred Drake8cef4cf2000-06-28 16:40:38 +000018212for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18213do
Martin v. Löwis11437992002-04-12 09:54:03 +000018214as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018215{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18216echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18217if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018218 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018219else
Martin v. Löwis11437992002-04-12 09:54:03 +000018220 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018221/* confdefs.h. */
18222_ACEOF
18223cat confdefs.h >>conftest.$ac_ext
18224cat >>conftest.$ac_ext <<_ACEOF
18225/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018226/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18227 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18228#define $ac_func innocuous_$ac_func
18229
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018230/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018231 which can conflict with char $ac_func (); below.
18232 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018233 <limits.h> exists even on freestanding compilers. */
18234
18235#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018236# include <limits.h>
18237#else
18238# include <assert.h>
18239#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018240
18241#undef $ac_func
18242
Martin v. Löwiseba40652007-08-30 20:10:57 +000018243/* Override any GCC internal prototype to avoid an error.
18244 Use char because int might match the return type of a GCC
18245 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018246#ifdef __cplusplus
18247extern "C"
18248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018249char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018250/* The GNU C library defines this for functions which it implements
18251 to always fail with ENOSYS. Some functions are actually named
18252 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018253#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018254choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018255#endif
18256
Skip Montanaro6dead952003-09-25 14:50:04 +000018257int
18258main ()
18259{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018260return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018261 ;
18262 return 0;
18263}
18264_ACEOF
18265rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018266if { (ac_try="$ac_link"
18267case "(($ac_try" in
18268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269 *) ac_try_echo=$ac_try;;
18270esac
18271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18272 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018274 grep -v '^ *+' conftest.er1 >conftest.err
18275 rm -f conftest.er1
18276 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018278 (exit $ac_status); } && {
18279 test -z "$ac_c_werror_flag" ||
18280 test ! -s conftest.err
18281 } && test -s conftest$ac_exeext &&
18282 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018283 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018284else
Martin v. Löwis11437992002-04-12 09:54:03 +000018285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018286sed 's/^/| /' conftest.$ac_ext >&5
18287
Martin v. Löwiseba40652007-08-30 20:10:57 +000018288 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018290
18291rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018292 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018294ac_res=`eval echo '${'$as_ac_var'}'`
18295 { echo "$as_me:$LINENO: result: $ac_res" >&5
18296echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018297if test `eval echo '${'$as_ac_var'}'` = yes; then
18298 cat >>confdefs.h <<_ACEOF
18299#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18300_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018301
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018302fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018303done
18304
Michael W. Hudson54241132001-12-07 15:38:26 +000018305
Martin v. Löwis11437992002-04-12 09:54:03 +000018306
18307
18308
Brett Cannonaa5778d2008-03-18 04:09:00 +000018309for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018310do
Martin v. Löwis11437992002-04-12 09:54:03 +000018311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018312{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18314if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018316else
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018318/* confdefs.h. */
18319_ACEOF
18320cat confdefs.h >>conftest.$ac_ext
18321cat >>conftest.$ac_ext <<_ACEOF
18322/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018323/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18324 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18325#define $ac_func innocuous_$ac_func
18326
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018327/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018328 which can conflict with char $ac_func (); below.
18329 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018330 <limits.h> exists even on freestanding compilers. */
18331
18332#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018333# include <limits.h>
18334#else
18335# include <assert.h>
18336#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018337
18338#undef $ac_func
18339
Martin v. Löwiseba40652007-08-30 20:10:57 +000018340/* Override any GCC internal prototype to avoid an error.
18341 Use char because int might match the return type of a GCC
18342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018343#ifdef __cplusplus
18344extern "C"
18345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018346char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018347/* The GNU C library defines this for functions which it implements
18348 to always fail with ENOSYS. Some functions are actually named
18349 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018350#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018351choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018352#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018353
Skip Montanaro6dead952003-09-25 14:50:04 +000018354int
18355main ()
18356{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018357return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018358 ;
18359 return 0;
18360}
18361_ACEOF
18362rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018363if { (ac_try="$ac_link"
18364case "(($ac_try" in
18365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18366 *) ac_try_echo=$ac_try;;
18367esac
18368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18369 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018371 grep -v '^ *+' conftest.er1 >conftest.err
18372 rm -f conftest.er1
18373 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018375 (exit $ac_status); } && {
18376 test -z "$ac_c_werror_flag" ||
18377 test ! -s conftest.err
18378 } && test -s conftest$ac_exeext &&
18379 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018380 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018381else
Martin v. Löwis11437992002-04-12 09:54:03 +000018382 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018383sed 's/^/| /' conftest.$ac_ext >&5
18384
Martin v. Löwiseba40652007-08-30 20:10:57 +000018385 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018387
18388rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018389 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018391ac_res=`eval echo '${'$as_ac_var'}'`
18392 { echo "$as_me:$LINENO: result: $ac_res" >&5
18393echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018394if test `eval echo '${'$as_ac_var'}'` = yes; then
18395 cat >>confdefs.h <<_ACEOF
18396#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18397_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018398
Martin v. Löwis1142de32002-03-29 16:28:31 +000018399else
Martin v. Löwiseba40652007-08-30 20:10:57 +000018400 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018401 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000018402 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18403 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018404esac
18405
Martin v. Löwis1142de32002-03-29 16:28:31 +000018406fi
18407done
18408
18409
Martin v. Löwis11437992002-04-12 09:54:03 +000018410
Martin v. Löwis1142de32002-03-29 16:28:31 +000018411for ac_func in getpgrp
18412do
Martin v. Löwis11437992002-04-12 09:54:03 +000018413as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018414{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18415echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18416if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018417 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018418else
Martin v. Löwis11437992002-04-12 09:54:03 +000018419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018420/* confdefs.h. */
18421_ACEOF
18422cat confdefs.h >>conftest.$ac_ext
18423cat >>conftest.$ac_ext <<_ACEOF
18424/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018425/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18426 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18427#define $ac_func innocuous_$ac_func
18428
Martin v. Löwis1142de32002-03-29 16:28:31 +000018429/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018430 which can conflict with char $ac_func (); below.
18431 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018432 <limits.h> exists even on freestanding compilers. */
18433
18434#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018435# include <limits.h>
18436#else
18437# include <assert.h>
18438#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018439
18440#undef $ac_func
18441
Martin v. Löwiseba40652007-08-30 20:10:57 +000018442/* Override any GCC internal prototype to avoid an error.
18443 Use char because int might match the return type of a GCC
18444 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018445#ifdef __cplusplus
18446extern "C"
18447#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018448char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018449/* The GNU C library defines this for functions which it implements
18450 to always fail with ENOSYS. Some functions are actually named
18451 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018453choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018454#endif
18455
Skip Montanaro6dead952003-09-25 14:50:04 +000018456int
18457main ()
18458{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018459return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018460 ;
18461 return 0;
18462}
18463_ACEOF
18464rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018465if { (ac_try="$ac_link"
18466case "(($ac_try" in
18467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18468 *) ac_try_echo=$ac_try;;
18469esac
18470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18471 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018473 grep -v '^ *+' conftest.er1 >conftest.err
18474 rm -f conftest.er1
18475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018477 (exit $ac_status); } && {
18478 test -z "$ac_c_werror_flag" ||
18479 test ! -s conftest.err
18480 } && test -s conftest$ac_exeext &&
18481 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018482 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018483else
Martin v. Löwis11437992002-04-12 09:54:03 +000018484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018485sed 's/^/| /' conftest.$ac_ext >&5
18486
Martin v. Löwiseba40652007-08-30 20:10:57 +000018487 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018489
18490rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018491 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018493ac_res=`eval echo '${'$as_ac_var'}'`
18494 { echo "$as_me:$LINENO: result: $ac_res" >&5
18495echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018496if test `eval echo '${'$as_ac_var'}'` = yes; then
18497 cat >>confdefs.h <<_ACEOF
18498#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18499_ACEOF
18500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018501/* confdefs.h. */
18502_ACEOF
18503cat confdefs.h >>conftest.$ac_ext
18504cat >>conftest.$ac_ext <<_ACEOF
18505/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018506#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018507int
18508main ()
18509{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018510getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018511 ;
18512 return 0;
18513}
18514_ACEOF
18515rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516if { (ac_try="$ac_compile"
18517case "(($ac_try" in
18518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18519 *) ac_try_echo=$ac_try;;
18520esac
18521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18522 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018524 grep -v '^ *+' conftest.er1 >conftest.err
18525 rm -f conftest.er1
18526 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018528 (exit $ac_status); } && {
18529 test -z "$ac_c_werror_flag" ||
18530 test ! -s conftest.err
18531 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018532
18533cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018534#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018535_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018536
Martin v. Löwis11437992002-04-12 09:54:03 +000018537
Guido van Rossumf78abae1997-01-21 22:02:36 +000018538else
Martin v. Löwis11437992002-04-12 09:54:03 +000018539 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018540sed 's/^/| /' conftest.$ac_ext >&5
18541
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542
Guido van Rossum627b2d71993-12-24 10:39:16 +000018543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018544
18545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018546
Guido van Rossum627b2d71993-12-24 10:39:16 +000018547fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018548done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018549
Jack Jansen150753c2003-03-29 22:07:47 +000018550
18551for ac_func in setpgrp
18552do
18553as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018554{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18555echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18556if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018558else
Martin v. Löwis11437992002-04-12 09:54:03 +000018559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018560/* confdefs.h. */
18561_ACEOF
18562cat confdefs.h >>conftest.$ac_ext
18563cat >>conftest.$ac_ext <<_ACEOF
18564/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018565/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18566 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18567#define $ac_func innocuous_$ac_func
18568
Jack Jansen150753c2003-03-29 22:07:47 +000018569/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018570 which can conflict with char $ac_func (); below.
18571 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018572 <limits.h> exists even on freestanding compilers. */
18573
18574#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018575# include <limits.h>
18576#else
18577# include <assert.h>
18578#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018579
18580#undef $ac_func
18581
Martin v. Löwiseba40652007-08-30 20:10:57 +000018582/* Override any GCC internal prototype to avoid an error.
18583 Use char because int might match the return type of a GCC
18584 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018585#ifdef __cplusplus
18586extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018587#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018588char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018589/* The GNU C library defines this for functions which it implements
18590 to always fail with ENOSYS. Some functions are actually named
18591 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018592#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018593choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018594#endif
18595
Skip Montanaro6dead952003-09-25 14:50:04 +000018596int
18597main ()
18598{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018599return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018600 ;
18601 return 0;
18602}
18603_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018604rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018605if { (ac_try="$ac_link"
18606case "(($ac_try" in
18607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18608 *) ac_try_echo=$ac_try;;
18609esac
18610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18611 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018613 grep -v '^ *+' conftest.er1 >conftest.err
18614 rm -f conftest.er1
18615 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018617 (exit $ac_status); } && {
18618 test -z "$ac_c_werror_flag" ||
18619 test ! -s conftest.err
18620 } && test -s conftest$ac_exeext &&
18621 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000018622 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018623else
Jack Jansen150753c2003-03-29 22:07:47 +000018624 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018625sed 's/^/| /' conftest.$ac_ext >&5
18626
Martin v. Löwiseba40652007-08-30 20:10:57 +000018627 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018628fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018629
18630rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018631 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018632fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018633ac_res=`eval echo '${'$as_ac_var'}'`
18634 { echo "$as_me:$LINENO: result: $ac_res" >&5
18635echo "${ECHO_T}$ac_res" >&6; }
Jack Jansen150753c2003-03-29 22:07:47 +000018636if test `eval echo '${'$as_ac_var'}'` = yes; then
18637 cat >>confdefs.h <<_ACEOF
18638#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18639_ACEOF
18640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018641/* confdefs.h. */
18642_ACEOF
18643cat confdefs.h >>conftest.$ac_ext
18644cat >>conftest.$ac_ext <<_ACEOF
18645/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018646#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018647int
18648main ()
18649{
18650setpgrp(0,0);
18651 ;
18652 return 0;
18653}
18654_ACEOF
18655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018656if { (ac_try="$ac_compile"
18657case "(($ac_try" in
18658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18659 *) ac_try_echo=$ac_try;;
18660esac
18661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18662 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018664 grep -v '^ *+' conftest.er1 >conftest.err
18665 rm -f conftest.er1
18666 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000018667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018668 (exit $ac_status); } && {
18669 test -z "$ac_c_werror_flag" ||
18670 test ! -s conftest.err
18671 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018672
18673cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018674#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018675_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018676
Jack Jansen150753c2003-03-29 22:07:47 +000018677
18678else
18679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018680sed 's/^/| /' conftest.$ac_ext >&5
18681
Martin v. Löwiseba40652007-08-30 20:10:57 +000018682
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018683fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018684
18685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018686
18687fi
18688done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018689
Martin v. Löwis11437992002-04-12 09:54:03 +000018690
Thomas Wouters3a584202000-08-05 23:28:51 +000018691for ac_func in gettimeofday
18692do
Martin v. Löwis11437992002-04-12 09:54:03 +000018693as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000018694{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18695echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18696if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018698else
Martin v. Löwis11437992002-04-12 09:54:03 +000018699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018700/* confdefs.h. */
18701_ACEOF
18702cat confdefs.h >>conftest.$ac_ext
18703cat >>conftest.$ac_ext <<_ACEOF
18704/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018705/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18706 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18707#define $ac_func innocuous_$ac_func
18708
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018709/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018710 which can conflict with char $ac_func (); below.
18711 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018712 <limits.h> exists even on freestanding compilers. */
18713
18714#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018715# include <limits.h>
18716#else
18717# include <assert.h>
18718#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018719
18720#undef $ac_func
18721
Martin v. Löwiseba40652007-08-30 20:10:57 +000018722/* Override any GCC internal prototype to avoid an error.
18723 Use char because int might match the return type of a GCC
18724 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018725#ifdef __cplusplus
18726extern "C"
18727#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018728char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018729/* The GNU C library defines this for functions which it implements
18730 to always fail with ENOSYS. Some functions are actually named
18731 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018732#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018733choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018734#endif
18735
Skip Montanaro6dead952003-09-25 14:50:04 +000018736int
18737main ()
18738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018739return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018740 ;
18741 return 0;
18742}
18743_ACEOF
18744rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018745if { (ac_try="$ac_link"
18746case "(($ac_try" in
18747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18748 *) ac_try_echo=$ac_try;;
18749esac
18750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018753 grep -v '^ *+' conftest.er1 >conftest.err
18754 rm -f conftest.er1
18755 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018757 (exit $ac_status); } && {
18758 test -z "$ac_c_werror_flag" ||
18759 test ! -s conftest.err
18760 } && test -s conftest$ac_exeext &&
18761 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018762 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018763else
Martin v. Löwis11437992002-04-12 09:54:03 +000018764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018765sed 's/^/| /' conftest.$ac_ext >&5
18766
Martin v. Löwiseba40652007-08-30 20:10:57 +000018767 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018769
18770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018771 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018773ac_res=`eval echo '${'$as_ac_var'}'`
18774 { echo "$as_me:$LINENO: result: $ac_res" >&5
18775echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018776if test `eval echo '${'$as_ac_var'}'` = yes; then
18777 cat >>confdefs.h <<_ACEOF
18778#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18779_ACEOF
18780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018781/* confdefs.h. */
18782_ACEOF
18783cat confdefs.h >>conftest.$ac_ext
18784cat >>conftest.$ac_ext <<_ACEOF
18785/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018786#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018787int
18788main ()
18789{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018790gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 ;
18792 return 0;
18793}
18794_ACEOF
18795rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018796if { (ac_try="$ac_compile"
18797case "(($ac_try" in
18798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18799 *) ac_try_echo=$ac_try;;
18800esac
18801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018804 grep -v '^ *+' conftest.er1 >conftest.err
18805 rm -f conftest.er1
18806 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018808 (exit $ac_status); } && {
18809 test -z "$ac_c_werror_flag" ||
18810 test ! -s conftest.err
18811 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018812 :
18813else
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018815sed 's/^/| /' conftest.$ac_ext >&5
18816
Martin v. Löwis11437992002-04-12 09:54:03 +000018817
18818cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018819#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018820_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018821
Martin v. Löwis11437992002-04-12 09:54:03 +000018822
Guido van Rossum627b2d71993-12-24 10:39:16 +000018823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018824
18825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018826
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018827fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018828done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018829
Michael W. Hudson54241132001-12-07 15:38:26 +000018830
Martin v. Löwiseba40652007-08-30 20:10:57 +000018831{ echo "$as_me:$LINENO: checking for major" >&5
18832echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018834/* confdefs.h. */
18835_ACEOF
18836cat confdefs.h >>conftest.$ac_ext
18837cat >>conftest.$ac_ext <<_ACEOF
18838/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018839
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018840#if defined(MAJOR_IN_MKDEV)
18841#include <sys/mkdev.h>
18842#elif defined(MAJOR_IN_SYSMACROS)
18843#include <sys/sysmacros.h>
18844#else
18845#include <sys/types.h>
18846#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018847
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018848int
18849main ()
18850{
18851
18852 makedev(major(0),minor(0));
18853
18854 ;
18855 return 0;
18856}
18857_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018858rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018859if { (ac_try="$ac_link"
18860case "(($ac_try" in
18861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18862 *) ac_try_echo=$ac_try;;
18863esac
18864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18865 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018867 grep -v '^ *+' conftest.er1 >conftest.err
18868 rm -f conftest.er1
18869 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018871 (exit $ac_status); } && {
18872 test -z "$ac_c_werror_flag" ||
18873 test ! -s conftest.err
18874 } && test -s conftest$ac_exeext &&
18875 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018876
18877
18878cat >>confdefs.h <<\_ACEOF
18879#define HAVE_DEVICE_MACROS 1
18880_ACEOF
18881
Martin v. Löwiseba40652007-08-30 20:10:57 +000018882 { echo "$as_me:$LINENO: result: yes" >&5
18883echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018884
18885else
18886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018887sed 's/^/| /' conftest.$ac_ext >&5
18888
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018889
Martin v. Löwiseba40652007-08-30 20:10:57 +000018890 { echo "$as_me:$LINENO: result: no" >&5
18891echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018892
18893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018894
18895rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018896 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018897
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018898# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018899# for [no]getaddrinfo in netdb.h.
Martin v. Löwiseba40652007-08-30 20:10:57 +000018900{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18901echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018902cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018903/* confdefs.h. */
18904_ACEOF
18905cat confdefs.h >>conftest.$ac_ext
18906cat >>conftest.$ac_ext <<_ACEOF
18907/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018908
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018909#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018910#include <sys/socket.h>
18911#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018912#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018913
Martin v. Löwis11437992002-04-12 09:54:03 +000018914int
18915main ()
18916{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018917
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018918getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018919
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 ;
18921 return 0;
18922}
18923_ACEOF
18924rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018925if { (ac_try="$ac_link"
18926case "(($ac_try" in
18927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18928 *) ac_try_echo=$ac_try;;
18929esac
18930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18931 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018933 grep -v '^ *+' conftest.er1 >conftest.err
18934 rm -f conftest.er1
18935 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018937 (exit $ac_status); } && {
18938 test -z "$ac_c_werror_flag" ||
18939 test ! -s conftest.err
18940 } && test -s conftest$ac_exeext &&
18941 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018942
Martin v. Löwiseba40652007-08-30 20:10:57 +000018943{ echo "$as_me:$LINENO: result: yes" >&5
18944echo "${ECHO_T}yes" >&6; }
18945{ echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18946echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018947if test "$cross_compiling" = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948 { echo "$as_me:$LINENO: result: buggy" >&5
18949echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018950buggygetaddrinfo=yes
18951else
Martin v. Löwis11437992002-04-12 09:54:03 +000018952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018953/* confdefs.h. */
18954_ACEOF
18955cat confdefs.h >>conftest.$ac_ext
18956cat >>conftest.$ac_ext <<_ACEOF
18957/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018958
18959#include <sys/types.h>
18960#include <netdb.h>
18961#include <string.h>
18962#include <sys/socket.h>
18963#include <netinet/in.h>
18964
18965main()
18966{
18967 int passive, gaierr, inet4 = 0, inet6 = 0;
18968 struct addrinfo hints, *ai, *aitop;
18969 char straddr[INET6_ADDRSTRLEN], strport[16];
18970
18971 for (passive = 0; passive <= 1; passive++) {
18972 memset(&hints, 0, sizeof(hints));
18973 hints.ai_family = AF_UNSPEC;
18974 hints.ai_flags = passive ? AI_PASSIVE : 0;
18975 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000018976 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018977 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
18978 (void)gai_strerror(gaierr);
18979 goto bad;
18980 }
18981 for (ai = aitop; ai; ai = ai->ai_next) {
18982 if (ai->ai_addr == NULL ||
18983 ai->ai_addrlen == 0 ||
18984 getnameinfo(ai->ai_addr, ai->ai_addrlen,
18985 straddr, sizeof(straddr), strport, sizeof(strport),
18986 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
18987 goto bad;
18988 }
18989 switch (ai->ai_family) {
18990 case AF_INET:
18991 if (strcmp(strport, "54321") != 0) {
18992 goto bad;
18993 }
18994 if (passive) {
18995 if (strcmp(straddr, "0.0.0.0") != 0) {
18996 goto bad;
18997 }
18998 } else {
18999 if (strcmp(straddr, "127.0.0.1") != 0) {
19000 goto bad;
19001 }
19002 }
19003 inet4++;
19004 break;
19005 case AF_INET6:
19006 if (strcmp(strport, "54321") != 0) {
19007 goto bad;
19008 }
19009 if (passive) {
19010 if (strcmp(straddr, "::") != 0) {
19011 goto bad;
19012 }
19013 } else {
19014 if (strcmp(straddr, "::1") != 0) {
19015 goto bad;
19016 }
19017 }
19018 inet6++;
19019 break;
19020 case AF_UNSPEC:
19021 goto bad;
19022 break;
19023 default:
19024 /* another family support? */
19025 break;
19026 }
19027 }
19028 }
19029
19030 if (!(inet4 == 0 || inet4 == 2))
19031 goto bad;
19032 if (!(inet6 == 0 || inet6 == 2))
19033 goto bad;
19034
19035 if (aitop)
19036 freeaddrinfo(aitop);
19037 exit(0);
19038
19039 bad:
19040 if (aitop)
19041 freeaddrinfo(aitop);
19042 exit(1);
19043}
19044
Martin v. Löwis11437992002-04-12 09:54:03 +000019045_ACEOF
19046rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019047if { (ac_try="$ac_link"
19048case "(($ac_try" in
19049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19050 *) ac_try_echo=$ac_try;;
19051esac
19052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19053 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019054 ac_status=$?
19055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19056 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019057 { (case "(($ac_try" in
19058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19059 *) ac_try_echo=$ac_try;;
19060esac
19061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19062 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 ac_status=$?
19064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19065 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000019066 { echo "$as_me:$LINENO: result: good" >&5
19067echo "${ECHO_T}good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019068buggygetaddrinfo=no
19069else
Martin v. Löwis11437992002-04-12 09:54:03 +000019070 echo "$as_me: program exited with status $ac_status" >&5
19071echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019072sed 's/^/| /' conftest.$ac_ext >&5
19073
Martin v. Löwis11437992002-04-12 09:54:03 +000019074( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000019075{ echo "$as_me:$LINENO: result: buggy" >&5
19076echo "${ECHO_T}buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019077buggygetaddrinfo=yes
19078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019079rm -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 +000019080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019081
19082
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019083else
Martin v. Löwis11437992002-04-12 09:54:03 +000019084 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019085sed 's/^/| /' conftest.$ac_ext >&5
19086
Martin v. Löwis11437992002-04-12 09:54:03 +000019087
Martin v. Löwiseba40652007-08-30 20:10:57 +000019088{ echo "$as_me:$LINENO: result: no" >&5
19089echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019090buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019091
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019093
19094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019095 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019096
19097if test "$buggygetaddrinfo" = "yes"; then
19098 if test "$ipv6" = "yes"; then
19099 echo 'Fatal: You must get working getaddrinfo() function.'
19100 echo ' or you can specify "--disable-ipv6"'.
19101 exit 1
19102 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019103else
Martin v. Löwis11437992002-04-12 09:54:03 +000019104
19105cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019106#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019107_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019108
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019110
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019111for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019112do
Martin v. Löwis11437992002-04-12 09:54:03 +000019113as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000019114{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19115echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19116if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019117 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019118else
Martin v. Löwis11437992002-04-12 09:54:03 +000019119 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019120/* confdefs.h. */
19121_ACEOF
19122cat confdefs.h >>conftest.$ac_ext
19123cat >>conftest.$ac_ext <<_ACEOF
19124/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019125/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19126 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19127#define $ac_func innocuous_$ac_func
19128
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019129/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019130 which can conflict with char $ac_func (); below.
19131 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019132 <limits.h> exists even on freestanding compilers. */
19133
19134#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019135# include <limits.h>
19136#else
19137# include <assert.h>
19138#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019139
19140#undef $ac_func
19141
Martin v. Löwiseba40652007-08-30 20:10:57 +000019142/* Override any GCC internal prototype to avoid an error.
19143 Use char because int might match the return type of a GCC
19144 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019145#ifdef __cplusplus
19146extern "C"
19147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019148char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019149/* The GNU C library defines this for functions which it implements
19150 to always fail with ENOSYS. Some functions are actually named
19151 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019152#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019153choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019154#endif
19155
Skip Montanaro6dead952003-09-25 14:50:04 +000019156int
19157main ()
19158{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019159return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019160 ;
19161 return 0;
19162}
19163_ACEOF
19164rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019165if { (ac_try="$ac_link"
19166case "(($ac_try" in
19167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19168 *) ac_try_echo=$ac_try;;
19169esac
19170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19171 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019173 grep -v '^ *+' conftest.er1 >conftest.err
19174 rm -f conftest.er1
19175 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019177 (exit $ac_status); } && {
19178 test -z "$ac_c_werror_flag" ||
19179 test ! -s conftest.err
19180 } && test -s conftest$ac_exeext &&
19181 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019182 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019183else
Martin v. Löwis11437992002-04-12 09:54:03 +000019184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019185sed 's/^/| /' conftest.$ac_ext >&5
19186
Martin v. Löwiseba40652007-08-30 20:10:57 +000019187 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019189
19190rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019191 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019193ac_res=`eval echo '${'$as_ac_var'}'`
19194 { echo "$as_me:$LINENO: result: $ac_res" >&5
19195echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019196if test `eval echo '${'$as_ac_var'}'` = yes; then
19197 cat >>confdefs.h <<_ACEOF
19198#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19199_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019200
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019201fi
19202done
19203
Michael W. Hudson54241132001-12-07 15:38:26 +000019204
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019205# checks for structures
Martin v. Löwiseba40652007-08-30 20:10:57 +000019206{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19207echo $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 +000019208if test "${ac_cv_header_time+set}" = set; then
19209 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019210else
Martin v. Löwis11437992002-04-12 09:54:03 +000019211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019212/* confdefs.h. */
19213_ACEOF
19214cat confdefs.h >>conftest.$ac_ext
19215cat >>conftest.$ac_ext <<_ACEOF
19216/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019217#include <sys/types.h>
19218#include <sys/time.h>
19219#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019220
Martin v. Löwis11437992002-04-12 09:54:03 +000019221int
19222main ()
19223{
19224if ((struct tm *) 0)
19225return 0;
19226 ;
19227 return 0;
19228}
19229_ACEOF
19230rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231if { (ac_try="$ac_compile"
19232case "(($ac_try" in
19233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19234 *) ac_try_echo=$ac_try;;
19235esac
19236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019239 grep -v '^ *+' conftest.er1 >conftest.err
19240 rm -f conftest.er1
19241 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019243 (exit $ac_status); } && {
19244 test -z "$ac_c_werror_flag" ||
19245 test ! -s conftest.err
19246 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019247 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019248else
Martin v. Löwis11437992002-04-12 09:54:03 +000019249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019250sed 's/^/| /' conftest.$ac_ext >&5
19251
Martin v. Löwiseba40652007-08-30 20:10:57 +000019252 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019254
19255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019256fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019257{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19258echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019259if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019260
19261cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019262#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019263_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019264
19265fi
19266
Martin v. Löwiseba40652007-08-30 20:10:57 +000019267{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19268echo $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 +000019269if test "${ac_cv_struct_tm+set}" = set; then
19270 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019271else
Martin v. Löwis11437992002-04-12 09:54:03 +000019272 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019273/* confdefs.h. */
19274_ACEOF
19275cat confdefs.h >>conftest.$ac_ext
19276cat >>conftest.$ac_ext <<_ACEOF
19277/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019278#include <sys/types.h>
19279#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019280
Martin v. Löwis11437992002-04-12 09:54:03 +000019281int
19282main ()
19283{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019284struct tm tm;
19285 int *p = &tm.tm_sec;
19286 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019287 ;
19288 return 0;
19289}
19290_ACEOF
19291rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019292if { (ac_try="$ac_compile"
19293case "(($ac_try" in
19294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19295 *) ac_try_echo=$ac_try;;
19296esac
19297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19298 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019300 grep -v '^ *+' conftest.er1 >conftest.err
19301 rm -f conftest.er1
19302 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019304 (exit $ac_status); } && {
19305 test -z "$ac_c_werror_flag" ||
19306 test ! -s conftest.err
19307 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019308 ac_cv_struct_tm=time.h
19309else
Martin v. Löwis11437992002-04-12 09:54:03 +000019310 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019311sed 's/^/| /' conftest.$ac_ext >&5
19312
Martin v. Löwiseba40652007-08-30 20:10:57 +000019313 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019314fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019315
19316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019318{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19319echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019320if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019321
19322cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019323#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019324_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019325
19326fi
19327
Martin v. Löwiseba40652007-08-30 20:10:57 +000019328{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19329echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019330if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19331 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019332else
Martin v. Löwis11437992002-04-12 09:54:03 +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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019339#include <sys/types.h>
19340#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019341
19342
Martin v. Löwis11437992002-04-12 09:54:03 +000019343int
19344main ()
19345{
19346static struct tm ac_aggr;
19347if (ac_aggr.tm_zone)
19348return 0;
19349 ;
19350 return 0;
19351}
19352_ACEOF
19353rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019354if { (ac_try="$ac_compile"
19355case "(($ac_try" in
19356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19357 *) ac_try_echo=$ac_try;;
19358esac
19359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19360 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019362 grep -v '^ *+' conftest.er1 >conftest.err
19363 rm -f conftest.er1
19364 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019366 (exit $ac_status); } && {
19367 test -z "$ac_c_werror_flag" ||
19368 test ! -s conftest.err
19369 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019370 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019371else
Martin v. Löwis11437992002-04-12 09:54:03 +000019372 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019373sed 's/^/| /' conftest.$ac_ext >&5
19374
Martin v. Löwiseba40652007-08-30 20:10:57 +000019375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019376/* confdefs.h. */
19377_ACEOF
19378cat confdefs.h >>conftest.$ac_ext
19379cat >>conftest.$ac_ext <<_ACEOF
19380/* end confdefs.h. */
19381#include <sys/types.h>
19382#include <$ac_cv_struct_tm>
19383
19384
19385int
19386main ()
19387{
19388static struct tm ac_aggr;
19389if (sizeof ac_aggr.tm_zone)
19390return 0;
19391 ;
19392 return 0;
19393}
19394_ACEOF
19395rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019396if { (ac_try="$ac_compile"
19397case "(($ac_try" in
19398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19399 *) ac_try_echo=$ac_try;;
19400esac
19401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19402 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019404 grep -v '^ *+' conftest.er1 >conftest.err
19405 rm -f conftest.er1
19406 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019408 (exit $ac_status); } && {
19409 test -z "$ac_c_werror_flag" ||
19410 test ! -s conftest.err
19411 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019412 ac_cv_member_struct_tm_tm_zone=yes
19413else
19414 echo "$as_me: failed program was:" >&5
19415sed 's/^/| /' conftest.$ac_ext >&5
19416
Martin v. Löwiseba40652007-08-30 20:10:57 +000019417 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019418fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019419
19420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019422
19423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019425{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19426echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019427if test $ac_cv_member_struct_tm_tm_zone = yes; then
19428
19429cat >>confdefs.h <<_ACEOF
19430#define HAVE_STRUCT_TM_TM_ZONE 1
19431_ACEOF
19432
19433
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019434fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019435
Martin v. Löwis11437992002-04-12 09:54:03 +000019436if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19437
19438cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019439#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019440_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019441
19442else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019443 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19444echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
19445if test "${ac_cv_have_decl_tzname+set}" = set; then
19446 echo $ECHO_N "(cached) $ECHO_C" >&6
19447else
19448 cat >conftest.$ac_ext <<_ACEOF
19449/* confdefs.h. */
19450_ACEOF
19451cat confdefs.h >>conftest.$ac_ext
19452cat >>conftest.$ac_ext <<_ACEOF
19453/* end confdefs.h. */
19454#include <time.h>
19455
19456int
19457main ()
19458{
19459#ifndef tzname
19460 (void) tzname;
19461#endif
19462
19463 ;
19464 return 0;
19465}
19466_ACEOF
19467rm -f conftest.$ac_objext
19468if { (ac_try="$ac_compile"
19469case "(($ac_try" in
19470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19471 *) ac_try_echo=$ac_try;;
19472esac
19473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19474 (eval "$ac_compile") 2>conftest.er1
19475 ac_status=$?
19476 grep -v '^ *+' conftest.er1 >conftest.err
19477 rm -f conftest.er1
19478 cat conftest.err >&5
19479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19480 (exit $ac_status); } && {
19481 test -z "$ac_c_werror_flag" ||
19482 test ! -s conftest.err
19483 } && test -s conftest.$ac_objext; then
19484 ac_cv_have_decl_tzname=yes
19485else
19486 echo "$as_me: failed program was:" >&5
19487sed 's/^/| /' conftest.$ac_ext >&5
19488
19489 ac_cv_have_decl_tzname=no
19490fi
19491
19492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19493fi
19494{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19495echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
19496if test $ac_cv_have_decl_tzname = yes; then
19497
19498cat >>confdefs.h <<_ACEOF
19499#define HAVE_DECL_TZNAME 1
19500_ACEOF
19501
19502
19503else
19504 cat >>confdefs.h <<_ACEOF
19505#define HAVE_DECL_TZNAME 0
19506_ACEOF
19507
19508
19509fi
19510
19511
19512 { echo "$as_me:$LINENO: checking for tzname" >&5
19513echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019514if test "${ac_cv_var_tzname+set}" = set; then
19515 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019516else
Martin v. Löwis11437992002-04-12 09:54:03 +000019517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019518/* confdefs.h. */
19519_ACEOF
19520cat confdefs.h >>conftest.$ac_ext
19521cat >>conftest.$ac_ext <<_ACEOF
19522/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019523#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000019524#if !HAVE_DECL_TZNAME
19525extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019526#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019527
Martin v. Löwis11437992002-04-12 09:54:03 +000019528int
19529main ()
19530{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019531return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019532 ;
19533 return 0;
19534}
19535_ACEOF
19536rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019537if { (ac_try="$ac_link"
19538case "(($ac_try" in
19539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19540 *) ac_try_echo=$ac_try;;
19541esac
19542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19543 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019545 grep -v '^ *+' conftest.er1 >conftest.err
19546 rm -f conftest.er1
19547 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019549 (exit $ac_status); } && {
19550 test -z "$ac_c_werror_flag" ||
19551 test ! -s conftest.err
19552 } && test -s conftest$ac_exeext &&
19553 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019554 ac_cv_var_tzname=yes
19555else
Martin v. Löwis11437992002-04-12 09:54:03 +000019556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019557sed 's/^/| /' conftest.$ac_ext >&5
19558
Martin v. Löwiseba40652007-08-30 20:10:57 +000019559 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561
19562rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019563 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019565{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19566echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019567 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019568
19569cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019570#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019571_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019572
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019573 fi
19574fi
19575
Martin v. Löwiseba40652007-08-30 20:10:57 +000019576{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19577echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019578if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
19579 echo $ECHO_N "(cached) $ECHO_C" >&6
19580else
19581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019582/* confdefs.h. */
19583_ACEOF
19584cat confdefs.h >>conftest.$ac_ext
19585cat >>conftest.$ac_ext <<_ACEOF
19586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019587$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019588int
19589main ()
19590{
19591static struct stat ac_aggr;
19592if (ac_aggr.st_rdev)
19593return 0;
19594 ;
19595 return 0;
19596}
19597_ACEOF
19598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019599if { (ac_try="$ac_compile"
19600case "(($ac_try" in
19601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19602 *) ac_try_echo=$ac_try;;
19603esac
19604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019607 grep -v '^ *+' conftest.er1 >conftest.err
19608 rm -f conftest.er1
19609 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019611 (exit $ac_status); } && {
19612 test -z "$ac_c_werror_flag" ||
19613 test ! -s conftest.err
19614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019615 ac_cv_member_struct_stat_st_rdev=yes
19616else
19617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019618sed 's/^/| /' conftest.$ac_ext >&5
19619
Martin v. Löwiseba40652007-08-30 20:10:57 +000019620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019621/* confdefs.h. */
19622_ACEOF
19623cat confdefs.h >>conftest.$ac_ext
19624cat >>conftest.$ac_ext <<_ACEOF
19625/* end confdefs.h. */
19626$ac_includes_default
19627int
19628main ()
19629{
19630static struct stat ac_aggr;
19631if (sizeof ac_aggr.st_rdev)
19632return 0;
19633 ;
19634 return 0;
19635}
19636_ACEOF
19637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019638if { (ac_try="$ac_compile"
19639case "(($ac_try" in
19640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19641 *) ac_try_echo=$ac_try;;
19642esac
19643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19644 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019646 grep -v '^ *+' conftest.er1 >conftest.err
19647 rm -f conftest.er1
19648 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019650 (exit $ac_status); } && {
19651 test -z "$ac_c_werror_flag" ||
19652 test ! -s conftest.err
19653 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019654 ac_cv_member_struct_stat_st_rdev=yes
19655else
19656 echo "$as_me: failed program was:" >&5
19657sed 's/^/| /' conftest.$ac_ext >&5
19658
Martin v. Löwiseba40652007-08-30 20:10:57 +000019659 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019661
19662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019664
19665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19668echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019669if test $ac_cv_member_struct_stat_st_rdev = yes; then
19670
19671cat >>confdefs.h <<_ACEOF
19672#define HAVE_STRUCT_STAT_ST_RDEV 1
19673_ACEOF
19674
19675
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019676fi
19677
Martin v. Löwiseba40652007-08-30 20:10:57 +000019678{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19679echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019680if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
19681 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019682else
Martin v. Löwis11437992002-04-12 09:54:03 +000019683 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019684/* confdefs.h. */
19685_ACEOF
19686cat confdefs.h >>conftest.$ac_ext
19687cat >>conftest.$ac_ext <<_ACEOF
19688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019689$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019690int
19691main ()
19692{
19693static struct stat ac_aggr;
19694if (ac_aggr.st_blksize)
19695return 0;
19696 ;
19697 return 0;
19698}
19699_ACEOF
19700rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019701if { (ac_try="$ac_compile"
19702case "(($ac_try" in
19703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19704 *) ac_try_echo=$ac_try;;
19705esac
19706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19707 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019709 grep -v '^ *+' conftest.er1 >conftest.err
19710 rm -f conftest.er1
19711 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019713 (exit $ac_status); } && {
19714 test -z "$ac_c_werror_flag" ||
19715 test ! -s conftest.err
19716 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019717 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019718else
Martin v. Löwis11437992002-04-12 09:54:03 +000019719 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019720sed 's/^/| /' conftest.$ac_ext >&5
19721
Martin v. Löwiseba40652007-08-30 20:10:57 +000019722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019723/* confdefs.h. */
19724_ACEOF
19725cat confdefs.h >>conftest.$ac_ext
19726cat >>conftest.$ac_ext <<_ACEOF
19727/* end confdefs.h. */
19728$ac_includes_default
19729int
19730main ()
19731{
19732static struct stat ac_aggr;
19733if (sizeof ac_aggr.st_blksize)
19734return 0;
19735 ;
19736 return 0;
19737}
19738_ACEOF
19739rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019740if { (ac_try="$ac_compile"
19741case "(($ac_try" in
19742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19743 *) ac_try_echo=$ac_try;;
19744esac
19745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19746 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019747 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019748 grep -v '^ *+' conftest.er1 >conftest.err
19749 rm -f conftest.er1
19750 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019752 (exit $ac_status); } && {
19753 test -z "$ac_c_werror_flag" ||
19754 test ! -s conftest.err
19755 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019756 ac_cv_member_struct_stat_st_blksize=yes
19757else
19758 echo "$as_me: failed program was:" >&5
19759sed 's/^/| /' conftest.$ac_ext >&5
19760
Martin v. Löwiseba40652007-08-30 20:10:57 +000019761 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019763
19764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019765fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019766
19767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019769{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19770echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019771if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019772
Martin v. Löwis11437992002-04-12 09:54:03 +000019773cat >>confdefs.h <<_ACEOF
19774#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19775_ACEOF
19776
19777
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019778fi
19779
Martin v. Löwiseba40652007-08-30 20:10:57 +000019780{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19781echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019782if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
19783 echo $ECHO_N "(cached) $ECHO_C" >&6
19784else
19785 cat >conftest.$ac_ext <<_ACEOF
19786/* confdefs.h. */
19787_ACEOF
19788cat confdefs.h >>conftest.$ac_ext
19789cat >>conftest.$ac_ext <<_ACEOF
19790/* end confdefs.h. */
19791$ac_includes_default
19792int
19793main ()
19794{
19795static struct stat ac_aggr;
19796if (ac_aggr.st_flags)
19797return 0;
19798 ;
19799 return 0;
19800}
19801_ACEOF
19802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019803if { (ac_try="$ac_compile"
19804case "(($ac_try" in
19805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19806 *) ac_try_echo=$ac_try;;
19807esac
19808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19809 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019810 ac_status=$?
19811 grep -v '^ *+' conftest.er1 >conftest.err
19812 rm -f conftest.er1
19813 cat conftest.err >&5
19814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019815 (exit $ac_status); } && {
19816 test -z "$ac_c_werror_flag" ||
19817 test ! -s conftest.err
19818 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019819 ac_cv_member_struct_stat_st_flags=yes
19820else
19821 echo "$as_me: failed program was:" >&5
19822sed 's/^/| /' conftest.$ac_ext >&5
19823
Martin v. Löwiseba40652007-08-30 20:10:57 +000019824 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019825/* confdefs.h. */
19826_ACEOF
19827cat confdefs.h >>conftest.$ac_ext
19828cat >>conftest.$ac_ext <<_ACEOF
19829/* end confdefs.h. */
19830$ac_includes_default
19831int
19832main ()
19833{
19834static struct stat ac_aggr;
19835if (sizeof ac_aggr.st_flags)
19836return 0;
19837 ;
19838 return 0;
19839}
19840_ACEOF
19841rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019842if { (ac_try="$ac_compile"
19843case "(($ac_try" in
19844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19845 *) ac_try_echo=$ac_try;;
19846esac
19847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19848 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019849 ac_status=$?
19850 grep -v '^ *+' conftest.er1 >conftest.err
19851 rm -f conftest.er1
19852 cat conftest.err >&5
19853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854 (exit $ac_status); } && {
19855 test -z "$ac_c_werror_flag" ||
19856 test ! -s conftest.err
19857 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019858 ac_cv_member_struct_stat_st_flags=yes
19859else
19860 echo "$as_me: failed program was:" >&5
19861sed 's/^/| /' conftest.$ac_ext >&5
19862
Martin v. Löwiseba40652007-08-30 20:10:57 +000019863 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019865
19866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019867fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019868
19869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019870fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019871{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19872echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019873if test $ac_cv_member_struct_stat_st_flags = yes; then
19874
19875cat >>confdefs.h <<_ACEOF
19876#define HAVE_STRUCT_STAT_ST_FLAGS 1
19877_ACEOF
19878
19879
19880fi
19881
Martin v. Löwiseba40652007-08-30 20:10:57 +000019882{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19883echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019884if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
19885 echo $ECHO_N "(cached) $ECHO_C" >&6
19886else
19887 cat >conftest.$ac_ext <<_ACEOF
19888/* confdefs.h. */
19889_ACEOF
19890cat confdefs.h >>conftest.$ac_ext
19891cat >>conftest.$ac_ext <<_ACEOF
19892/* end confdefs.h. */
19893$ac_includes_default
19894int
19895main ()
19896{
19897static struct stat ac_aggr;
19898if (ac_aggr.st_gen)
19899return 0;
19900 ;
19901 return 0;
19902}
19903_ACEOF
19904rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019905if { (ac_try="$ac_compile"
19906case "(($ac_try" in
19907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19908 *) ac_try_echo=$ac_try;;
19909esac
19910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019912 ac_status=$?
19913 grep -v '^ *+' conftest.er1 >conftest.err
19914 rm -f conftest.er1
19915 cat conftest.err >&5
19916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917 (exit $ac_status); } && {
19918 test -z "$ac_c_werror_flag" ||
19919 test ! -s conftest.err
19920 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019921 ac_cv_member_struct_stat_st_gen=yes
19922else
19923 echo "$as_me: failed program was:" >&5
19924sed 's/^/| /' conftest.$ac_ext >&5
19925
Martin v. Löwiseba40652007-08-30 20:10:57 +000019926 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019927/* confdefs.h. */
19928_ACEOF
19929cat confdefs.h >>conftest.$ac_ext
19930cat >>conftest.$ac_ext <<_ACEOF
19931/* end confdefs.h. */
19932$ac_includes_default
19933int
19934main ()
19935{
19936static struct stat ac_aggr;
19937if (sizeof ac_aggr.st_gen)
19938return 0;
19939 ;
19940 return 0;
19941}
19942_ACEOF
19943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944if { (ac_try="$ac_compile"
19945case "(($ac_try" in
19946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19947 *) ac_try_echo=$ac_try;;
19948esac
19949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19950 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019951 ac_status=$?
19952 grep -v '^ *+' conftest.er1 >conftest.err
19953 rm -f conftest.er1
19954 cat conftest.err >&5
19955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956 (exit $ac_status); } && {
19957 test -z "$ac_c_werror_flag" ||
19958 test ! -s conftest.err
19959 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019960 ac_cv_member_struct_stat_st_gen=yes
19961else
19962 echo "$as_me: failed program was:" >&5
19963sed 's/^/| /' conftest.$ac_ext >&5
19964
Martin v. Löwiseba40652007-08-30 20:10:57 +000019965 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019967
19968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019970
19971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019973{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
19974echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019975if test $ac_cv_member_struct_stat_st_gen = yes; then
19976
19977cat >>confdefs.h <<_ACEOF
19978#define HAVE_STRUCT_STAT_ST_GEN 1
19979_ACEOF
19980
19981
19982fi
19983
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
19985echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019986if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
19987 echo $ECHO_N "(cached) $ECHO_C" >&6
19988else
19989 cat >conftest.$ac_ext <<_ACEOF
19990/* confdefs.h. */
19991_ACEOF
19992cat confdefs.h >>conftest.$ac_ext
19993cat >>conftest.$ac_ext <<_ACEOF
19994/* end confdefs.h. */
19995$ac_includes_default
19996int
19997main ()
19998{
19999static struct stat ac_aggr;
20000if (ac_aggr.st_birthtime)
20001return 0;
20002 ;
20003 return 0;
20004}
20005_ACEOF
20006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020007if { (ac_try="$ac_compile"
20008case "(($ac_try" in
20009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20010 *) ac_try_echo=$ac_try;;
20011esac
20012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020014 ac_status=$?
20015 grep -v '^ *+' conftest.er1 >conftest.err
20016 rm -f conftest.er1
20017 cat conftest.err >&5
20018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020019 (exit $ac_status); } && {
20020 test -z "$ac_c_werror_flag" ||
20021 test ! -s conftest.err
20022 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020023 ac_cv_member_struct_stat_st_birthtime=yes
20024else
20025 echo "$as_me: failed program was:" >&5
20026sed 's/^/| /' conftest.$ac_ext >&5
20027
Martin v. Löwiseba40652007-08-30 20:10:57 +000020028 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020029/* confdefs.h. */
20030_ACEOF
20031cat confdefs.h >>conftest.$ac_ext
20032cat >>conftest.$ac_ext <<_ACEOF
20033/* end confdefs.h. */
20034$ac_includes_default
20035int
20036main ()
20037{
20038static struct stat ac_aggr;
20039if (sizeof ac_aggr.st_birthtime)
20040return 0;
20041 ;
20042 return 0;
20043}
20044_ACEOF
20045rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020046if { (ac_try="$ac_compile"
20047case "(($ac_try" in
20048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20049 *) ac_try_echo=$ac_try;;
20050esac
20051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020053 ac_status=$?
20054 grep -v '^ *+' conftest.er1 >conftest.err
20055 rm -f conftest.er1
20056 cat conftest.err >&5
20057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020058 (exit $ac_status); } && {
20059 test -z "$ac_c_werror_flag" ||
20060 test ! -s conftest.err
20061 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020062 ac_cv_member_struct_stat_st_birthtime=yes
20063else
20064 echo "$as_me: failed program was:" >&5
20065sed 's/^/| /' conftest.$ac_ext >&5
20066
Martin v. Löwiseba40652007-08-30 20:10:57 +000020067 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020068fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020069
20070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020072
20073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020075{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20076echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020077if test $ac_cv_member_struct_stat_st_birthtime = yes; then
20078
20079cat >>confdefs.h <<_ACEOF
20080#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20081_ACEOF
20082
20083
20084fi
20085
Martin v. Löwiseba40652007-08-30 20:10:57 +000020086{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20087echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020088if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
20089 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020090else
Martin v. Löwis11437992002-04-12 09:54:03 +000020091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020092/* confdefs.h. */
20093_ACEOF
20094cat confdefs.h >>conftest.$ac_ext
20095cat >>conftest.$ac_ext <<_ACEOF
20096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020097$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020098int
20099main ()
20100{
20101static struct stat ac_aggr;
20102if (ac_aggr.st_blocks)
20103return 0;
20104 ;
20105 return 0;
20106}
20107_ACEOF
20108rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020109if { (ac_try="$ac_compile"
20110case "(($ac_try" in
20111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20112 *) ac_try_echo=$ac_try;;
20113esac
20114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020117 grep -v '^ *+' conftest.er1 >conftest.err
20118 rm -f conftest.er1
20119 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020121 (exit $ac_status); } && {
20122 test -z "$ac_c_werror_flag" ||
20123 test ! -s conftest.err
20124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020125 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020126else
Martin v. Löwis11437992002-04-12 09:54:03 +000020127 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020128sed 's/^/| /' conftest.$ac_ext >&5
20129
Martin v. Löwiseba40652007-08-30 20:10:57 +000020130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020131/* confdefs.h. */
20132_ACEOF
20133cat confdefs.h >>conftest.$ac_ext
20134cat >>conftest.$ac_ext <<_ACEOF
20135/* end confdefs.h. */
20136$ac_includes_default
20137int
20138main ()
20139{
20140static struct stat ac_aggr;
20141if (sizeof ac_aggr.st_blocks)
20142return 0;
20143 ;
20144 return 0;
20145}
20146_ACEOF
20147rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020148if { (ac_try="$ac_compile"
20149case "(($ac_try" in
20150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20151 *) ac_try_echo=$ac_try;;
20152esac
20153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20154 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020156 grep -v '^ *+' conftest.er1 >conftest.err
20157 rm -f conftest.er1
20158 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020160 (exit $ac_status); } && {
20161 test -z "$ac_c_werror_flag" ||
20162 test ! -s conftest.err
20163 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020164 ac_cv_member_struct_stat_st_blocks=yes
20165else
20166 echo "$as_me: failed program was:" >&5
20167sed 's/^/| /' conftest.$ac_ext >&5
20168
Martin v. Löwiseba40652007-08-30 20:10:57 +000020169 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020170fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020171
20172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174
20175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020177{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20178echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020179if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020180
Martin v. Löwis11437992002-04-12 09:54:03 +000020181cat >>confdefs.h <<_ACEOF
20182#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20183_ACEOF
20184
20185
20186cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020187#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020188_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020189
20190else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020191 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020192 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020193 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20194 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020195esac
20196
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020197fi
20198
Michael W. Hudson54241132001-12-07 15:38:26 +000020199
Martin v. Löwis11437992002-04-12 09:54:03 +000020200
Martin v. Löwiseba40652007-08-30 20:10:57 +000020201{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20202echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020203if test "${ac_cv_header_time_altzone+set}" = set; then
20204 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020205else
Martin v. Löwis11437992002-04-12 09:54:03 +000020206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020207/* confdefs.h. */
20208_ACEOF
20209cat confdefs.h >>conftest.$ac_ext
20210cat >>conftest.$ac_ext <<_ACEOF
20211/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020212#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020213int
20214main ()
20215{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020216return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020217 ;
20218 return 0;
20219}
20220_ACEOF
20221rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020222if { (ac_try="$ac_compile"
20223case "(($ac_try" in
20224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20225 *) ac_try_echo=$ac_try;;
20226esac
20227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20228 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020230 grep -v '^ *+' conftest.er1 >conftest.err
20231 rm -f conftest.er1
20232 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020234 (exit $ac_status); } && {
20235 test -z "$ac_c_werror_flag" ||
20236 test ! -s conftest.err
20237 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020238 ac_cv_header_time_altzone=yes
20239else
Martin v. Löwis11437992002-04-12 09:54:03 +000020240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020241sed 's/^/| /' conftest.$ac_ext >&5
20242
Martin v. Löwiseba40652007-08-30 20:10:57 +000020243 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020244fi
20245
Martin v. Löwiseba40652007-08-30 20:10:57 +000020246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20247fi
20248
20249{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20250echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020251if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020252
20253cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020254#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020255_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020256
20257fi
20258
Guido van Rossumda88dad1995-01-26 00:46:29 +000020259was_it_defined=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020260{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20261echo $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 +000020262cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020263/* confdefs.h. */
20264_ACEOF
20265cat confdefs.h >>conftest.$ac_ext
20266cat >>conftest.$ac_ext <<_ACEOF
20267/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020268
20269#include <sys/types.h>
20270#include <sys/select.h>
20271#include <sys/time.h>
20272
Martin v. Löwis11437992002-04-12 09:54:03 +000020273int
20274main ()
20275{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020276;
Martin v. Löwis11437992002-04-12 09:54:03 +000020277 ;
20278 return 0;
20279}
20280_ACEOF
20281rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020282if { (ac_try="$ac_compile"
20283case "(($ac_try" in
20284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20285 *) ac_try_echo=$ac_try;;
20286esac
20287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20288 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020289 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020290 grep -v '^ *+' conftest.er1 >conftest.err
20291 rm -f conftest.er1
20292 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020294 (exit $ac_status); } && {
20295 test -z "$ac_c_werror_flag" ||
20296 test ! -s conftest.err
20297 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020298
20299
20300cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020301#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020302_ACEOF
20303
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020304 was_it_defined=yes
20305
Guido van Rossumf78abae1997-01-21 22:02:36 +000020306else
Martin v. Löwis11437992002-04-12 09:54:03 +000020307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020308sed 's/^/| /' conftest.$ac_ext >&5
20309
Brett Cannon19fab762007-06-02 03:02:29 +000020310
Martin v. Löwiseba40652007-08-30 20:10:57 +000020311fi
20312
20313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20314{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
20315echo "${ECHO_T}$was_it_defined" >&6; }
20316
20317{ echo "$as_me:$LINENO: checking for addrinfo" >&5
20318echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020319if test "${ac_cv_struct_addrinfo+set}" = set; then
20320 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020321else
Martin v. Löwis11437992002-04-12 09:54:03 +000020322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020323/* confdefs.h. */
20324_ACEOF
20325cat confdefs.h >>conftest.$ac_ext
20326cat >>conftest.$ac_ext <<_ACEOF
20327/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020328
20329# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020330int
20331main ()
20332{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020333struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020334 ;
20335 return 0;
20336}
20337_ACEOF
20338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020339if { (ac_try="$ac_compile"
20340case "(($ac_try" in
20341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20342 *) ac_try_echo=$ac_try;;
20343esac
20344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20345 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020347 grep -v '^ *+' conftest.er1 >conftest.err
20348 rm -f conftest.er1
20349 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020351 (exit $ac_status); } && {
20352 test -z "$ac_c_werror_flag" ||
20353 test ! -s conftest.err
20354 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020355 ac_cv_struct_addrinfo=yes
20356else
Martin v. Löwis11437992002-04-12 09:54:03 +000020357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020358sed 's/^/| /' conftest.$ac_ext >&5
20359
Martin v. Löwiseba40652007-08-30 20:10:57 +000020360 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020361fi
20362
Martin v. Löwiseba40652007-08-30 20:10:57 +000020363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20364fi
20365
20366{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20367echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020368if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020369
20370cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020371#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020372_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020373
20374fi
20375
Martin v. Löwiseba40652007-08-30 20:10:57 +000020376{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20377echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020378if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
20379 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020380else
Martin v. Löwis11437992002-04-12 09:54:03 +000020381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020382/* confdefs.h. */
20383_ACEOF
20384cat confdefs.h >>conftest.$ac_ext
20385cat >>conftest.$ac_ext <<_ACEOF
20386/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020387
20388# include <sys/types.h>
20389# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020390int
20391main ()
20392{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020393struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020394 ;
20395 return 0;
20396}
20397_ACEOF
20398rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020399if { (ac_try="$ac_compile"
20400case "(($ac_try" in
20401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20402 *) ac_try_echo=$ac_try;;
20403esac
20404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020407 grep -v '^ *+' conftest.er1 >conftest.err
20408 rm -f conftest.er1
20409 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020411 (exit $ac_status); } && {
20412 test -z "$ac_c_werror_flag" ||
20413 test ! -s conftest.err
20414 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020415 ac_cv_struct_sockaddr_storage=yes
20416else
Martin v. Löwis11437992002-04-12 09:54:03 +000020417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020418sed 's/^/| /' conftest.$ac_ext >&5
20419
Martin v. Löwiseba40652007-08-30 20:10:57 +000020420 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020421fi
20422
Martin v. Löwiseba40652007-08-30 20:10:57 +000020423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20424fi
20425
20426{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20427echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020428if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020429
20430cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020431#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020432_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020433
20434fi
20435
Guido van Rossum627b2d71993-12-24 10:39:16 +000020436# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020437
Michael W. Hudson54241132001-12-07 15:38:26 +000020438
Martin v. Löwiseba40652007-08-30 20:10:57 +000020439{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20440echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020441if test "${ac_cv_c_char_unsigned+set}" = set; then
20442 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020443else
Martin v. Löwis11437992002-04-12 09:54:03 +000020444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020445/* confdefs.h. */
20446_ACEOF
20447cat confdefs.h >>conftest.$ac_ext
20448cat >>conftest.$ac_ext <<_ACEOF
20449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020450$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020451int
20452main ()
20453{
20454static int test_array [1 - 2 * !(((char) -1) < 0)];
20455test_array [0] = 0
20456
20457 ;
20458 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020459}
Martin v. Löwis11437992002-04-12 09:54:03 +000020460_ACEOF
20461rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020462if { (ac_try="$ac_compile"
20463case "(($ac_try" in
20464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20465 *) ac_try_echo=$ac_try;;
20466esac
20467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20468 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020469 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020470 grep -v '^ *+' conftest.er1 >conftest.err
20471 rm -f conftest.er1
20472 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020474 (exit $ac_status); } && {
20475 test -z "$ac_c_werror_flag" ||
20476 test ! -s conftest.err
20477 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020478 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020479else
20480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020481sed 's/^/| /' conftest.$ac_ext >&5
20482
Martin v. Löwiseba40652007-08-30 20:10:57 +000020483 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020484fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020485
20486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020488{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20489echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020490if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020491 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020492#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020493_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020494
20495fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020496
Martin v. Löwiseba40652007-08-30 20:10:57 +000020497{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20498echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020499if test "${ac_cv_c_const+set}" = set; then
20500 echo $ECHO_N "(cached) $ECHO_C" >&6
20501else
20502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020503/* confdefs.h. */
20504_ACEOF
20505cat confdefs.h >>conftest.$ac_ext
20506cat >>conftest.$ac_ext <<_ACEOF
20507/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020508
Martin v. Löwis11437992002-04-12 09:54:03 +000020509int
20510main ()
20511{
20512/* FIXME: Include the comments suggested by Paul. */
20513#ifndef __cplusplus
20514 /* Ultrix mips cc rejects this. */
20515 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000020516 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020517 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020518 char const *const *pcpcc;
20519 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020520 /* NEC SVR4.0.2 mips cc rejects this. */
20521 struct point {int x, y;};
20522 static struct point const zero = {0,0};
20523 /* AIX XL C 1.02.0.0 rejects this.
20524 It does not let you subtract one const X* pointer from another in
20525 an arm of an if-expression whose if-part is not a constant
20526 expression */
20527 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000020528 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020529 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020530 ++pcpcc;
20531 ppc = (char**) pcpcc;
20532 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020533 { /* SCO 3.2v4 cc rejects this. */
20534 char *t;
20535 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020536
Martin v. Löwis11437992002-04-12 09:54:03 +000020537 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020538 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020539 }
20540 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20541 int x[] = {25, 17};
20542 const int *foo = &x[0];
20543 ++foo;
20544 }
20545 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20546 typedef const int *iptr;
20547 iptr p = 0;
20548 ++p;
20549 }
20550 { /* AIX XL C 1.02.0.0 rejects this saying
20551 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20552 struct s { int j; const int *ap[3]; };
20553 struct s *b; b->j = 5;
20554 }
20555 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20556 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020557 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020558 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020559 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020560#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020561
Martin v. Löwis11437992002-04-12 09:54:03 +000020562 ;
20563 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020564}
Martin v. Löwis11437992002-04-12 09:54:03 +000020565_ACEOF
20566rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020567if { (ac_try="$ac_compile"
20568case "(($ac_try" in
20569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20570 *) ac_try_echo=$ac_try;;
20571esac
20572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020575 grep -v '^ *+' conftest.er1 >conftest.err
20576 rm -f conftest.er1
20577 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020579 (exit $ac_status); } && {
20580 test -z "$ac_c_werror_flag" ||
20581 test ! -s conftest.err
20582 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020583 ac_cv_c_const=yes
20584else
Martin v. Löwis11437992002-04-12 09:54:03 +000020585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020586sed 's/^/| /' conftest.$ac_ext >&5
20587
Martin v. Löwiseba40652007-08-30 20:10:57 +000020588 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020590
20591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020593{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20594echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020595if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020596
20597cat >>confdefs.h <<\_ACEOF
20598#define const
20599_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020600
20601fi
20602
Michael W. Hudson54241132001-12-07 15:38:26 +000020603
Guido van Rossumda88dad1995-01-26 00:46:29 +000020604works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020605{ echo "$as_me:$LINENO: checking for working volatile" >&5
20606echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020607cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020608/* confdefs.h. */
20609_ACEOF
20610cat confdefs.h >>conftest.$ac_ext
20611cat >>conftest.$ac_ext <<_ACEOF
20612/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020613
Martin v. Löwis11437992002-04-12 09:54:03 +000020614int
20615main ()
20616{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020617volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020618 ;
20619 return 0;
20620}
20621_ACEOF
20622rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020623if { (ac_try="$ac_compile"
20624case "(($ac_try" in
20625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20626 *) ac_try_echo=$ac_try;;
20627esac
20628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020631 grep -v '^ *+' conftest.er1 >conftest.err
20632 rm -f conftest.er1
20633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020635 (exit $ac_status); } && {
20636 test -z "$ac_c_werror_flag" ||
20637 test ! -s conftest.err
20638 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020639 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020640else
Martin v. Löwis11437992002-04-12 09:54:03 +000020641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020642sed 's/^/| /' conftest.$ac_ext >&5
20643
Martin v. Löwis11437992002-04-12 09:54:03 +000020644
20645cat >>confdefs.h <<\_ACEOF
20646#define volatile
20647_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020648
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020649
Guido van Rossum627b2d71993-12-24 10:39:16 +000020650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020651
20652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20653{ echo "$as_me:$LINENO: result: $works" >&5
20654echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020655
Guido van Rossumda88dad1995-01-26 00:46:29 +000020656works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020657{ echo "$as_me:$LINENO: checking for working signed char" >&5
20658echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020660/* confdefs.h. */
20661_ACEOF
20662cat confdefs.h >>conftest.$ac_ext
20663cat >>conftest.$ac_ext <<_ACEOF
20664/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020665
Martin v. Löwis11437992002-04-12 09:54:03 +000020666int
20667main ()
20668{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020669signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 ;
20671 return 0;
20672}
20673_ACEOF
20674rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675if { (ac_try="$ac_compile"
20676case "(($ac_try" in
20677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20678 *) ac_try_echo=$ac_try;;
20679esac
20680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 grep -v '^ *+' conftest.er1 >conftest.err
20684 rm -f conftest.er1
20685 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687 (exit $ac_status); } && {
20688 test -z "$ac_c_werror_flag" ||
20689 test ! -s conftest.err
20690 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020691 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020692else
Martin v. Löwis11437992002-04-12 09:54:03 +000020693 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020694sed 's/^/| /' conftest.$ac_ext >&5
20695
Martin v. Löwis11437992002-04-12 09:54:03 +000020696
20697cat >>confdefs.h <<\_ACEOF
20698#define signed
20699_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020700
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020701
Guido van Rossum7f43da71994-08-01 12:15:30 +000020702fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020703
20704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20705{ echo "$as_me:$LINENO: result: $works" >&5
20706echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020707
Guido van Rossumda88dad1995-01-26 00:46:29 +000020708have_prototypes=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020709{ echo "$as_me:$LINENO: checking for prototypes" >&5
20710echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020711cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020712/* confdefs.h. */
20713_ACEOF
20714cat confdefs.h >>conftest.$ac_ext
20715cat >>conftest.$ac_ext <<_ACEOF
20716/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020717int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020718int
20719main ()
20720{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020721return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020722 ;
20723 return 0;
20724}
20725_ACEOF
20726rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020727if { (ac_try="$ac_compile"
20728case "(($ac_try" in
20729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20730 *) ac_try_echo=$ac_try;;
20731esac
20732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20733 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020735 grep -v '^ *+' conftest.er1 >conftest.err
20736 rm -f conftest.er1
20737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020739 (exit $ac_status); } && {
20740 test -z "$ac_c_werror_flag" ||
20741 test ! -s conftest.err
20742 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020743
20744
20745cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020746#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020747_ACEOF
20748
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020749 have_prototypes=yes
20750
Guido van Rossumf78abae1997-01-21 22:02:36 +000020751else
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020753sed 's/^/| /' conftest.$ac_ext >&5
20754
Martin v. Löwiseba40652007-08-30 20:10:57 +000020755
Guido van Rossum7f43da71994-08-01 12:15:30 +000020756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020757
20758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20759{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
20760echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020761
Guido van Rossumda88dad1995-01-26 00:46:29 +000020762works=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020763{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20764echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020766/* confdefs.h. */
20767_ACEOF
20768cat confdefs.h >>conftest.$ac_ext
20769cat >>conftest.$ac_ext <<_ACEOF
20770/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020771
20772#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020773int foo(int x, ...) {
20774 va_list va;
20775 va_start(va, x);
20776 va_arg(va, int);
20777 va_arg(va, char *);
20778 va_arg(va, double);
20779 return 0;
20780}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020781
Martin v. Löwis11437992002-04-12 09:54:03 +000020782int
20783main ()
20784{
Guido van Rossum90eea071996-08-30 20:58:57 +000020785return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020786 ;
20787 return 0;
20788}
20789_ACEOF
20790rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020791if { (ac_try="$ac_compile"
20792case "(($ac_try" in
20793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20794 *) ac_try_echo=$ac_try;;
20795esac
20796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20797 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020799 grep -v '^ *+' conftest.er1 >conftest.err
20800 rm -f conftest.er1
20801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020803 (exit $ac_status); } && {
20804 test -z "$ac_c_werror_flag" ||
20805 test ! -s conftest.err
20806 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020807
20808
20809cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020810#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020811_ACEOF
20812
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020813 works=yes
20814
Guido van Rossumf78abae1997-01-21 22:02:36 +000020815else
Martin v. Löwis11437992002-04-12 09:54:03 +000020816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020817sed 's/^/| /' conftest.$ac_ext >&5
20818
Martin v. Löwiseba40652007-08-30 20:10:57 +000020819
Guido van Rossum627b2d71993-12-24 10:39:16 +000020820fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821
20822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20823{ echo "$as_me:$LINENO: result: $works" >&5
20824echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020825
Martin v. Löwisd6320502004-08-12 13:45:08 +000020826# check for socketpair
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827{ echo "$as_me:$LINENO: checking for socketpair" >&5
20828echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020829cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020830/* confdefs.h. */
20831_ACEOF
20832cat confdefs.h >>conftest.$ac_ext
20833cat >>conftest.$ac_ext <<_ACEOF
20834/* end confdefs.h. */
20835
20836#include <sys/types.h>
20837#include <sys/socket.h>
20838
20839int
20840main ()
20841{
20842void *x=socketpair
20843 ;
20844 return 0;
20845}
20846_ACEOF
20847rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848if { (ac_try="$ac_compile"
20849case "(($ac_try" in
20850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20851 *) ac_try_echo=$ac_try;;
20852esac
20853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000020855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020856 grep -v '^ *+' conftest.er1 >conftest.err
20857 rm -f conftest.er1
20858 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020860 (exit $ac_status); } && {
20861 test -z "$ac_c_werror_flag" ||
20862 test ! -s conftest.err
20863 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000020864
20865cat >>confdefs.h <<\_ACEOF
20866#define HAVE_SOCKETPAIR 1
20867_ACEOF
20868
Martin v. Löwiseba40652007-08-30 20:10:57 +000020869 { echo "$as_me:$LINENO: result: yes" >&5
20870echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020871else
20872 echo "$as_me: failed program was:" >&5
20873sed 's/^/| /' conftest.$ac_ext >&5
20874
Martin v. Löwiseba40652007-08-30 20:10:57 +000020875 { echo "$as_me:$LINENO: result: no" >&5
20876echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020877
20878fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020879
20880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020881
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020882# check if sockaddr has sa_len member
Martin v. Löwiseba40652007-08-30 20:10:57 +000020883{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20884echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020886/* confdefs.h. */
20887_ACEOF
20888cat confdefs.h >>conftest.$ac_ext
20889cat >>conftest.$ac_ext <<_ACEOF
20890/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020891#include <sys/types.h>
20892#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020893int
20894main ()
20895{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020896struct sockaddr x;
20897x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020898 ;
20899 return 0;
20900}
20901_ACEOF
20902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020903if { (ac_try="$ac_compile"
20904case "(($ac_try" in
20905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20906 *) ac_try_echo=$ac_try;;
20907esac
20908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020911 grep -v '^ *+' conftest.er1 >conftest.err
20912 rm -f conftest.er1
20913 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020915 (exit $ac_status); } && {
20916 test -z "$ac_c_werror_flag" ||
20917 test ! -s conftest.err
20918 } && test -s conftest.$ac_objext; then
20919 { echo "$as_me:$LINENO: result: yes" >&5
20920echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020921
20922cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020923#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020924_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020925
20926else
Martin v. Löwis11437992002-04-12 09:54:03 +000020927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020928sed 's/^/| /' conftest.$ac_ext >&5
20929
Martin v. Löwiseba40652007-08-30 20:10:57 +000020930 { echo "$as_me:$LINENO: result: no" >&5
20931echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020932fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020933
20934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020935
Guido van Rossumda88dad1995-01-26 00:46:29 +000020936va_list_is_array=no
Martin v. Löwiseba40652007-08-30 20:10:57 +000020937{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
20938echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020940/* confdefs.h. */
20941_ACEOF
20942cat confdefs.h >>conftest.$ac_ext
20943cat >>conftest.$ac_ext <<_ACEOF
20944/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020945
20946#ifdef HAVE_STDARG_PROTOTYPES
20947#include <stdarg.h>
20948#else
20949#include <varargs.h>
20950#endif
20951
Martin v. Löwis11437992002-04-12 09:54:03 +000020952int
20953main ()
20954{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020955va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000020956 ;
20957 return 0;
20958}
20959_ACEOF
20960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961if { (ac_try="$ac_compile"
20962case "(($ac_try" in
20963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20964 *) ac_try_echo=$ac_try;;
20965esac
20966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020969 grep -v '^ *+' conftest.er1 >conftest.err
20970 rm -f conftest.er1
20971 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020973 (exit $ac_status); } && {
20974 test -z "$ac_c_werror_flag" ||
20975 test ! -s conftest.err
20976 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020977 :
20978else
Martin v. Löwis11437992002-04-12 09:54:03 +000020979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020980sed 's/^/| /' conftest.$ac_ext >&5
20981
Martin v. Löwis11437992002-04-12 09:54:03 +000020982
20983
20984cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020985#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020986_ACEOF
20987
Guido van Rossumda88dad1995-01-26 00:46:29 +000020988 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020989
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020991
20992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20993{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
20994echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020995
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000020996# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000020997
20998
20999
Martin v. Löwiseba40652007-08-30 20:10:57 +000021000{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21001echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021002if test "${ac_cv_func_gethostbyname_r+set}" = set; then
21003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021004else
Martin v. Löwis11437992002-04-12 09:54:03 +000021005 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021006/* confdefs.h. */
21007_ACEOF
21008cat confdefs.h >>conftest.$ac_ext
21009cat >>conftest.$ac_ext <<_ACEOF
21010/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021011/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21012 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21013#define gethostbyname_r innocuous_gethostbyname_r
21014
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021015/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021016 which can conflict with char gethostbyname_r (); below.
21017 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021018 <limits.h> exists even on freestanding compilers. */
21019
21020#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021021# include <limits.h>
21022#else
21023# include <assert.h>
21024#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021025
21026#undef gethostbyname_r
21027
Martin v. Löwiseba40652007-08-30 20:10:57 +000021028/* Override any GCC internal prototype to avoid an error.
21029 Use char because int might match the return type of a GCC
21030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021031#ifdef __cplusplus
21032extern "C"
21033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021034char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021035/* The GNU C library defines this for functions which it implements
21036 to always fail with ENOSYS. Some functions are actually named
21037 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021038#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021039choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021040#endif
21041
Skip Montanaro6dead952003-09-25 14:50:04 +000021042int
21043main ()
21044{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021045return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021046 ;
21047 return 0;
21048}
21049_ACEOF
21050rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021051if { (ac_try="$ac_link"
21052case "(($ac_try" in
21053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21054 *) ac_try_echo=$ac_try;;
21055esac
21056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21057 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021059 grep -v '^ *+' conftest.er1 >conftest.err
21060 rm -f conftest.er1
21061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021063 (exit $ac_status); } && {
21064 test -z "$ac_c_werror_flag" ||
21065 test ! -s conftest.err
21066 } && test -s conftest$ac_exeext &&
21067 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021068 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021069else
Martin v. Löwis11437992002-04-12 09:54:03 +000021070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021071sed 's/^/| /' conftest.$ac_ext >&5
21072
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021074fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021075
21076rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021077 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021079{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21080echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021081if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021082
Martin v. Löwis11437992002-04-12 09:54:03 +000021083 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021084#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021085_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021086
Martin v. Löwiseba40652007-08-30 20:10:57 +000021087 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21088echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021089 OLD_CFLAGS=$CFLAGS
21090 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021092/* confdefs.h. */
21093_ACEOF
21094cat confdefs.h >>conftest.$ac_ext
21095cat >>conftest.$ac_ext <<_ACEOF
21096/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021097
21098# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021099
Martin v. Löwis11437992002-04-12 09:54:03 +000021100int
21101main ()
21102{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021103
21104 char *name;
21105 struct hostent *he, *res;
21106 char buffer[2048];
21107 int buflen = 2048;
21108 int h_errnop;
21109
21110 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021111
21112 ;
21113 return 0;
21114}
21115_ACEOF
21116rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021117if { (ac_try="$ac_compile"
21118case "(($ac_try" in
21119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21120 *) ac_try_echo=$ac_try;;
21121esac
21122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021125 grep -v '^ *+' conftest.er1 >conftest.err
21126 rm -f conftest.er1
21127 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021129 (exit $ac_status); } && {
21130 test -z "$ac_c_werror_flag" ||
21131 test ! -s conftest.err
21132 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021133
21134 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021135#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021136_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021137
Martin v. Löwis11437992002-04-12 09:54:03 +000021138
21139cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021140#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021141_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021142
Martin v. Löwiseba40652007-08-30 20:10:57 +000021143 { echo "$as_me:$LINENO: result: yes" >&5
21144echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021145
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021146else
Martin v. Löwis11437992002-04-12 09:54:03 +000021147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021148sed 's/^/| /' conftest.$ac_ext >&5
21149
Martin v. Löwis11437992002-04-12 09:54:03 +000021150
Martin v. Löwiseba40652007-08-30 20:10:57 +000021151 { echo "$as_me:$LINENO: result: no" >&5
21152echo "${ECHO_T}no" >&6; }
21153 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21154echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021156/* confdefs.h. */
21157_ACEOF
21158cat confdefs.h >>conftest.$ac_ext
21159cat >>conftest.$ac_ext <<_ACEOF
21160/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021161
21162# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021163
Martin v. Löwis11437992002-04-12 09:54:03 +000021164int
21165main ()
21166{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021167
21168 char *name;
21169 struct hostent *he;
21170 char buffer[2048];
21171 int buflen = 2048;
21172 int h_errnop;
21173
21174 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021175
21176 ;
21177 return 0;
21178}
21179_ACEOF
21180rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021181if { (ac_try="$ac_compile"
21182case "(($ac_try" in
21183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21184 *) ac_try_echo=$ac_try;;
21185esac
21186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21187 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021188 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021189 grep -v '^ *+' conftest.er1 >conftest.err
21190 rm -f conftest.er1
21191 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021193 (exit $ac_status); } && {
21194 test -z "$ac_c_werror_flag" ||
21195 test ! -s conftest.err
21196 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021197
21198 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021199#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021200_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021201
Martin v. Löwis11437992002-04-12 09:54:03 +000021202
21203cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021204#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021205_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021206
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207 { echo "$as_me:$LINENO: result: yes" >&5
21208echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021209
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021210else
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021212sed 's/^/| /' conftest.$ac_ext >&5
21213
Martin v. Löwis11437992002-04-12 09:54:03 +000021214
Martin v. Löwiseba40652007-08-30 20:10:57 +000021215 { echo "$as_me:$LINENO: result: no" >&5
21216echo "${ECHO_T}no" >&6; }
21217 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21218echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021220/* confdefs.h. */
21221_ACEOF
21222cat confdefs.h >>conftest.$ac_ext
21223cat >>conftest.$ac_ext <<_ACEOF
21224/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021225
21226# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021227
Martin v. Löwis11437992002-04-12 09:54:03 +000021228int
21229main ()
21230{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021231
21232 char *name;
21233 struct hostent *he;
21234 struct hostent_data data;
21235
21236 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021237
21238 ;
21239 return 0;
21240}
21241_ACEOF
21242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021243if { (ac_try="$ac_compile"
21244case "(($ac_try" in
21245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21246 *) ac_try_echo=$ac_try;;
21247esac
21248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021251 grep -v '^ *+' conftest.er1 >conftest.err
21252 rm -f conftest.er1
21253 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021255 (exit $ac_status); } && {
21256 test -z "$ac_c_werror_flag" ||
21257 test ! -s conftest.err
21258 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021259
21260 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021261#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021262_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021263
Martin v. Löwis11437992002-04-12 09:54:03 +000021264
21265cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021266#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021267_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021268
Martin v. Löwiseba40652007-08-30 20:10:57 +000021269 { echo "$as_me:$LINENO: result: yes" >&5
21270echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021271
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021272else
Martin v. Löwis11437992002-04-12 09:54:03 +000021273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021274sed 's/^/| /' conftest.$ac_ext >&5
21275
Martin v. Löwis11437992002-04-12 09:54:03 +000021276
Martin v. Löwiseba40652007-08-30 20:10:57 +000021277 { echo "$as_me:$LINENO: result: no" >&5
21278echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021279
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021280fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021281
21282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021283
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021285
21286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021287
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021288fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021289
21290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021291 CFLAGS=$OLD_CFLAGS
21292
21293else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021294
Martin v. Löwis11437992002-04-12 09:54:03 +000021295
21296for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021297do
Martin v. Löwis11437992002-04-12 09:54:03 +000021298as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +000021299{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21300echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21301if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021303else
Martin v. Löwis11437992002-04-12 09:54:03 +000021304 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021305/* confdefs.h. */
21306_ACEOF
21307cat confdefs.h >>conftest.$ac_ext
21308cat >>conftest.$ac_ext <<_ACEOF
21309/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021310/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21311 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21312#define $ac_func innocuous_$ac_func
21313
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021314/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021315 which can conflict with char $ac_func (); below.
21316 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021317 <limits.h> exists even on freestanding compilers. */
21318
21319#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021320# include <limits.h>
21321#else
21322# include <assert.h>
21323#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021324
21325#undef $ac_func
21326
Martin v. Löwiseba40652007-08-30 20:10:57 +000021327/* Override any GCC internal prototype to avoid an error.
21328 Use char because int might match the return type of a GCC
21329 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021330#ifdef __cplusplus
21331extern "C"
21332#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021333char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021334/* The GNU C library defines this for functions which it implements
21335 to always fail with ENOSYS. Some functions are actually named
21336 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021338choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021339#endif
21340
Skip Montanaro6dead952003-09-25 14:50:04 +000021341int
21342main ()
21343{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021344return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021345 ;
21346 return 0;
21347}
21348_ACEOF
21349rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021350if { (ac_try="$ac_link"
21351case "(($ac_try" in
21352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21353 *) ac_try_echo=$ac_try;;
21354esac
21355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21356 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021358 grep -v '^ *+' conftest.er1 >conftest.err
21359 rm -f conftest.er1
21360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021362 (exit $ac_status); } && {
21363 test -z "$ac_c_werror_flag" ||
21364 test ! -s conftest.err
21365 } && test -s conftest$ac_exeext &&
21366 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021368else
Martin v. Löwis11437992002-04-12 09:54:03 +000021369 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021370sed 's/^/| /' conftest.$ac_ext >&5
21371
Martin v. Löwiseba40652007-08-30 20:10:57 +000021372 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021373fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021374
21375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021376 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021378ac_res=`eval echo '${'$as_ac_var'}'`
21379 { echo "$as_me:$LINENO: result: $ac_res" >&5
21380echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021381if test `eval echo '${'$as_ac_var'}'` = yes; then
21382 cat >>confdefs.h <<_ACEOF
21383#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21384_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021385
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021386fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021387done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021388
Michael W. Hudson54241132001-12-07 15:38:26 +000021389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021390fi
21391
Michael W. Hudson54241132001-12-07 15:38:26 +000021392
21393
21394
21395
21396
21397
Guido van Rossum627b2d71993-12-24 10:39:16 +000021398# checks for system services
21399# (none yet)
21400
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021401# Linux requires this for correct f.p. operations
Martin v. Löwiseba40652007-08-30 20:10:57 +000021402{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
21403echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021404if test "${ac_cv_func___fpu_control+set}" = set; then
21405 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021406else
Martin v. Löwis11437992002-04-12 09:54:03 +000021407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021408/* confdefs.h. */
21409_ACEOF
21410cat confdefs.h >>conftest.$ac_ext
21411cat >>conftest.$ac_ext <<_ACEOF
21412/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021413/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21414 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21415#define __fpu_control innocuous___fpu_control
21416
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021417/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021418 which can conflict with char __fpu_control (); below.
21419 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021420 <limits.h> exists even on freestanding compilers. */
21421
21422#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021423# include <limits.h>
21424#else
21425# include <assert.h>
21426#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021427
21428#undef __fpu_control
21429
Martin v. Löwiseba40652007-08-30 20:10:57 +000021430/* Override any GCC internal prototype to avoid an error.
21431 Use char because int might match the return type of a GCC
21432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021433#ifdef __cplusplus
21434extern "C"
21435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021436char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021437/* The GNU C library defines this for functions which it implements
21438 to always fail with ENOSYS. Some functions are actually named
21439 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021440#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021441choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021442#endif
21443
Skip Montanaro6dead952003-09-25 14:50:04 +000021444int
21445main ()
21446{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021447return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021448 ;
21449 return 0;
21450}
21451_ACEOF
21452rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021453if { (ac_try="$ac_link"
21454case "(($ac_try" in
21455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21456 *) ac_try_echo=$ac_try;;
21457esac
21458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21459 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021461 grep -v '^ *+' conftest.er1 >conftest.err
21462 rm -f conftest.er1
21463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021465 (exit $ac_status); } && {
21466 test -z "$ac_c_werror_flag" ||
21467 test ! -s conftest.err
21468 } && test -s conftest$ac_exeext &&
21469 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021470 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021471else
Martin v. Löwis11437992002-04-12 09:54:03 +000021472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021473sed 's/^/| /' conftest.$ac_ext >&5
21474
Martin v. Löwiseba40652007-08-30 20:10:57 +000021475 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021476fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021477
21478rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021479 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021481{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21482echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021483if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021484 :
21485else
Martin v. Löwis11437992002-04-12 09:54:03 +000021486
Martin v. Löwiseba40652007-08-30 20:10:57 +000021487{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21488echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021489if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
21490 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021491else
Martin v. Löwis11437992002-04-12 09:54:03 +000021492 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021493LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021495/* confdefs.h. */
21496_ACEOF
21497cat confdefs.h >>conftest.$ac_ext
21498cat >>conftest.$ac_ext <<_ACEOF
21499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021500
Martin v. Löwiseba40652007-08-30 20:10:57 +000021501/* Override any GCC internal prototype to avoid an error.
21502 Use char because int might match the return type of a GCC
21503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021504#ifdef __cplusplus
21505extern "C"
21506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021507char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021508int
21509main ()
21510{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021511return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021512 ;
21513 return 0;
21514}
21515_ACEOF
21516rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021517if { (ac_try="$ac_link"
21518case "(($ac_try" in
21519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21520 *) ac_try_echo=$ac_try;;
21521esac
21522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21523 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021524 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021525 grep -v '^ *+' conftest.er1 >conftest.err
21526 rm -f conftest.er1
21527 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021529 (exit $ac_status); } && {
21530 test -z "$ac_c_werror_flag" ||
21531 test ! -s conftest.err
21532 } && test -s conftest$ac_exeext &&
21533 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021534 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021535else
Martin v. Löwis11437992002-04-12 09:54:03 +000021536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021537sed 's/^/| /' conftest.$ac_ext >&5
21538
Martin v. Löwiseba40652007-08-30 20:10:57 +000021539 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021541
21542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021544LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021545fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021546{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21547echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021548if test $ac_cv_lib_ieee___fpu_control = yes; then
21549 cat >>confdefs.h <<_ACEOF
21550#define HAVE_LIBIEEE 1
21551_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021552
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021553 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021554
Guido van Rossum627b2d71993-12-24 10:39:16 +000021555fi
21556
Michael W. Hudson54241132001-12-07 15:38:26 +000021557
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021558fi
21559
Michael W. Hudson54241132001-12-07 15:38:26 +000021560
Guido van Rossum7f253911997-05-09 02:42:48 +000021561# Check for --with-fpectl
Martin v. Löwiseba40652007-08-30 20:10:57 +000021562{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21563echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021564
Martin v. Löwiseba40652007-08-30 20:10:57 +000021565# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021566if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021567 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021568if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021569then
21570
21571cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021572#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021573_ACEOF
21574
Martin v. Löwiseba40652007-08-30 20:10:57 +000021575 { echo "$as_me:$LINENO: result: yes" >&5
21576echo "${ECHO_T}yes" >&6; }
21577else { echo "$as_me:$LINENO: result: no" >&5
21578echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021579fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021580else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021581 { echo "$as_me:$LINENO: result: no" >&5
21582echo "${ECHO_T}no" >&6; }
21583fi
21584
Guido van Rossum7f253911997-05-09 02:42:48 +000021585
Guido van Rossum7f43da71994-08-01 12:15:30 +000021586# check for --with-libm=...
21587
Guido van Rossum563e7081996-09-10 18:20:48 +000021588case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021589Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000021590BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021591*) LIBM=-lm
21592esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000021593{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21594echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021595
Martin v. Löwiseba40652007-08-30 20:10:57 +000021596# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021597if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021599if test "$withval" = no
21600then LIBM=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021601 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
21602echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021603elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021604then LIBM=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021605 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21606echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021607else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21608echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
21609 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021610fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021611else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21613echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
21614fi
21615
Guido van Rossum7f43da71994-08-01 12:15:30 +000021616
21617# check for --with-libc=...
21618
Martin v. Löwiseba40652007-08-30 20:10:57 +000021619{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21620echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021621
Martin v. Löwiseba40652007-08-30 20:10:57 +000021622# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021623if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021624 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021625if test "$withval" = no
21626then LIBC=
Martin v. Löwiseba40652007-08-30 20:10:57 +000021627 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
21628echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021629elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021630then LIBC=$withval
Martin v. Löwiseba40652007-08-30 20:10:57 +000021631 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21632echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021633else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21634echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
21635 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021636fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021637else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021638 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21639echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
21640fi
21641
Guido van Rossum7f43da71994-08-01 12:15:30 +000021642
Christian Heimes0a8143f2007-12-18 23:22:54 +000021643# ************************************
21644# * Check for mathematical functions *
21645# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000021646
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021647LIBS_SAVE=$LIBS
21648LIBS="$LIBS $LIBM"
21649
Mark Dickinsone05e8402009-05-04 13:30:43 +000021650# Detect whether system arithmetic is subject to x87-style double
21651# rounding issues. The result of this test has little meaning on non
21652# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21653# mode is round-to-nearest and double rounding issues are present, and
21654# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
21655{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21656echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
21657if test "${ac_cv_x87_double_rounding+set}" = set; then
21658 echo $ECHO_N "(cached) $ECHO_C" >&6
21659else
21660
21661if test "$cross_compiling" = yes; then
21662 ac_cv_x87_double_rounding=no
21663else
21664 cat >conftest.$ac_ext <<_ACEOF
21665/* confdefs.h. */
21666_ACEOF
21667cat confdefs.h >>conftest.$ac_ext
21668cat >>conftest.$ac_ext <<_ACEOF
21669/* end confdefs.h. */
21670
21671#include <stdlib.h>
21672#include <math.h>
21673int main() {
21674 volatile double x, y, z;
21675 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21676 x = 0.99999999999999989; /* 1-2**-53 */
21677 y = 1./x;
21678 if (y != 1.)
21679 exit(0);
21680 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21681 x = 1e16;
21682 y = 2.99999;
21683 z = x + y;
21684 if (z != 1e16+4.)
21685 exit(0);
21686 /* both tests show evidence of double rounding */
21687 exit(1);
21688}
21689
21690_ACEOF
21691rm -f conftest$ac_exeext
21692if { (ac_try="$ac_link"
21693case "(($ac_try" in
21694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21695 *) ac_try_echo=$ac_try;;
21696esac
21697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21698 (eval "$ac_link") 2>&5
21699 ac_status=$?
21700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21701 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21702 { (case "(($ac_try" in
21703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21704 *) ac_try_echo=$ac_try;;
21705esac
21706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21707 (eval "$ac_try") 2>&5
21708 ac_status=$?
21709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21710 (exit $ac_status); }; }; then
21711 ac_cv_x87_double_rounding=no
21712else
21713 echo "$as_me: program exited with status $ac_status" >&5
21714echo "$as_me: failed program was:" >&5
21715sed 's/^/| /' conftest.$ac_ext >&5
21716
21717( exit $ac_status )
21718ac_cv_x87_double_rounding=yes
21719fi
21720rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21721fi
21722
21723
21724fi
21725
21726{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21727echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
21728if test "$ac_cv_x87_double_rounding" = yes
21729then
21730
21731cat >>confdefs.h <<\_ACEOF
21732#define X87_DOUBLE_ROUNDING 1
21733_ACEOF
21734
21735fi
21736
21737
Mark Dickinson265d7382008-04-21 22:32:24 +000021738# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21739# -0. on some architectures.
21740{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21741echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
21742if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
21743 echo $ECHO_N "(cached) $ECHO_C" >&6
21744else
21745
21746if test "$cross_compiling" = yes; then
21747 ac_cv_tanh_preserves_zero_sign=no
21748else
21749 cat >conftest.$ac_ext <<_ACEOF
21750/* confdefs.h. */
21751_ACEOF
21752cat confdefs.h >>conftest.$ac_ext
21753cat >>conftest.$ac_ext <<_ACEOF
21754/* end confdefs.h. */
21755
21756#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000021757#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000021758int main() {
21759 /* return 0 if either negative zeros don't exist
21760 on this platform or if negative zeros exist
21761 and tanh(-0.) == -0. */
21762 if (atan2(0., -1.) == atan2(-0., -1.) ||
21763 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21764 else exit(1);
21765}
21766
21767_ACEOF
21768rm -f conftest$ac_exeext
21769if { (ac_try="$ac_link"
21770case "(($ac_try" in
21771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21772 *) ac_try_echo=$ac_try;;
21773esac
21774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21775 (eval "$ac_link") 2>&5
21776 ac_status=$?
21777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21778 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21779 { (case "(($ac_try" in
21780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21781 *) ac_try_echo=$ac_try;;
21782esac
21783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21784 (eval "$ac_try") 2>&5
21785 ac_status=$?
21786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21787 (exit $ac_status); }; }; then
21788 ac_cv_tanh_preserves_zero_sign=yes
21789else
21790 echo "$as_me: program exited with status $ac_status" >&5
21791echo "$as_me: failed program was:" >&5
21792sed 's/^/| /' conftest.$ac_ext >&5
21793
21794( exit $ac_status )
21795ac_cv_tanh_preserves_zero_sign=no
21796fi
21797rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21798fi
21799
21800
21801fi
21802
21803{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21804echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
21805if test "$ac_cv_tanh_preserves_zero_sign" = yes
21806then
21807
21808cat >>confdefs.h <<\_ACEOF
21809#define TANH_PRESERVES_ZERO_SIGN 1
21810_ACEOF
21811
21812fi
21813
Martin v. Löwis11437992002-04-12 09:54:03 +000021814
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021815
Michael W. Hudson54241132001-12-07 15:38:26 +000021816
Christian Heimes0a8143f2007-12-18 23:22:54 +000021817
21818
21819
21820
21821
Mark Dickinsone05e8402009-05-04 13:30:43 +000021822for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000021823do
21824as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21825{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21826echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21827if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
21828 echo $ECHO_N "(cached) $ECHO_C" >&6
21829else
21830 cat >conftest.$ac_ext <<_ACEOF
21831/* confdefs.h. */
21832_ACEOF
21833cat confdefs.h >>conftest.$ac_ext
21834cat >>conftest.$ac_ext <<_ACEOF
21835/* end confdefs.h. */
21836/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21837 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21838#define $ac_func innocuous_$ac_func
21839
21840/* System header to define __stub macros and hopefully few prototypes,
21841 which can conflict with char $ac_func (); below.
21842 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21843 <limits.h> exists even on freestanding compilers. */
21844
21845#ifdef __STDC__
21846# include <limits.h>
21847#else
21848# include <assert.h>
21849#endif
21850
21851#undef $ac_func
21852
21853/* Override any GCC internal prototype to avoid an error.
21854 Use char because int might match the return type of a GCC
21855 builtin and then its argument prototype would still apply. */
21856#ifdef __cplusplus
21857extern "C"
21858#endif
21859char $ac_func ();
21860/* The GNU C library defines this for functions which it implements
21861 to always fail with ENOSYS. Some functions are actually named
21862 something starting with __ and the normal name is an alias. */
21863#if defined __stub_$ac_func || defined __stub___$ac_func
21864choke me
21865#endif
21866
21867int
21868main ()
21869{
21870return $ac_func ();
21871 ;
21872 return 0;
21873}
21874_ACEOF
21875rm -f conftest.$ac_objext conftest$ac_exeext
21876if { (ac_try="$ac_link"
21877case "(($ac_try" in
21878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21879 *) ac_try_echo=$ac_try;;
21880esac
21881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21882 (eval "$ac_link") 2>conftest.er1
21883 ac_status=$?
21884 grep -v '^ *+' conftest.er1 >conftest.err
21885 rm -f conftest.er1
21886 cat conftest.err >&5
21887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21888 (exit $ac_status); } && {
21889 test -z "$ac_c_werror_flag" ||
21890 test ! -s conftest.err
21891 } && test -s conftest$ac_exeext &&
21892 $as_test_x conftest$ac_exeext; then
21893 eval "$as_ac_var=yes"
21894else
21895 echo "$as_me: failed program was:" >&5
21896sed 's/^/| /' conftest.$ac_ext >&5
21897
21898 eval "$as_ac_var=no"
21899fi
21900
21901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21902 conftest$ac_exeext conftest.$ac_ext
21903fi
21904ac_res=`eval echo '${'$as_ac_var'}'`
21905 { echo "$as_me:$LINENO: result: $ac_res" >&5
21906echo "${ECHO_T}$ac_res" >&6; }
21907if test `eval echo '${'$as_ac_var'}'` = yes; then
21908 cat >>confdefs.h <<_ACEOF
21909#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21910_ACEOF
21911
21912fi
21913done
21914
Mark Dickinsone05e8402009-05-04 13:30:43 +000021915{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
21916echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
21917if test "${ac_cv_have_decl_isinf+set}" = set; then
21918 echo $ECHO_N "(cached) $ECHO_C" >&6
21919else
21920 cat >conftest.$ac_ext <<_ACEOF
21921/* confdefs.h. */
21922_ACEOF
21923cat confdefs.h >>conftest.$ac_ext
21924cat >>conftest.$ac_ext <<_ACEOF
21925/* end confdefs.h. */
21926#include <math.h>
21927
21928int
21929main ()
21930{
21931#ifndef isinf
21932 (void) isinf;
21933#endif
21934
21935 ;
21936 return 0;
21937}
21938_ACEOF
21939rm -f conftest.$ac_objext
21940if { (ac_try="$ac_compile"
21941case "(($ac_try" in
21942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21943 *) ac_try_echo=$ac_try;;
21944esac
21945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21946 (eval "$ac_compile") 2>conftest.er1
21947 ac_status=$?
21948 grep -v '^ *+' conftest.er1 >conftest.err
21949 rm -f conftest.er1
21950 cat conftest.err >&5
21951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21952 (exit $ac_status); } && {
21953 test -z "$ac_c_werror_flag" ||
21954 test ! -s conftest.err
21955 } && test -s conftest.$ac_objext; then
21956 ac_cv_have_decl_isinf=yes
21957else
21958 echo "$as_me: failed program was:" >&5
21959sed 's/^/| /' conftest.$ac_ext >&5
21960
21961 ac_cv_have_decl_isinf=no
21962fi
21963
21964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21965fi
21966{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
21967echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
21968if test $ac_cv_have_decl_isinf = yes; then
21969
21970cat >>confdefs.h <<_ACEOF
21971#define HAVE_DECL_ISINF 1
21972_ACEOF
21973
21974
21975else
21976 cat >>confdefs.h <<_ACEOF
21977#define HAVE_DECL_ISINF 0
21978_ACEOF
21979
21980
21981fi
21982{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
21983echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
21984if test "${ac_cv_have_decl_isnan+set}" = set; then
21985 echo $ECHO_N "(cached) $ECHO_C" >&6
21986else
21987 cat >conftest.$ac_ext <<_ACEOF
21988/* confdefs.h. */
21989_ACEOF
21990cat confdefs.h >>conftest.$ac_ext
21991cat >>conftest.$ac_ext <<_ACEOF
21992/* end confdefs.h. */
21993#include <math.h>
21994
21995int
21996main ()
21997{
21998#ifndef isnan
21999 (void) isnan;
22000#endif
22001
22002 ;
22003 return 0;
22004}
22005_ACEOF
22006rm -f conftest.$ac_objext
22007if { (ac_try="$ac_compile"
22008case "(($ac_try" in
22009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22010 *) ac_try_echo=$ac_try;;
22011esac
22012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22013 (eval "$ac_compile") 2>conftest.er1
22014 ac_status=$?
22015 grep -v '^ *+' conftest.er1 >conftest.err
22016 rm -f conftest.er1
22017 cat conftest.err >&5
22018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22019 (exit $ac_status); } && {
22020 test -z "$ac_c_werror_flag" ||
22021 test ! -s conftest.err
22022 } && test -s conftest.$ac_objext; then
22023 ac_cv_have_decl_isnan=yes
22024else
22025 echo "$as_me: failed program was:" >&5
22026sed 's/^/| /' conftest.$ac_ext >&5
22027
22028 ac_cv_have_decl_isnan=no
22029fi
22030
22031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22032fi
22033{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22034echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
22035if test $ac_cv_have_decl_isnan = yes; then
22036
22037cat >>confdefs.h <<_ACEOF
22038#define HAVE_DECL_ISNAN 1
22039_ACEOF
22040
22041
22042else
22043 cat >>confdefs.h <<_ACEOF
22044#define HAVE_DECL_ISNAN 0
22045_ACEOF
22046
22047
22048fi
22049{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22050echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
22051if test "${ac_cv_have_decl_isfinite+set}" = set; then
22052 echo $ECHO_N "(cached) $ECHO_C" >&6
22053else
22054 cat >conftest.$ac_ext <<_ACEOF
22055/* confdefs.h. */
22056_ACEOF
22057cat confdefs.h >>conftest.$ac_ext
22058cat >>conftest.$ac_ext <<_ACEOF
22059/* end confdefs.h. */
22060#include <math.h>
22061
22062int
22063main ()
22064{
22065#ifndef isfinite
22066 (void) isfinite;
22067#endif
22068
22069 ;
22070 return 0;
22071}
22072_ACEOF
22073rm -f conftest.$ac_objext
22074if { (ac_try="$ac_compile"
22075case "(($ac_try" in
22076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22077 *) ac_try_echo=$ac_try;;
22078esac
22079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22080 (eval "$ac_compile") 2>conftest.er1
22081 ac_status=$?
22082 grep -v '^ *+' conftest.er1 >conftest.err
22083 rm -f conftest.er1
22084 cat conftest.err >&5
22085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22086 (exit $ac_status); } && {
22087 test -z "$ac_c_werror_flag" ||
22088 test ! -s conftest.err
22089 } && test -s conftest.$ac_objext; then
22090 ac_cv_have_decl_isfinite=yes
22091else
22092 echo "$as_me: failed program was:" >&5
22093sed 's/^/| /' conftest.$ac_ext >&5
22094
22095 ac_cv_have_decl_isfinite=no
22096fi
22097
22098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22099fi
22100{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22101echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
22102if test $ac_cv_have_decl_isfinite = yes; then
22103
22104cat >>confdefs.h <<_ACEOF
22105#define HAVE_DECL_ISFINITE 1
22106_ACEOF
22107
22108
22109else
22110 cat >>confdefs.h <<_ACEOF
22111#define HAVE_DECL_ISFINITE 0
22112_ACEOF
22113
22114
22115fi
22116
22117
Christian Heimes0a8143f2007-12-18 23:22:54 +000022118
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022119LIBS=$LIBS_SAVE
22120
Guido van Rossumef2255b2000-03-10 22:30:29 +000022121# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022122if test "${ac_cv_header_wchar_h+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022123 { echo "$as_me:$LINENO: checking for wchar.h" >&5
22124echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022125if test "${ac_cv_header_wchar_h+set}" = set; then
22126 echo $ECHO_N "(cached) $ECHO_C" >&6
22127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022128{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22129echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022130else
Martin v. Löwis11437992002-04-12 09:54:03 +000022131 # Is the header compilable?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022132{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
22133echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022135/* confdefs.h. */
22136_ACEOF
22137cat confdefs.h >>conftest.$ac_ext
22138cat >>conftest.$ac_ext <<_ACEOF
22139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022140$ac_includes_default
22141#include <wchar.h>
22142_ACEOF
22143rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022144if { (ac_try="$ac_compile"
22145case "(($ac_try" in
22146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22147 *) ac_try_echo=$ac_try;;
22148esac
22149eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022152 grep -v '^ *+' conftest.er1 >conftest.err
22153 rm -f conftest.er1
22154 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022156 (exit $ac_status); } && {
22157 test -z "$ac_c_werror_flag" ||
22158 test ! -s conftest.err
22159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022160 ac_header_compiler=yes
22161else
22162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022163sed 's/^/| /' conftest.$ac_ext >&5
22164
Martin v. Löwiseba40652007-08-30 20:10:57 +000022165 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022167
22168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22169{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22170echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022171
22172# Is the header present?
Martin v. Löwiseba40652007-08-30 20:10:57 +000022173{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
22174echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022176/* confdefs.h. */
22177_ACEOF
22178cat confdefs.h >>conftest.$ac_ext
22179cat >>conftest.$ac_ext <<_ACEOF
22180/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022181#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022182_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000022183if { (ac_try="$ac_cpp conftest.$ac_ext"
22184case "(($ac_try" in
22185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22186 *) ac_try_echo=$ac_try;;
22187esac
22188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22189 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022190 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022191 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022192 rm -f conftest.er1
22193 cat conftest.err >&5
22194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022195 (exit $ac_status); } >/dev/null && {
22196 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22197 test ! -s conftest.err
22198 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022199 ac_header_preproc=yes
22200else
22201 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022202sed 's/^/| /' conftest.$ac_ext >&5
22203
Martin v. Löwis11437992002-04-12 09:54:03 +000022204 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022205fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022206
Martin v. Löwis11437992002-04-12 09:54:03 +000022207rm -f conftest.err conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022208{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22209echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022210
22211# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022212case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22213 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000022214 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22215echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022216 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22217echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
22218 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022219 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022220 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022221 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22222echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022223 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22224echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22225 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22226echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22227 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22228echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022229 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22230echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022231 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22232echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022233 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022234## ------------------------------------------------ ##
22235## Report this to http://www.python.org/python-bugs ##
22236## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022237_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000022238 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022239 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022240esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000022241{ echo "$as_me:$LINENO: checking for wchar.h" >&5
22242echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022243if test "${ac_cv_header_wchar_h+set}" = set; then
22244 echo $ECHO_N "(cached) $ECHO_C" >&6
22245else
22246 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022248{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22249echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022250
22251fi
22252if test $ac_cv_header_wchar_h = yes; then
22253
22254
22255cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022256#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022257_ACEOF
22258
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022259 wchar_h="yes"
22260
Guido van Rossumef2255b2000-03-10 22:30:29 +000022261else
Martin v. Löwis11437992002-04-12 09:54:03 +000022262 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022263
22264fi
22265
Michael W. Hudson54241132001-12-07 15:38:26 +000022266
Martin v. Löwis11437992002-04-12 09:54:03 +000022267
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022268# determine wchar_t size
22269if test "$wchar_h" = yes
22270then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022271 { echo "$as_me:$LINENO: checking for wchar_t" >&5
22272echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022273if test "${ac_cv_type_wchar_t+set}" = set; then
22274 echo $ECHO_N "(cached) $ECHO_C" >&6
22275else
22276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022277/* confdefs.h. */
22278_ACEOF
22279cat confdefs.h >>conftest.$ac_ext
22280cat >>conftest.$ac_ext <<_ACEOF
22281/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022282#include <wchar.h>
22283
Martin v. Löwiseba40652007-08-30 20:10:57 +000022284typedef wchar_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022285int
22286main ()
22287{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022289 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022290if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000022291 return 0;
22292 ;
22293 return 0;
22294}
22295_ACEOF
22296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022297if { (ac_try="$ac_compile"
22298case "(($ac_try" in
22299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22300 *) ac_try_echo=$ac_try;;
22301esac
22302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022305 grep -v '^ *+' conftest.er1 >conftest.err
22306 rm -f conftest.er1
22307 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022309 (exit $ac_status); } && {
22310 test -z "$ac_c_werror_flag" ||
22311 test ! -s conftest.err
22312 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022313 ac_cv_type_wchar_t=yes
22314else
22315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022316sed 's/^/| /' conftest.$ac_ext >&5
22317
Martin v. Löwiseba40652007-08-30 20:10:57 +000022318 ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022319fi
Brett Cannon19fab762007-06-02 03:02:29 +000022320
Martin v. Löwiseba40652007-08-30 20:10:57 +000022321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22322fi
22323{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
22324echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
22325
22326# The cast to long int works around a bug in the HP C Compiler
22327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22329# This bug is HP SR number 8606223364.
22330{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
22331echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022332if test "${ac_cv_sizeof_wchar_t+set}" = set; then
22333 echo $ECHO_N "(cached) $ECHO_C" >&6
22334else
Martin v. Löwis11437992002-04-12 09:54:03 +000022335 if test "$cross_compiling" = yes; then
22336 # Depending upon the size, compute the lo and hi bounds.
22337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022338/* confdefs.h. */
22339_ACEOF
22340cat confdefs.h >>conftest.$ac_ext
22341cat >>conftest.$ac_ext <<_ACEOF
22342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022343#include <wchar.h>
22344
Martin v. Löwiseba40652007-08-30 20:10:57 +000022345 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022346int
22347main ()
22348{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022349static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022350test_array [0] = 0
22351
22352 ;
22353 return 0;
22354}
22355_ACEOF
22356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022357if { (ac_try="$ac_compile"
22358case "(($ac_try" in
22359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22360 *) ac_try_echo=$ac_try;;
22361esac
22362eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22363 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022364 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022365 grep -v '^ *+' conftest.er1 >conftest.err
22366 rm -f conftest.er1
22367 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022369 (exit $ac_status); } && {
22370 test -z "$ac_c_werror_flag" ||
22371 test ! -s conftest.err
22372 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022373 ac_lo=0 ac_mid=0
22374 while :; do
22375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022376/* confdefs.h. */
22377_ACEOF
22378cat confdefs.h >>conftest.$ac_ext
22379cat >>conftest.$ac_ext <<_ACEOF
22380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022381#include <wchar.h>
22382
Martin v. Löwiseba40652007-08-30 20:10:57 +000022383 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022384int
22385main ()
22386{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022387static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022388test_array [0] = 0
22389
22390 ;
22391 return 0;
22392}
22393_ACEOF
22394rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022395if { (ac_try="$ac_compile"
22396case "(($ac_try" in
22397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22398 *) ac_try_echo=$ac_try;;
22399esac
22400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22401 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022403 grep -v '^ *+' conftest.er1 >conftest.err
22404 rm -f conftest.er1
22405 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022407 (exit $ac_status); } && {
22408 test -z "$ac_c_werror_flag" ||
22409 test ! -s conftest.err
22410 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022411 ac_hi=$ac_mid; break
22412else
22413 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022414sed 's/^/| /' conftest.$ac_ext >&5
22415
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416 ac_lo=`expr $ac_mid + 1`
22417 if test $ac_lo -le $ac_mid; then
22418 ac_lo= ac_hi=
22419 break
22420 fi
22421 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022422fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022423
22424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022425 done
22426else
22427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022428sed 's/^/| /' conftest.$ac_ext >&5
22429
Martin v. Löwiseba40652007-08-30 20:10:57 +000022430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022431/* confdefs.h. */
22432_ACEOF
22433cat confdefs.h >>conftest.$ac_ext
22434cat >>conftest.$ac_ext <<_ACEOF
22435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022436#include <wchar.h>
22437
Martin v. Löwiseba40652007-08-30 20:10:57 +000022438 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022439int
22440main ()
22441{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022442static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022443test_array [0] = 0
22444
22445 ;
22446 return 0;
22447}
22448_ACEOF
22449rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022450if { (ac_try="$ac_compile"
22451case "(($ac_try" in
22452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22453 *) ac_try_echo=$ac_try;;
22454esac
22455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22456 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022458 grep -v '^ *+' conftest.er1 >conftest.err
22459 rm -f conftest.er1
22460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022462 (exit $ac_status); } && {
22463 test -z "$ac_c_werror_flag" ||
22464 test ! -s conftest.err
22465 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022466 ac_hi=-1 ac_mid=-1
22467 while :; do
22468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022469/* confdefs.h. */
22470_ACEOF
22471cat confdefs.h >>conftest.$ac_ext
22472cat >>conftest.$ac_ext <<_ACEOF
22473/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022474#include <wchar.h>
22475
Martin v. Löwiseba40652007-08-30 20:10:57 +000022476 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022477int
22478main ()
22479{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022480static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022481test_array [0] = 0
22482
22483 ;
22484 return 0;
22485}
22486_ACEOF
22487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022488if { (ac_try="$ac_compile"
22489case "(($ac_try" in
22490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22491 *) ac_try_echo=$ac_try;;
22492esac
22493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022496 grep -v '^ *+' conftest.er1 >conftest.err
22497 rm -f conftest.er1
22498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022500 (exit $ac_status); } && {
22501 test -z "$ac_c_werror_flag" ||
22502 test ! -s conftest.err
22503 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022504 ac_lo=$ac_mid; break
22505else
22506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022507sed 's/^/| /' conftest.$ac_ext >&5
22508
Martin v. Löwiseba40652007-08-30 20:10:57 +000022509 ac_hi=`expr '(' $ac_mid ')' - 1`
22510 if test $ac_mid -le $ac_hi; then
22511 ac_lo= ac_hi=
22512 break
22513 fi
22514 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022516
22517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022518 done
22519else
22520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022521sed 's/^/| /' conftest.$ac_ext >&5
22522
Martin v. Löwiseba40652007-08-30 20:10:57 +000022523 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022525
22526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528
22529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022530# Binary search between lo and hi bounds.
22531while test "x$ac_lo" != "x$ac_hi"; do
22532 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022534/* confdefs.h. */
22535_ACEOF
22536cat confdefs.h >>conftest.$ac_ext
22537cat >>conftest.$ac_ext <<_ACEOF
22538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022539#include <wchar.h>
22540
Martin v. Löwiseba40652007-08-30 20:10:57 +000022541 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000022542int
22543main ()
22544{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022545static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022546test_array [0] = 0
22547
22548 ;
22549 return 0;
22550}
22551_ACEOF
22552rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022553if { (ac_try="$ac_compile"
22554case "(($ac_try" in
22555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22556 *) ac_try_echo=$ac_try;;
22557esac
22558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022561 grep -v '^ *+' conftest.er1 >conftest.err
22562 rm -f conftest.er1
22563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022565 (exit $ac_status); } && {
22566 test -z "$ac_c_werror_flag" ||
22567 test ! -s conftest.err
22568 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022569 ac_hi=$ac_mid
22570else
22571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022572sed 's/^/| /' conftest.$ac_ext >&5
22573
Martin v. Löwiseba40652007-08-30 20:10:57 +000022574 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022575fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022576
22577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022578done
22579case $ac_lo in
22580?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022581'') if test "$ac_cv_type_wchar_t" = yes; then
22582 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022583See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022584echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022585See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022586 { (exit 77); exit 77; }; }
22587 else
22588 ac_cv_sizeof_wchar_t=0
22589 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022590esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022591else
Martin v. Löwis11437992002-04-12 09:54:03 +000022592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022593/* confdefs.h. */
22594_ACEOF
22595cat confdefs.h >>conftest.$ac_ext
22596cat >>conftest.$ac_ext <<_ACEOF
22597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022598#include <wchar.h>
22599
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600 typedef wchar_t ac__type_sizeof_;
22601static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22602static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022603#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022604#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022605int
22606main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022607{
Martin v. Löwis11437992002-04-12 09:54:03 +000022608
22609 FILE *f = fopen ("conftest.val", "w");
22610 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000022611 return 1;
22612 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022613 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022614 long int i = longval ();
22615 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22616 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022617 fprintf (f, "%ld\n", i);
22618 }
22619 else
22620 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000022621 unsigned long int i = ulongval ();
22622 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22623 return 1;
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 fprintf (f, "%lu\n", i);
22625 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022626 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022627
22628 ;
22629 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022630}
Martin v. Löwis11437992002-04-12 09:54:03 +000022631_ACEOF
22632rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022633if { (ac_try="$ac_link"
22634case "(($ac_try" in
22635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22636 *) ac_try_echo=$ac_try;;
22637esac
22638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22639 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022640 ac_status=$?
22641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22642 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022643 { (case "(($ac_try" in
22644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22645 *) ac_try_echo=$ac_try;;
22646esac
22647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22648 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022649 ac_status=$?
22650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22651 (exit $ac_status); }; }; then
22652 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022653else
Martin v. Löwis11437992002-04-12 09:54:03 +000022654 echo "$as_me: program exited with status $ac_status" >&5
22655echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022656sed 's/^/| /' conftest.$ac_ext >&5
22657
Martin v. Löwis11437992002-04-12 09:54:03 +000022658( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000022659if test "$ac_cv_type_wchar_t" = yes; then
22660 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022661See \`config.log' for more details." >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022662echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022663See \`config.log' for more details." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664 { (exit 77); exit 77; }; }
22665 else
22666 ac_cv_sizeof_wchar_t=0
22667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022668fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022669rm -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 +000022670fi
22671rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022673{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22674echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
22675
22676
22677
Martin v. Löwis11437992002-04-12 09:54:03 +000022678cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022679#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022680_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022681
Michael W. Hudson54241132001-12-07 15:38:26 +000022682
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022683fi
22684
Martin v. Löwiseba40652007-08-30 20:10:57 +000022685{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22686echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022687have_ucs4_tcl=no
22688cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022689/* confdefs.h. */
22690_ACEOF
22691cat confdefs.h >>conftest.$ac_ext
22692cat >>conftest.$ac_ext <<_ACEOF
22693/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022694
22695#include <tcl.h>
22696#if TCL_UTF_MAX != 6
22697# error "NOT UCS4_TCL"
22698#endif
22699int
22700main ()
22701{
22702
22703 ;
22704 return 0;
22705}
22706_ACEOF
22707rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022708if { (ac_try="$ac_compile"
22709case "(($ac_try" in
22710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22711 *) ac_try_echo=$ac_try;;
22712esac
22713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022716 grep -v '^ *+' conftest.er1 >conftest.err
22717 rm -f conftest.er1
22718 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022720 (exit $ac_status); } && {
22721 test -z "$ac_c_werror_flag" ||
22722 test ! -s conftest.err
22723 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022724
22725
22726cat >>confdefs.h <<\_ACEOF
22727#define HAVE_UCS4_TCL 1
22728_ACEOF
22729
22730 have_ucs4_tcl=yes
22731
22732else
22733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022734sed 's/^/| /' conftest.$ac_ext >&5
22735
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022737fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738
22739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22740{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22741echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022742
Skip Montanaro6dead952003-09-25 14:50:04 +000022743# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022744if test "$wchar_h" = yes
22745then
22746 # check whether wchar_t is signed or not
Martin v. Löwiseba40652007-08-30 20:10:57 +000022747 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22748echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022749 if test "${ac_cv_wchar_t_signed+set}" = set; then
22750 echo $ECHO_N "(cached) $ECHO_C" >&6
22751else
22752
22753 if test "$cross_compiling" = yes; then
22754 ac_cv_wchar_t_signed=yes
22755else
22756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022757/* confdefs.h. */
22758_ACEOF
22759cat confdefs.h >>conftest.$ac_ext
22760cat >>conftest.$ac_ext <<_ACEOF
22761/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022762
22763 #include <wchar.h>
22764 int main()
22765 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000022766 /* Success: exit code 0 */
22767 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022768 }
22769
22770_ACEOF
22771rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022772if { (ac_try="$ac_link"
22773case "(($ac_try" in
22774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22775 *) ac_try_echo=$ac_try;;
22776esac
22777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22778 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022779 ac_status=$?
22780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000022782 { (case "(($ac_try" in
22783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22784 *) ac_try_echo=$ac_try;;
22785esac
22786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22787 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022788 ac_status=$?
22789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22790 (exit $ac_status); }; }; then
22791 ac_cv_wchar_t_signed=yes
22792else
22793 echo "$as_me: program exited with status $ac_status" >&5
22794echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022795sed 's/^/| /' conftest.$ac_ext >&5
22796
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022797( exit $ac_status )
22798ac_cv_wchar_t_signed=no
22799fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022800rm -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 +000022801fi
22802
Martin v. Löwiseba40652007-08-30 20:10:57 +000022803
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022804fi
22805
Martin v. Löwiseba40652007-08-30 20:10:57 +000022806 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22807echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
22808fi
22809
22810{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
22811echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
22812# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022813if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022814 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022815else
22816 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000022817fi
22818
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022819
22820if test $enable_unicode = yes
22821then
Martin v. Löwisfd917792001-06-27 20:22:04 +000022822 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022823 case "$have_ucs4_tcl" in
22824 yes) enable_unicode="ucs4"
22825 ;;
22826 *) enable_unicode="ucs2"
22827 ;;
22828 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022829fi
22830
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022831
22832
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022833case "$enable_unicode" in
22834ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000022835 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022836#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000022837_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022838
22839 ;;
22840ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000022841 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022842#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022843_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022844
22845 ;;
22846esac
22847
Michael W. Hudson54241132001-12-07 15:38:26 +000022848
Martin v. Löwis11437992002-04-12 09:54:03 +000022849
22850
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022851
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022852if test "$enable_unicode" = "no"
22853then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022854 UNICODE_OBJS=""
Martin v. Löwiseba40652007-08-30 20:10:57 +000022855 { echo "$as_me:$LINENO: result: not used" >&5
22856echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022857else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000022858 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000022859
22860cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022861#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022862_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022863
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022864
22865 # wchar_t is only usable if it maps to an unsigned type
22866 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022867 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022868 then
22869 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022870
Martin v. Löwis11437992002-04-12 09:54:03 +000022871cat >>confdefs.h <<\_ACEOF
22872#define HAVE_USABLE_WCHAR_T 1
22873_ACEOF
22874
22875 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022876#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022877_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022878
22879 elif test "$ac_cv_sizeof_short" = "$unicode_size"
22880 then
22881 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000022882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022883#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022884_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022885
22886 elif test "$ac_cv_sizeof_long" = "$unicode_size"
22887 then
22888 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000022889 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022890#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022891_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022892
22893 else
22894 PY_UNICODE_TYPE="no type found"
22895 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022896 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22897echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022898fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022899
22900# check for endianness
Martin v. Löwiseba40652007-08-30 20:10:57 +000022901{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22902echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022903if test "${ac_cv_c_bigendian+set}" = set; then
22904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022905else
Martin v. Löwis11437992002-04-12 09:54:03 +000022906 # See if sys/param.h defines the BYTE_ORDER macro.
22907cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022908/* confdefs.h. */
22909_ACEOF
22910cat confdefs.h >>conftest.$ac_ext
22911cat >>conftest.$ac_ext <<_ACEOF
22912/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022913#include <sys/types.h>
22914#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022915
Martin v. Löwis11437992002-04-12 09:54:03 +000022916int
22917main ()
22918{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022919#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
22920 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
Guido van Rossumef2255b2000-03-10 22:30:29 +000022921 bogus endian macros
22922#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022923
22924 ;
22925 return 0;
22926}
22927_ACEOF
22928rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022929if { (ac_try="$ac_compile"
22930case "(($ac_try" in
22931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22932 *) ac_try_echo=$ac_try;;
22933esac
22934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22935 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022937 grep -v '^ *+' conftest.er1 >conftest.err
22938 rm -f conftest.er1
22939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941 (exit $ac_status); } && {
22942 test -z "$ac_c_werror_flag" ||
22943 test ! -s conftest.err
22944 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022945 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000022946cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022947/* confdefs.h. */
22948_ACEOF
22949cat confdefs.h >>conftest.$ac_ext
22950cat >>conftest.$ac_ext <<_ACEOF
22951/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022952#include <sys/types.h>
22953#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000022954
Martin v. Löwis11437992002-04-12 09:54:03 +000022955int
22956main ()
22957{
Guido van Rossumef2255b2000-03-10 22:30:29 +000022958#if BYTE_ORDER != BIG_ENDIAN
22959 not big endian
22960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022961
22962 ;
22963 return 0;
22964}
22965_ACEOF
22966rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022967if { (ac_try="$ac_compile"
22968case "(($ac_try" in
22969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22970 *) ac_try_echo=$ac_try;;
22971esac
22972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022974 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022975 grep -v '^ *+' conftest.er1 >conftest.err
22976 rm -f conftest.er1
22977 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022979 (exit $ac_status); } && {
22980 test -z "$ac_c_werror_flag" ||
22981 test ! -s conftest.err
22982 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000022983 ac_cv_c_bigendian=yes
22984else
Martin v. Löwis11437992002-04-12 09:54:03 +000022985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022986sed 's/^/| /' conftest.$ac_ext >&5
22987
Martin v. Löwiseba40652007-08-30 20:10:57 +000022988 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022989fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022990
22991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000022992else
Martin v. Löwis11437992002-04-12 09:54:03 +000022993 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022994sed 's/^/| /' conftest.$ac_ext >&5
22995
Martin v. Löwiseba40652007-08-30 20:10:57 +000022996 # It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000022997if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022998 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000022999 ac_cv_c_bigendian=unknown
23000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023001/* confdefs.h. */
23002_ACEOF
23003cat confdefs.h >>conftest.$ac_ext
23004cat >>conftest.$ac_ext <<_ACEOF
23005/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023006short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23007short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023008void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023009short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23010short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000023011void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023012int
23013main ()
23014{
23015 _ascii (); _ebcdic ();
23016 ;
23017 return 0;
23018}
23019_ACEOF
23020rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023021if { (ac_try="$ac_compile"
23022case "(($ac_try" in
23023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23024 *) ac_try_echo=$ac_try;;
23025esac
23026eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023029 grep -v '^ *+' conftest.er1 >conftest.err
23030 rm -f conftest.er1
23031 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023033 (exit $ac_status); } && {
23034 test -z "$ac_c_werror_flag" ||
23035 test ! -s conftest.err
23036 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023037 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023038 ac_cv_c_bigendian=yes
23039fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023040if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023041 if test "$ac_cv_c_bigendian" = unknown; then
23042 ac_cv_c_bigendian=no
23043 else
23044 # finding both strings is unlikely to happen, but who knows?
23045 ac_cv_c_bigendian=unknown
23046 fi
23047fi
23048else
23049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023050sed 's/^/| /' conftest.$ac_ext >&5
23051
Martin v. Löwiseba40652007-08-30 20:10:57 +000023052
Martin v. Löwis11437992002-04-12 09:54:03 +000023053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023054
23055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023056else
23057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023058/* confdefs.h. */
23059_ACEOF
23060cat confdefs.h >>conftest.$ac_ext
23061cat >>conftest.$ac_ext <<_ACEOF
23062/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023063$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023064int
23065main ()
23066{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023067
Guido van Rossumef2255b2000-03-10 22:30:29 +000023068 /* Are we little or big endian? From Harbison&Steele. */
23069 union
23070 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023071 long int l;
23072 char c[sizeof (long int)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000023073 } u;
23074 u.l = 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023075 return u.c[sizeof (long int) - 1] == 1;
23076
23077 ;
23078 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023079}
Martin v. Löwis11437992002-04-12 09:54:03 +000023080_ACEOF
23081rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023082if { (ac_try="$ac_link"
23083case "(($ac_try" in
23084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23085 *) ac_try_echo=$ac_try;;
23086esac
23087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23088 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023089 ac_status=$?
23090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23091 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023092 { (case "(($ac_try" in
23093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23094 *) ac_try_echo=$ac_try;;
23095esac
23096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23097 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023098 ac_status=$?
23099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23100 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023101 ac_cv_c_bigendian=no
23102else
Martin v. Löwis11437992002-04-12 09:54:03 +000023103 echo "$as_me: program exited with status $ac_status" >&5
23104echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023105sed 's/^/| /' conftest.$ac_ext >&5
23106
Martin v. Löwis11437992002-04-12 09:54:03 +000023107( exit $ac_status )
23108ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023110rm -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 +000023111fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023112
23113
Martin v. Löwis11437992002-04-12 09:54:03 +000023114fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023115
23116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023117fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023118{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23119echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023120case $ac_cv_c_bigendian in
23121 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000023122
Martin v. Löwis11437992002-04-12 09:54:03 +000023123cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023124#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023125_ACEOF
23126 ;;
23127 no)
23128 ;;
23129 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000023130 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023131presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023132echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000023133presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
23134 { (exit 1); exit 1; }; } ;;
23135esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023136
Michael W. Hudson54241132001-12-07 15:38:26 +000023137
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023138# Check whether right shifting a negative integer extends the sign bit
23139# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwiseba40652007-08-30 20:10:57 +000023140{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23141echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023142if test "${ac_cv_rshift_extends_sign+set}" = set; then
23143 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023144else
Martin v. Löwis11437992002-04-12 09:54:03 +000023145
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023146if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023147 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023148else
Martin v. Löwis11437992002-04-12 09:54:03 +000023149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023150/* confdefs.h. */
23151_ACEOF
23152cat confdefs.h >>conftest.$ac_ext
23153cat >>conftest.$ac_ext <<_ACEOF
23154/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023155
23156int main()
23157{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023158 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023159}
23160
Martin v. Löwis11437992002-04-12 09:54:03 +000023161_ACEOF
23162rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023163if { (ac_try="$ac_link"
23164case "(($ac_try" in
23165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23166 *) ac_try_echo=$ac_try;;
23167esac
23168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23169 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023170 ac_status=$?
23171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023173 { (case "(($ac_try" in
23174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23175 *) ac_try_echo=$ac_try;;
23176esac
23177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23178 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023179 ac_status=$?
23180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23181 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023182 ac_cv_rshift_extends_sign=yes
23183else
Martin v. Löwis11437992002-04-12 09:54:03 +000023184 echo "$as_me: program exited with status $ac_status" >&5
23185echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023186sed 's/^/| /' conftest.$ac_ext >&5
23187
Martin v. Löwis11437992002-04-12 09:54:03 +000023188( exit $ac_status )
23189ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023190fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023191rm -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 +000023192fi
23193
Martin v. Löwiseba40652007-08-30 20:10:57 +000023194
23195fi
23196
23197{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23198echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023199if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023200then
Martin v. Löwis11437992002-04-12 09:54:03 +000023201
23202cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023203#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023204_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023205
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023206fi
23207
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023208# check for getc_unlocked and related locking functions
Martin v. Löwiseba40652007-08-30 20:10:57 +000023209{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23210echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023211if test "${ac_cv_have_getc_unlocked+set}" = set; then
23212 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023213else
Martin v. Löwis11437992002-04-12 09:54:03 +000023214
23215cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023216/* confdefs.h. */
23217_ACEOF
23218cat confdefs.h >>conftest.$ac_ext
23219cat >>conftest.$ac_ext <<_ACEOF
23220/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023221#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023222int
23223main ()
23224{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023225
23226 FILE *f = fopen("/dev/null", "r");
23227 flockfile(f);
23228 getc_unlocked(f);
23229 funlockfile(f);
23230
Martin v. Löwis11437992002-04-12 09:54:03 +000023231 ;
23232 return 0;
23233}
23234_ACEOF
23235rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236if { (ac_try="$ac_link"
23237case "(($ac_try" in
23238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23239 *) ac_try_echo=$ac_try;;
23240esac
23241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23242 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023244 grep -v '^ *+' conftest.er1 >conftest.err
23245 rm -f conftest.er1
23246 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023248 (exit $ac_status); } && {
23249 test -z "$ac_c_werror_flag" ||
23250 test ! -s conftest.err
23251 } && test -s conftest$ac_exeext &&
23252 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023253 ac_cv_have_getc_unlocked=yes
23254else
Martin v. Löwis11437992002-04-12 09:54:03 +000023255 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023256sed 's/^/| /' conftest.$ac_ext >&5
23257
Martin v. Löwiseba40652007-08-30 20:10:57 +000023258 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023260
23261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023262 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023263fi
23264
Martin v. Löwiseba40652007-08-30 20:10:57 +000023265{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23266echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023267if test "$ac_cv_have_getc_unlocked" = yes
23268then
Martin v. Löwis11437992002-04-12 09:54:03 +000023269
23270cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023271#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023272_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023273
23274fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023275
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023276# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023277# save the value of LIBS so we don't actually link Python with readline
23278LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023279
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023280# On some systems we need to link readline to a termcap compatible
23281# library. NOTE: Keep the precedence of listed libraries synchronised
23282# with setup.py.
23283py_cv_lib_readline=no
23284{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
23285echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
23286for py_libtermcap in "" ncursesw ncurses curses termcap; do
23287 if test -z "$py_libtermcap"; then
23288 READLINE_LIBS="-lreadline"
23289 else
23290 READLINE_LIBS="-lreadline -l$py_libtermcap"
23291 fi
23292 LIBS="$READLINE_LIBS $LIBS_no_readline"
23293 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023294/* confdefs.h. */
23295_ACEOF
23296cat confdefs.h >>conftest.$ac_ext
23297cat >>conftest.$ac_ext <<_ACEOF
23298/* end confdefs.h. */
23299
Martin v. Löwiseba40652007-08-30 20:10:57 +000023300/* Override any GCC internal prototype to avoid an error.
23301 Use char because int might match the return type of a GCC
23302 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023303#ifdef __cplusplus
23304extern "C"
23305#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023306char readline ();
23307int
23308main ()
23309{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023310return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023311 ;
23312 return 0;
23313}
23314_ACEOF
23315rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023316if { (ac_try="$ac_link"
23317case "(($ac_try" in
23318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23319 *) ac_try_echo=$ac_try;;
23320esac
23321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23322 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023323 ac_status=$?
23324 grep -v '^ *+' conftest.er1 >conftest.err
23325 rm -f conftest.er1
23326 cat conftest.err >&5
23327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023328 (exit $ac_status); } && {
23329 test -z "$ac_c_werror_flag" ||
23330 test ! -s conftest.err
23331 } && test -s conftest$ac_exeext &&
23332 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023333 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023334else
23335 echo "$as_me: failed program was:" >&5
23336sed 's/^/| /' conftest.$ac_ext >&5
23337
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023338
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023339fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023340
23341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023342 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023343 if test $py_cv_lib_readline = yes; then
23344 break
23345 fi
23346done
23347# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23348#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000023349if test $py_cv_lib_readline = no; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000023350 { echo "$as_me:$LINENO: result: none" >&5
23351echo "${ECHO_T}none" >&6; }
23352else
23353 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23354echo "${ECHO_T}$READLINE_LIBS" >&6; }
23355
23356cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023357#define HAVE_LIBREADLINE 1
23358_ACEOF
23359
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023360fi
23361
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023362# check for readline 2.1
Martin v. Löwiseba40652007-08-30 20:10:57 +000023363{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23364echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023365if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
23366 echo $ECHO_N "(cached) $ECHO_C" >&6
23367else
23368 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023369LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023370cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023371/* confdefs.h. */
23372_ACEOF
23373cat confdefs.h >>conftest.$ac_ext
23374cat >>conftest.$ac_ext <<_ACEOF
23375/* end confdefs.h. */
23376
Martin v. Löwiseba40652007-08-30 20:10:57 +000023377/* Override any GCC internal prototype to avoid an error.
23378 Use char because int might match the return type of a GCC
23379 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023380#ifdef __cplusplus
23381extern "C"
23382#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023383char rl_callback_handler_install ();
23384int
23385main ()
23386{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023387return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023388 ;
23389 return 0;
23390}
23391_ACEOF
23392rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023393if { (ac_try="$ac_link"
23394case "(($ac_try" in
23395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23396 *) ac_try_echo=$ac_try;;
23397esac
23398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23399 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023401 grep -v '^ *+' conftest.er1 >conftest.err
23402 rm -f conftest.er1
23403 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023405 (exit $ac_status); } && {
23406 test -z "$ac_c_werror_flag" ||
23407 test ! -s conftest.err
23408 } && test -s conftest$ac_exeext &&
23409 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023410 ac_cv_lib_readline_rl_callback_handler_install=yes
23411else
23412 echo "$as_me: failed program was:" >&5
23413sed 's/^/| /' conftest.$ac_ext >&5
23414
Martin v. Löwiseba40652007-08-30 20:10:57 +000023415 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023417
23418rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023419 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023420LIBS=$ac_check_lib_save_LIBS
23421fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023422{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23423echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023424if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
23425
23426cat >>confdefs.h <<\_ACEOF
23427#define HAVE_RL_CALLBACK 1
23428_ACEOF
23429
23430fi
23431
23432
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023433# check for readline 2.2
23434cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023435/* confdefs.h. */
23436_ACEOF
23437cat confdefs.h >>conftest.$ac_ext
23438cat >>conftest.$ac_ext <<_ACEOF
23439/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023440#include <readline/readline.h>
23441_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023442if { (ac_try="$ac_cpp conftest.$ac_ext"
23443case "(($ac_try" in
23444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23445 *) ac_try_echo=$ac_try;;
23446esac
23447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23448 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023449 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023450 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023451 rm -f conftest.er1
23452 cat conftest.err >&5
23453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023454 (exit $ac_status); } >/dev/null && {
23455 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23456 test ! -s conftest.err
23457 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023458 have_readline=yes
23459else
23460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023461sed 's/^/| /' conftest.$ac_ext >&5
23462
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023463 have_readline=no
23464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023465
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023466rm -f conftest.err conftest.$ac_ext
23467if test $have_readline = yes
23468then
23469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023470/* confdefs.h. */
23471_ACEOF
23472cat confdefs.h >>conftest.$ac_ext
23473cat >>conftest.$ac_ext <<_ACEOF
23474/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023475#include <readline/readline.h>
23476
23477_ACEOF
23478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023479 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023480
23481cat >>confdefs.h <<\_ACEOF
23482#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23483_ACEOF
23484
23485fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000023486rm -f -r conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023487
23488fi
23489
Martin v. Löwis0daad592001-09-30 21:09:59 +000023490# check for readline 4.0
Martin v. Löwiseba40652007-08-30 20:10:57 +000023491{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23492echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023493if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
23494 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023495else
Martin v. Löwis11437992002-04-12 09:54:03 +000023496 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023497LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023499/* confdefs.h. */
23500_ACEOF
23501cat confdefs.h >>conftest.$ac_ext
23502cat >>conftest.$ac_ext <<_ACEOF
23503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023504
Martin v. Löwiseba40652007-08-30 20:10:57 +000023505/* Override any GCC internal prototype to avoid an error.
23506 Use char because int might match the return type of a GCC
23507 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023508#ifdef __cplusplus
23509extern "C"
23510#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023511char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023512int
23513main ()
23514{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023515return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023516 ;
23517 return 0;
23518}
23519_ACEOF
23520rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023521if { (ac_try="$ac_link"
23522case "(($ac_try" in
23523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23524 *) ac_try_echo=$ac_try;;
23525esac
23526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23527 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023529 grep -v '^ *+' conftest.er1 >conftest.err
23530 rm -f conftest.er1
23531 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023533 (exit $ac_status); } && {
23534 test -z "$ac_c_werror_flag" ||
23535 test ! -s conftest.err
23536 } && test -s conftest$ac_exeext &&
23537 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023538 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023539else
Martin v. Löwis11437992002-04-12 09:54:03 +000023540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023541sed 's/^/| /' conftest.$ac_ext >&5
23542
Martin v. Löwiseba40652007-08-30 20:10:57 +000023543 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023545
23546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023548LIBS=$ac_check_lib_save_LIBS
23549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023550{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23551echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023552if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023553
Martin v. Löwis11437992002-04-12 09:54:03 +000023554cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023555#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023556_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023557
Martin v. Löwis0daad592001-09-30 21:09:59 +000023558fi
23559
Michael W. Hudson54241132001-12-07 15:38:26 +000023560
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023561# also in 4.0
23562{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23563echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
23564if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
23565 echo $ECHO_N "(cached) $ECHO_C" >&6
23566else
23567 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023568LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000023569cat >conftest.$ac_ext <<_ACEOF
23570/* confdefs.h. */
23571_ACEOF
23572cat confdefs.h >>conftest.$ac_ext
23573cat >>conftest.$ac_ext <<_ACEOF
23574/* end confdefs.h. */
23575
23576/* Override any GCC internal prototype to avoid an error.
23577 Use char because int might match the return type of a GCC
23578 builtin and then its argument prototype would still apply. */
23579#ifdef __cplusplus
23580extern "C"
23581#endif
23582char rl_completion_display_matches_hook ();
23583int
23584main ()
23585{
23586return rl_completion_display_matches_hook ();
23587 ;
23588 return 0;
23589}
23590_ACEOF
23591rm -f conftest.$ac_objext conftest$ac_exeext
23592if { (ac_try="$ac_link"
23593case "(($ac_try" in
23594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23595 *) ac_try_echo=$ac_try;;
23596esac
23597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23598 (eval "$ac_link") 2>conftest.er1
23599 ac_status=$?
23600 grep -v '^ *+' conftest.er1 >conftest.err
23601 rm -f conftest.er1
23602 cat conftest.err >&5
23603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23604 (exit $ac_status); } && {
23605 test -z "$ac_c_werror_flag" ||
23606 test ! -s conftest.err
23607 } && test -s conftest$ac_exeext &&
23608 $as_test_x conftest$ac_exeext; then
23609 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23610else
23611 echo "$as_me: failed program was:" >&5
23612sed 's/^/| /' conftest.$ac_ext >&5
23613
23614 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23615fi
23616
23617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23618 conftest$ac_exeext conftest.$ac_ext
23619LIBS=$ac_check_lib_save_LIBS
23620fi
23621{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23622echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23623if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
23624
23625cat >>confdefs.h <<\_ACEOF
23626#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23627_ACEOF
23628
23629fi
23630
23631
Martin v. Löwis0daad592001-09-30 21:09:59 +000023632# check for readline 4.2
Martin v. Löwiseba40652007-08-30 20:10:57 +000023633{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23634echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023635if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
23636 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023637else
Martin v. Löwis11437992002-04-12 09:54:03 +000023638 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000023639LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023641/* confdefs.h. */
23642_ACEOF
23643cat confdefs.h >>conftest.$ac_ext
23644cat >>conftest.$ac_ext <<_ACEOF
23645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023646
Martin v. Löwiseba40652007-08-30 20:10:57 +000023647/* Override any GCC internal prototype to avoid an error.
23648 Use char because int might match the return type of a GCC
23649 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023650#ifdef __cplusplus
23651extern "C"
23652#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023653char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023654int
23655main ()
23656{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023657return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023658 ;
23659 return 0;
23660}
23661_ACEOF
23662rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023663if { (ac_try="$ac_link"
23664case "(($ac_try" in
23665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23666 *) ac_try_echo=$ac_try;;
23667esac
23668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23669 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023671 grep -v '^ *+' conftest.er1 >conftest.err
23672 rm -f conftest.er1
23673 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023675 (exit $ac_status); } && {
23676 test -z "$ac_c_werror_flag" ||
23677 test ! -s conftest.err
23678 } && test -s conftest$ac_exeext &&
23679 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023680 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023681else
Martin v. Löwis11437992002-04-12 09:54:03 +000023682 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023683sed 's/^/| /' conftest.$ac_ext >&5
23684
Martin v. Löwiseba40652007-08-30 20:10:57 +000023685 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023687
23688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023690LIBS=$ac_check_lib_save_LIBS
23691fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023692{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23693echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023694if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023695
Martin v. Löwis11437992002-04-12 09:54:03 +000023696cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023697#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023698_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023699
Guido van Rossum353ae582001-07-10 16:45:32 +000023700fi
23701
Jack Jansendd19cf82001-12-06 22:36:17 +000023702
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023703# also in readline 4.2
23704cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023705/* confdefs.h. */
23706_ACEOF
23707cat confdefs.h >>conftest.$ac_ext
23708cat >>conftest.$ac_ext <<_ACEOF
23709/* end confdefs.h. */
23710#include <readline/readline.h>
23711_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023712if { (ac_try="$ac_cpp conftest.$ac_ext"
23713case "(($ac_try" in
23714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23715 *) ac_try_echo=$ac_try;;
23716esac
23717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23718 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023719 ac_status=$?
23720 grep -v '^ *+' conftest.er1 >conftest.err
23721 rm -f conftest.er1
23722 cat conftest.err >&5
23723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023724 (exit $ac_status); } >/dev/null && {
23725 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23726 test ! -s conftest.err
23727 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023728 have_readline=yes
23729else
23730 echo "$as_me: failed program was:" >&5
23731sed 's/^/| /' conftest.$ac_ext >&5
23732
23733 have_readline=no
23734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023735
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023736rm -f conftest.err conftest.$ac_ext
23737if test $have_readline = yes
23738then
23739 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023740/* confdefs.h. */
23741_ACEOF
23742cat confdefs.h >>conftest.$ac_ext
23743cat >>conftest.$ac_ext <<_ACEOF
23744/* end confdefs.h. */
23745#include <readline/readline.h>
23746
23747_ACEOF
23748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23749 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
23750
23751cat >>confdefs.h <<\_ACEOF
23752#define HAVE_RL_CATCH_SIGNAL 1
23753_ACEOF
23754
23755fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000023756rm -f -r conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023757
23758fi
23759
Martin v. Löwis82bca632006-02-10 20:49:30 +000023760# End of readline checks: restore LIBS
23761LIBS=$LIBS_no_readline
23762
Martin v. Löwiseba40652007-08-30 20:10:57 +000023763{ echo "$as_me:$LINENO: checking for broken nice()" >&5
23764echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023765if test "${ac_cv_broken_nice+set}" = set; then
23766 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000023767else
Martin v. Löwis11437992002-04-12 09:54:03 +000023768
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023769if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023770 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023771else
Martin v. Löwis11437992002-04-12 09:54:03 +000023772 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023773/* confdefs.h. */
23774_ACEOF
23775cat confdefs.h >>conftest.$ac_ext
23776cat >>conftest.$ac_ext <<_ACEOF
23777/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023778
23779int main()
23780{
23781 int val1 = nice(1);
23782 if (val1 != -1 && val1 == nice(2))
23783 exit(0);
23784 exit(1);
23785}
23786
Martin v. Löwis11437992002-04-12 09:54:03 +000023787_ACEOF
23788rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023789if { (ac_try="$ac_link"
23790case "(($ac_try" in
23791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23792 *) ac_try_echo=$ac_try;;
23793esac
23794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23795 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023796 ac_status=$?
23797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023799 { (case "(($ac_try" in
23800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23801 *) ac_try_echo=$ac_try;;
23802esac
23803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23804 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023805 ac_status=$?
23806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23807 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023808 ac_cv_broken_nice=yes
23809else
Martin v. Löwis11437992002-04-12 09:54:03 +000023810 echo "$as_me: program exited with status $ac_status" >&5
23811echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023812sed 's/^/| /' conftest.$ac_ext >&5
23813
Martin v. Löwis11437992002-04-12 09:54:03 +000023814( exit $ac_status )
23815ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023817rm -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 +000023818fi
23819
Martin v. Löwiseba40652007-08-30 20:10:57 +000023820
23821fi
23822
23823{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
23824echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023825if test "$ac_cv_broken_nice" = yes
23826then
Martin v. Löwis11437992002-04-12 09:54:03 +000023827
23828cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023829#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023830_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000023831
23832fi
23833
Martin v. Löwiseba40652007-08-30 20:10:57 +000023834{ echo "$as_me:$LINENO: checking for broken poll()" >&5
23835echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023836if test "$cross_compiling" = yes; then
23837 ac_cv_broken_poll=no
23838else
23839 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023840/* confdefs.h. */
23841_ACEOF
23842cat confdefs.h >>conftest.$ac_ext
23843cat >>conftest.$ac_ext <<_ACEOF
23844/* end confdefs.h. */
23845
23846#include <poll.h>
23847
23848int main (void)
23849 {
23850 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
23851
23852 close (42);
23853
23854 int poll_test = poll (&poll_struct, 1, 0);
23855
23856 if (poll_test < 0)
23857 {
23858 exit(0);
23859 }
23860 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
23861 {
23862 exit(0);
23863 }
23864 else
23865 {
23866 exit(1);
23867 }
23868 }
23869
23870_ACEOF
23871rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023872if { (ac_try="$ac_link"
23873case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
23877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23878 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023879 ac_status=$?
23880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23881 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023882 { (case "(($ac_try" in
23883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23884 *) ac_try_echo=$ac_try;;
23885esac
23886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23887 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023888 ac_status=$?
23889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23890 (exit $ac_status); }; }; then
23891 ac_cv_broken_poll=yes
23892else
23893 echo "$as_me: program exited with status $ac_status" >&5
23894echo "$as_me: failed program was:" >&5
23895sed 's/^/| /' conftest.$ac_ext >&5
23896
23897( exit $ac_status )
23898ac_cv_broken_poll=no
23899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023900rm -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 +000023901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023902
23903
23904{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
23905echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000023906if test "$ac_cv_broken_poll" = yes
23907then
23908
23909cat >>confdefs.h <<\_ACEOF
23910#define HAVE_BROKEN_POLL 1
23911_ACEOF
23912
23913fi
23914
Brett Cannon43802422005-02-10 20:48:03 +000023915# 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 +000023916# (which is not required by ISO C or UNIX spec) and/or if we support
23917# tzname[]
Martin v. Löwiseba40652007-08-30 20:10:57 +000023918{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
23919echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000023920if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
23921 echo $ECHO_N "(cached) $ECHO_C" >&6
23922else
23923 cat >conftest.$ac_ext <<_ACEOF
23924/* confdefs.h. */
23925_ACEOF
23926cat confdefs.h >>conftest.$ac_ext
23927cat >>conftest.$ac_ext <<_ACEOF
23928/* end confdefs.h. */
23929#include <sys/types.h>
23930#include <$ac_cv_struct_tm>
23931
23932
23933int
23934main ()
23935{
23936static struct tm ac_aggr;
23937if (ac_aggr.tm_zone)
23938return 0;
23939 ;
23940 return 0;
23941}
23942_ACEOF
23943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023944if { (ac_try="$ac_compile"
23945case "(($ac_try" in
23946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23947 *) ac_try_echo=$ac_try;;
23948esac
23949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23950 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023951 ac_status=$?
23952 grep -v '^ *+' conftest.er1 >conftest.err
23953 rm -f conftest.er1
23954 cat conftest.err >&5
23955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023956 (exit $ac_status); } && {
23957 test -z "$ac_c_werror_flag" ||
23958 test ! -s conftest.err
23959 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000023960 ac_cv_member_struct_tm_tm_zone=yes
23961else
23962 echo "$as_me: failed program was:" >&5
23963sed 's/^/| /' conftest.$ac_ext >&5
23964
Martin v. Löwiseba40652007-08-30 20:10:57 +000023965 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000023966/* confdefs.h. */
23967_ACEOF
23968cat confdefs.h >>conftest.$ac_ext
23969cat >>conftest.$ac_ext <<_ACEOF
23970/* end confdefs.h. */
23971#include <sys/types.h>
23972#include <$ac_cv_struct_tm>
23973
23974
23975int
23976main ()
23977{
23978static struct tm ac_aggr;
23979if (sizeof ac_aggr.tm_zone)
23980return 0;
23981 ;
23982 return 0;
23983}
23984_ACEOF
23985rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023986if { (ac_try="$ac_compile"
23987case "(($ac_try" in
23988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23989 *) ac_try_echo=$ac_try;;
23990esac
23991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23992 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000023993 ac_status=$?
23994 grep -v '^ *+' conftest.er1 >conftest.err
23995 rm -f conftest.er1
23996 cat conftest.err >&5
23997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023998 (exit $ac_status); } && {
23999 test -z "$ac_c_werror_flag" ||
24000 test ! -s conftest.err
24001 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024002 ac_cv_member_struct_tm_tm_zone=yes
24003else
24004 echo "$as_me: failed program was:" >&5
24005sed 's/^/| /' conftest.$ac_ext >&5
24006
Martin v. Löwiseba40652007-08-30 20:10:57 +000024007 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024009
24010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024011fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024012
24013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024015{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24016echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024017if test $ac_cv_member_struct_tm_tm_zone = yes; then
24018
24019cat >>confdefs.h <<_ACEOF
24020#define HAVE_STRUCT_TM_TM_ZONE 1
24021_ACEOF
24022
24023
24024fi
24025
24026if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24027
24028cat >>confdefs.h <<\_ACEOF
24029#define HAVE_TM_ZONE 1
24030_ACEOF
24031
24032else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024033 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24034echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
24035if test "${ac_cv_have_decl_tzname+set}" = set; then
24036 echo $ECHO_N "(cached) $ECHO_C" >&6
24037else
24038 cat >conftest.$ac_ext <<_ACEOF
24039/* confdefs.h. */
24040_ACEOF
24041cat confdefs.h >>conftest.$ac_ext
24042cat >>conftest.$ac_ext <<_ACEOF
24043/* end confdefs.h. */
24044#include <time.h>
24045
24046int
24047main ()
24048{
24049#ifndef tzname
24050 (void) tzname;
24051#endif
24052
24053 ;
24054 return 0;
24055}
24056_ACEOF
24057rm -f conftest.$ac_objext
24058if { (ac_try="$ac_compile"
24059case "(($ac_try" in
24060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24061 *) ac_try_echo=$ac_try;;
24062esac
24063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24064 (eval "$ac_compile") 2>conftest.er1
24065 ac_status=$?
24066 grep -v '^ *+' conftest.er1 >conftest.err
24067 rm -f conftest.er1
24068 cat conftest.err >&5
24069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24070 (exit $ac_status); } && {
24071 test -z "$ac_c_werror_flag" ||
24072 test ! -s conftest.err
24073 } && test -s conftest.$ac_objext; then
24074 ac_cv_have_decl_tzname=yes
24075else
24076 echo "$as_me: failed program was:" >&5
24077sed 's/^/| /' conftest.$ac_ext >&5
24078
24079 ac_cv_have_decl_tzname=no
24080fi
24081
24082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24083fi
24084{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24085echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
24086if test $ac_cv_have_decl_tzname = yes; then
24087
24088cat >>confdefs.h <<_ACEOF
24089#define HAVE_DECL_TZNAME 1
24090_ACEOF
24091
24092
24093else
24094 cat >>confdefs.h <<_ACEOF
24095#define HAVE_DECL_TZNAME 0
24096_ACEOF
24097
24098
24099fi
24100
24101
24102 { echo "$as_me:$LINENO: checking for tzname" >&5
24103echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024104if test "${ac_cv_var_tzname+set}" = set; then
24105 echo $ECHO_N "(cached) $ECHO_C" >&6
24106else
24107 cat >conftest.$ac_ext <<_ACEOF
24108/* confdefs.h. */
24109_ACEOF
24110cat confdefs.h >>conftest.$ac_ext
24111cat >>conftest.$ac_ext <<_ACEOF
24112/* end confdefs.h. */
24113#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000024114#if !HAVE_DECL_TZNAME
24115extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024116#endif
24117
24118int
24119main ()
24120{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024121return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024122 ;
24123 return 0;
24124}
24125_ACEOF
24126rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024127if { (ac_try="$ac_link"
24128case "(($ac_try" in
24129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24130 *) ac_try_echo=$ac_try;;
24131esac
24132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24133 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024134 ac_status=$?
24135 grep -v '^ *+' conftest.er1 >conftest.err
24136 rm -f conftest.er1
24137 cat conftest.err >&5
24138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024139 (exit $ac_status); } && {
24140 test -z "$ac_c_werror_flag" ||
24141 test ! -s conftest.err
24142 } && test -s conftest$ac_exeext &&
24143 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000024144 ac_cv_var_tzname=yes
24145else
24146 echo "$as_me: failed program was:" >&5
24147sed 's/^/| /' conftest.$ac_ext >&5
24148
Martin v. Löwiseba40652007-08-30 20:10:57 +000024149 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024151
24152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024153 conftest$ac_exeext conftest.$ac_ext
24154fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024155{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24156echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024157 if test $ac_cv_var_tzname = yes; then
24158
24159cat >>confdefs.h <<\_ACEOF
24160#define HAVE_TZNAME 1
24161_ACEOF
24162
24163 fi
24164fi
24165
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024166
Martin v. Löwis1d459062005-03-14 21:23:33 +000024167# check tzset(3) exists and works like we expect it to
Martin v. Löwiseba40652007-08-30 20:10:57 +000024168{ echo "$as_me:$LINENO: checking for working tzset()" >&5
24169echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024170if test "${ac_cv_working_tzset+set}" = set; then
24171 echo $ECHO_N "(cached) $ECHO_C" >&6
24172else
24173
24174if test "$cross_compiling" = yes; then
24175 ac_cv_working_tzset=no
24176else
24177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024178/* confdefs.h. */
24179_ACEOF
24180cat confdefs.h >>conftest.$ac_ext
24181cat >>conftest.$ac_ext <<_ACEOF
24182/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024183
24184#include <stdlib.h>
24185#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024186#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024187
24188#if HAVE_TZNAME
24189extern char *tzname[];
24190#endif
24191
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024192int main()
24193{
Brett Cannon18367812003-09-19 00:59:16 +000024194 /* Note that we need to ensure that not only does tzset(3)
24195 do 'something' with localtime, but it works as documented
24196 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024197 This includes making sure that tzname is set properly if
24198 tm->tm_zone does not exist since it is the alternative way
24199 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024200
24201 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024202 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024203 */
24204
Martin v. Löwis1d459062005-03-14 21:23:33 +000024205 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024206 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24207
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024208 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024209 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024210 if (localtime(&groundhogday)->tm_hour != 0)
24211 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024212#if HAVE_TZNAME
24213 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24214 if (strcmp(tzname[0], "UTC") ||
24215 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24216 exit(1);
24217#endif
Brett Cannon18367812003-09-19 00:59:16 +000024218
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024219 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024220 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024221 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024222 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024223#if HAVE_TZNAME
24224 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24225 exit(1);
24226#endif
Brett Cannon18367812003-09-19 00:59:16 +000024227
24228 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24229 tzset();
24230 if (localtime(&groundhogday)->tm_hour != 11)
24231 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024232#if HAVE_TZNAME
24233 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24234 exit(1);
24235#endif
24236
24237#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024238 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24239 exit(1);
24240 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24241 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024242#endif
Brett Cannon18367812003-09-19 00:59:16 +000024243
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024244 exit(0);
24245}
24246
24247_ACEOF
24248rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024249if { (ac_try="$ac_link"
24250case "(($ac_try" in
24251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24252 *) ac_try_echo=$ac_try;;
24253esac
24254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24255 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024256 ac_status=$?
24257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24258 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024259 { (case "(($ac_try" in
24260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24261 *) ac_try_echo=$ac_try;;
24262esac
24263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24264 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024265 ac_status=$?
24266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24267 (exit $ac_status); }; }; then
24268 ac_cv_working_tzset=yes
24269else
24270 echo "$as_me: program exited with status $ac_status" >&5
24271echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024272sed 's/^/| /' conftest.$ac_ext >&5
24273
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024274( exit $ac_status )
24275ac_cv_working_tzset=no
24276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024277rm -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 +000024278fi
24279
Martin v. Löwiseba40652007-08-30 20:10:57 +000024280
24281fi
24282
24283{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24284echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024285if test "$ac_cv_working_tzset" = yes
24286then
24287
24288cat >>confdefs.h <<\_ACEOF
24289#define HAVE_WORKING_TZSET 1
24290_ACEOF
24291
24292fi
24293
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024294# Look for subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024295{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24296echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024297if test "${ac_cv_stat_tv_nsec+set}" = set; then
24298 echo $ECHO_N "(cached) $ECHO_C" >&6
24299else
24300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024301/* confdefs.h. */
24302_ACEOF
24303cat confdefs.h >>conftest.$ac_ext
24304cat >>conftest.$ac_ext <<_ACEOF
24305/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024306#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024307int
24308main ()
24309{
24310
24311struct stat st;
24312st.st_mtim.tv_nsec = 1;
24313
24314 ;
24315 return 0;
24316}
24317_ACEOF
24318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024319if { (ac_try="$ac_compile"
24320case "(($ac_try" in
24321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24322 *) ac_try_echo=$ac_try;;
24323esac
24324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024327 grep -v '^ *+' conftest.er1 >conftest.err
24328 rm -f conftest.er1
24329 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024331 (exit $ac_status); } && {
24332 test -z "$ac_c_werror_flag" ||
24333 test ! -s conftest.err
24334 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024335 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024336else
24337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024338sed 's/^/| /' conftest.$ac_ext >&5
24339
Martin v. Löwiseba40652007-08-30 20:10:57 +000024340 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024341fi
24342
Martin v. Löwiseba40652007-08-30 20:10:57 +000024343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24344fi
24345
24346{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24347echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024348if test "$ac_cv_stat_tv_nsec" = yes
24349then
24350
24351cat >>confdefs.h <<\_ACEOF
24352#define HAVE_STAT_TV_NSEC 1
24353_ACEOF
24354
24355fi
24356
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024357# Look for BSD style subsecond timestamps in struct stat
Martin v. Löwiseba40652007-08-30 20:10:57 +000024358{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24359echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024360if test "${ac_cv_stat_tv_nsec2+set}" = set; then
24361 echo $ECHO_N "(cached) $ECHO_C" >&6
24362else
24363 cat >conftest.$ac_ext <<_ACEOF
24364/* confdefs.h. */
24365_ACEOF
24366cat confdefs.h >>conftest.$ac_ext
24367cat >>conftest.$ac_ext <<_ACEOF
24368/* end confdefs.h. */
24369#include <sys/stat.h>
24370int
24371main ()
24372{
24373
24374struct stat st;
24375st.st_mtimespec.tv_nsec = 1;
24376
24377 ;
24378 return 0;
24379}
24380_ACEOF
24381rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024382if { (ac_try="$ac_compile"
24383case "(($ac_try" in
24384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24385 *) ac_try_echo=$ac_try;;
24386esac
24387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024389 ac_status=$?
24390 grep -v '^ *+' conftest.er1 >conftest.err
24391 rm -f conftest.er1
24392 cat conftest.err >&5
24393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024394 (exit $ac_status); } && {
24395 test -z "$ac_c_werror_flag" ||
24396 test ! -s conftest.err
24397 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024398 ac_cv_stat_tv_nsec2=yes
24399else
24400 echo "$as_me: failed program was:" >&5
24401sed 's/^/| /' conftest.$ac_ext >&5
24402
Martin v. Löwiseba40652007-08-30 20:10:57 +000024403 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024404fi
24405
Martin v. Löwiseba40652007-08-30 20:10:57 +000024406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24407fi
24408
24409{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24410echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024411if test "$ac_cv_stat_tv_nsec2" = yes
24412then
24413
24414cat >>confdefs.h <<\_ACEOF
24415#define HAVE_STAT_TV_NSEC2 1
24416_ACEOF
24417
24418fi
24419
Jack Jansen666b1e72001-10-31 12:11:48 +000024420# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwiseba40652007-08-30 20:10:57 +000024421{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24422echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024423if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
24424 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024425else
Martin v. Löwis11437992002-04-12 09:54:03 +000024426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024427/* confdefs.h. */
24428_ACEOF
24429cat confdefs.h >>conftest.$ac_ext
24430cat >>conftest.$ac_ext <<_ACEOF
24431/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024432#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024433int
24434main ()
24435{
Jack Jansen666b1e72001-10-31 12:11:48 +000024436
24437 int rtn;
24438 rtn = mvwdelch(0,0,0);
24439
Martin v. Löwis11437992002-04-12 09:54:03 +000024440 ;
24441 return 0;
24442}
24443_ACEOF
24444rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024445if { (ac_try="$ac_compile"
24446case "(($ac_try" in
24447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24448 *) ac_try_echo=$ac_try;;
24449esac
24450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24451 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024453 grep -v '^ *+' conftest.er1 >conftest.err
24454 rm -f conftest.er1
24455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024457 (exit $ac_status); } && {
24458 test -z "$ac_c_werror_flag" ||
24459 test ! -s conftest.err
24460 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024461 ac_cv_mvwdelch_is_expression=yes
24462else
Martin v. Löwis11437992002-04-12 09:54:03 +000024463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024464sed 's/^/| /' conftest.$ac_ext >&5
24465
Martin v. Löwiseba40652007-08-30 20:10:57 +000024466 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024467fi
24468
Martin v. Löwiseba40652007-08-30 20:10:57 +000024469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24470fi
24471
24472{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24473echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024474
24475if test "$ac_cv_mvwdelch_is_expression" = yes
24476then
Martin v. Löwis11437992002-04-12 09:54:03 +000024477
24478cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024479#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024480_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024481
24482fi
24483
Martin v. Löwiseba40652007-08-30 20:10:57 +000024484{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24485echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024486if test "${ac_cv_window_has_flags+set}" = set; then
24487 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024488else
Martin v. Löwis11437992002-04-12 09:54:03 +000024489 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024490/* confdefs.h. */
24491_ACEOF
24492cat confdefs.h >>conftest.$ac_ext
24493cat >>conftest.$ac_ext <<_ACEOF
24494/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024495#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024496int
24497main ()
24498{
Jack Jansen666b1e72001-10-31 12:11:48 +000024499
24500 WINDOW *w;
24501 w->_flags = 0;
24502
Martin v. Löwis11437992002-04-12 09:54:03 +000024503 ;
24504 return 0;
24505}
24506_ACEOF
24507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024508if { (ac_try="$ac_compile"
24509case "(($ac_try" in
24510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24511 *) ac_try_echo=$ac_try;;
24512esac
24513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024515 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024516 grep -v '^ *+' conftest.er1 >conftest.err
24517 rm -f conftest.er1
24518 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024520 (exit $ac_status); } && {
24521 test -z "$ac_c_werror_flag" ||
24522 test ! -s conftest.err
24523 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024524 ac_cv_window_has_flags=yes
24525else
Martin v. Löwis11437992002-04-12 09:54:03 +000024526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024527sed 's/^/| /' conftest.$ac_ext >&5
24528
Martin v. Löwiseba40652007-08-30 20:10:57 +000024529 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024530fi
24531
Martin v. Löwiseba40652007-08-30 20:10:57 +000024532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24533fi
24534
24535{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24536echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024537
Jack Jansen666b1e72001-10-31 12:11:48 +000024538
24539if test "$ac_cv_window_has_flags" = yes
24540then
Martin v. Löwis11437992002-04-12 09:54:03 +000024541
24542cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024543#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024544_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024545
24546fi
24547
Martin v. Löwiseba40652007-08-30 20:10:57 +000024548{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
24549echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024550cat >conftest.$ac_ext <<_ACEOF
24551/* confdefs.h. */
24552_ACEOF
24553cat confdefs.h >>conftest.$ac_ext
24554cat >>conftest.$ac_ext <<_ACEOF
24555/* end confdefs.h. */
24556#include <curses.h>
24557int
24558main ()
24559{
24560void *x=is_term_resized
24561 ;
24562 return 0;
24563}
24564_ACEOF
24565rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024566if { (ac_try="$ac_compile"
24567case "(($ac_try" in
24568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24569 *) ac_try_echo=$ac_try;;
24570esac
24571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24572 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024573 ac_status=$?
24574 grep -v '^ *+' conftest.er1 >conftest.err
24575 rm -f conftest.er1
24576 cat conftest.err >&5
24577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024578 (exit $ac_status); } && {
24579 test -z "$ac_c_werror_flag" ||
24580 test ! -s conftest.err
24581 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024582
24583cat >>confdefs.h <<\_ACEOF
24584#define HAVE_CURSES_IS_TERM_RESIZED 1
24585_ACEOF
24586
Martin v. Löwiseba40652007-08-30 20:10:57 +000024587 { echo "$as_me:$LINENO: result: yes" >&5
24588echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024589else
24590 echo "$as_me: failed program was:" >&5
24591sed 's/^/| /' conftest.$ac_ext >&5
24592
Martin v. Löwiseba40652007-08-30 20:10:57 +000024593 { echo "$as_me:$LINENO: result: no" >&5
24594echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024595
24596fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024597
Martin v. Löwiseba40652007-08-30 20:10:57 +000024598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24599
24600{ echo "$as_me:$LINENO: checking for resize_term" >&5
24601echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024602cat >conftest.$ac_ext <<_ACEOF
24603/* confdefs.h. */
24604_ACEOF
24605cat confdefs.h >>conftest.$ac_ext
24606cat >>conftest.$ac_ext <<_ACEOF
24607/* end confdefs.h. */
24608#include <curses.h>
24609int
24610main ()
24611{
24612void *x=resize_term
24613 ;
24614 return 0;
24615}
24616_ACEOF
24617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024618if { (ac_try="$ac_compile"
24619case "(($ac_try" in
24620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24621 *) ac_try_echo=$ac_try;;
24622esac
24623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24624 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024625 ac_status=$?
24626 grep -v '^ *+' conftest.er1 >conftest.err
24627 rm -f conftest.er1
24628 cat conftest.err >&5
24629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024630 (exit $ac_status); } && {
24631 test -z "$ac_c_werror_flag" ||
24632 test ! -s conftest.err
24633 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024634
24635cat >>confdefs.h <<\_ACEOF
24636#define HAVE_CURSES_RESIZE_TERM 1
24637_ACEOF
24638
Martin v. Löwiseba40652007-08-30 20:10:57 +000024639 { echo "$as_me:$LINENO: result: yes" >&5
24640echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024641else
24642 echo "$as_me: failed program was:" >&5
24643sed 's/^/| /' conftest.$ac_ext >&5
24644
Martin v. Löwiseba40652007-08-30 20:10:57 +000024645 { echo "$as_me:$LINENO: result: no" >&5
24646echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024647
24648fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024649
Martin v. Löwiseba40652007-08-30 20:10:57 +000024650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24651
24652{ echo "$as_me:$LINENO: checking for resizeterm" >&5
24653echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024654cat >conftest.$ac_ext <<_ACEOF
24655/* confdefs.h. */
24656_ACEOF
24657cat confdefs.h >>conftest.$ac_ext
24658cat >>conftest.$ac_ext <<_ACEOF
24659/* end confdefs.h. */
24660#include <curses.h>
24661int
24662main ()
24663{
24664void *x=resizeterm
24665 ;
24666 return 0;
24667}
24668_ACEOF
24669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024670if { (ac_try="$ac_compile"
24671case "(($ac_try" in
24672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24673 *) ac_try_echo=$ac_try;;
24674esac
24675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24676 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000024677 ac_status=$?
24678 grep -v '^ *+' conftest.er1 >conftest.err
24679 rm -f conftest.er1
24680 cat conftest.err >&5
24681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024682 (exit $ac_status); } && {
24683 test -z "$ac_c_werror_flag" ||
24684 test ! -s conftest.err
24685 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000024686
24687cat >>confdefs.h <<\_ACEOF
24688#define HAVE_CURSES_RESIZETERM 1
24689_ACEOF
24690
Martin v. Löwiseba40652007-08-30 20:10:57 +000024691 { echo "$as_me:$LINENO: result: yes" >&5
24692echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024693else
24694 echo "$as_me: failed program was:" >&5
24695sed 's/^/| /' conftest.$ac_ext >&5
24696
Martin v. Löwiseba40652007-08-30 20:10:57 +000024697 { echo "$as_me:$LINENO: result: no" >&5
24698echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000024699
24700fi
Walter Dörwald4994d952006-06-19 08:07:50 +000024701
Martin v. Löwiseba40652007-08-30 20:10:57 +000024702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24703
24704{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24705echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024706
24707if test -r /dev/ptmx
24708then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024709 { echo "$as_me:$LINENO: result: yes" >&5
24710echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024711
24712cat >>confdefs.h <<\_ACEOF
24713#define HAVE_DEV_PTMX 1
24714_ACEOF
24715
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024716else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024717 { echo "$as_me:$LINENO: result: no" >&5
24718echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024719fi
24720
Martin v. Löwiseba40652007-08-30 20:10:57 +000024721{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
24722echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024723
24724if test -r /dev/ptc
24725then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024726 { echo "$as_me:$LINENO: result: yes" >&5
24727echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024728
24729cat >>confdefs.h <<\_ACEOF
24730#define HAVE_DEV_PTC 1
24731_ACEOF
24732
Martin v. Löwisfefbc202006-10-17 18:59:23 +000024733else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024734 { echo "$as_me:$LINENO: result: no" >&5
24735echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000024736fi
24737
Martin v. Löwiseba40652007-08-30 20:10:57 +000024738{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
24739echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024740if test "$cross_compiling" = yes; then
24741 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
24742See \`config.log' for more details." >&5
24743echo "$as_me: error: cannot run test program while cross compiling
24744See \`config.log' for more details." >&2;}
24745 { (exit 1); exit 1; }; }
24746else
24747 cat >conftest.$ac_ext <<_ACEOF
24748/* confdefs.h. */
24749_ACEOF
24750cat confdefs.h >>conftest.$ac_ext
24751cat >>conftest.$ac_ext <<_ACEOF
24752/* end confdefs.h. */
24753#include <stdio.h>
24754#include <stddef.h>
24755#include <string.h>
24756
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024757#ifdef HAVE_SYS_TYPES_H
24758#include <sys/types.h>
24759#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024760
24761#ifdef HAVE_SSIZE_T
24762typedef ssize_t Py_ssize_t;
24763#elif SIZEOF_VOID_P == SIZEOF_LONG
24764typedef long Py_ssize_t;
24765#else
24766typedef int Py_ssize_t;
24767#endif
Brett Cannon09d12362006-05-11 05:11:33 +000024768
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000024769int main()
24770{
24771 char buffer[256];
24772
Brett Cannon09d12362006-05-11 05:11:33 +000024773 if(sprintf(buffer, "%zd", (size_t)123) < 0)
24774 return 1;
24775
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000024776 if (strcmp(buffer, "123"))
24777 return 1;
24778
24779 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
24780 return 1;
24781
24782 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000024783 return 1;
24784
24785 return 0;
24786}
24787_ACEOF
24788rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024789if { (ac_try="$ac_link"
24790case "(($ac_try" in
24791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24792 *) ac_try_echo=$ac_try;;
24793esac
24794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24795 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024796 ac_status=$?
24797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024799 { (case "(($ac_try" in
24800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24801 *) ac_try_echo=$ac_try;;
24802esac
24803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24804 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000024805 ac_status=$?
24806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24807 (exit $ac_status); }; }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024808 { echo "$as_me:$LINENO: result: yes" >&5
24809echo "${ECHO_T}yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024810
24811cat >>confdefs.h <<\_ACEOF
24812#define PY_FORMAT_SIZE_T "z"
24813_ACEOF
24814
24815else
24816 echo "$as_me: program exited with status $ac_status" >&5
24817echo "$as_me: failed program was:" >&5
24818sed 's/^/| /' conftest.$ac_ext >&5
24819
24820( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024821{ echo "$as_me:$LINENO: result: no" >&5
24822echo "${ECHO_T}no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000024823fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024824rm -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 +000024825fi
24826
Martin v. Löwiseba40652007-08-30 20:10:57 +000024827
24828
24829{ echo "$as_me:$LINENO: checking for socklen_t" >&5
24830echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024831if test "${ac_cv_type_socklen_t+set}" = set; then
24832 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000024833else
Martin v. Löwis11437992002-04-12 09:54:03 +000024834 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024835/* confdefs.h. */
24836_ACEOF
24837cat confdefs.h >>conftest.$ac_ext
24838cat >>conftest.$ac_ext <<_ACEOF
24839/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000024840
24841#ifdef HAVE_SYS_TYPES_H
24842#include <sys/types.h>
24843#endif
24844#ifdef HAVE_SYS_SOCKET_H
24845#include <sys/socket.h>
24846#endif
24847
24848
Martin v. Löwiseba40652007-08-30 20:10:57 +000024849typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024850int
24851main ()
24852{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024853if ((ac__type_new_ *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024854 return 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024855if (sizeof (ac__type_new_))
Martin v. Löwis11437992002-04-12 09:54:03 +000024856 return 0;
24857 ;
24858 return 0;
24859}
24860_ACEOF
24861rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024862if { (ac_try="$ac_compile"
24863case "(($ac_try" in
24864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24865 *) ac_try_echo=$ac_try;;
24866esac
24867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024870 grep -v '^ *+' conftest.er1 >conftest.err
24871 rm -f conftest.er1
24872 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024874 (exit $ac_status); } && {
24875 test -z "$ac_c_werror_flag" ||
24876 test ! -s conftest.err
24877 } && test -s conftest.$ac_objext; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000024878 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000024879else
Martin v. Löwis11437992002-04-12 09:54:03 +000024880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024881sed 's/^/| /' conftest.$ac_ext >&5
24882
Martin v. Löwiseba40652007-08-30 20:10:57 +000024883 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000024884fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024885
24886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024887fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024888{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
24889echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024890if test $ac_cv_type_socklen_t = yes; then
24891 :
24892else
Guido van Rossum95713eb2000-05-18 20:53:31 +000024893
Martin v. Löwis01c04012002-11-11 14:58:44 +000024894cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024895#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000024896_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000024897
24898fi
24899
Michael W. Hudson54241132001-12-07 15:38:26 +000024900
Michael W. Hudson54241132001-12-07 15:38:26 +000024901
24902
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000024903for h in `(cd $srcdir;echo Python/thread_*.h)`
24904do
24905 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
24906done
24907
Michael W. Hudson54241132001-12-07 15:38:26 +000024908
Neal Norwitzd24499d2005-12-18 21:36:39 +000024909SRCDIRS="Parser Grammar Objects Python Modules Mac"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024910{ echo "$as_me:$LINENO: checking for build directories" >&5
24911echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024912for dir in $SRCDIRS; do
24913 if test ! -d $dir; then
24914 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000024915 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000024916done
Martin v. Löwiseba40652007-08-30 20:10:57 +000024917{ echo "$as_me:$LINENO: result: done" >&5
24918echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000024919
Guido van Rossum627b2d71993-12-24 10:39:16 +000024920# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000024921ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000024922
Martin v. Löwis11437992002-04-12 09:54:03 +000024923cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024924# This file is a shell script that caches the results of configure
24925# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000024926# scripts and configure runs, see configure's option --config-cache.
24927# It is not useful on other systems. If it contains results you don't
24928# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024929#
Martin v. Löwis11437992002-04-12 09:54:03 +000024930# config.status only pays attention to the cache file if you give it
24931# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024932#
Skip Montanaro6dead952003-09-25 14:50:04 +000024933# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000024934# loading this file, other *unset* `ac_cv_foo' will be assigned the
24935# following values.
24936
24937_ACEOF
24938
Guido van Rossumf78abae1997-01-21 22:02:36 +000024939# The following way of writing the cache mishandles newlines in values,
24940# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024942# Ultrix sh set writes to stderr and can't be redirected directly,
24943# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024944(
24945 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24946 eval ac_val=\$$ac_var
24947 case $ac_val in #(
24948 *${as_nl}*)
24949 case $ac_var in #(
24950 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24951echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24952 esac
24953 case $ac_var in #(
24954 _ | IFS | as_nl) ;; #(
24955 *) $as_unset $ac_var ;;
24956 esac ;;
24957 esac
24958 done
24959
Martin v. Löwis11437992002-04-12 09:54:03 +000024960 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000024961 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24962 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000024963 # `set' does not quote correctly, so add quotes (double-quote
24964 # substitution turns \\\\ into \\, and sed turns \\ into \).
24965 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024966 "s/'/'\\\\''/g;
24967 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000024968 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000024969 *)
24970 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000024971 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000024972 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024973 esac |
24974 sort
24975) |
Martin v. Löwis11437992002-04-12 09:54:03 +000024976 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000024978 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000024979 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000024980 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24981 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000024982 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24983 :end' >>confcache
24984if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24985 if test -w "$cache_file"; then
24986 test "x$cache_file" != "x/dev/null" &&
24987 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24988echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024989 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024990 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000024991 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24992echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024993 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024994fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000024995rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000024996
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024997test "x$prefix" = xNONE && prefix=$ac_default_prefix
24998# Let make expand exec_prefix.
24999test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025000
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025001DEFS=-DHAVE_CONFIG_H
25002
Skip Montanaro6dead952003-09-25 14:50:04 +000025003ac_libobjs=
25004ac_ltlibobjs=
25005for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25006 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025007 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
25008 ac_i=`echo "$ac_i" | sed "$ac_script"`
25009 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25010 # will be set to the directory where LIBOBJS objects are built.
25011 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25012 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025013done
25014LIBOBJS=$ac_libobjs
25015
25016LTLIBOBJS=$ac_ltlibobjs
25017
25018
Martin v. Löwis11437992002-04-12 09:54:03 +000025019
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025020: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000025021ac_clean_files_save=$ac_clean_files
25022ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25023{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25024echo "$as_me: creating $CONFIG_STATUS" >&6;}
25025cat >$CONFIG_STATUS <<_ACEOF
25026#! $SHELL
25027# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025028# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025029# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025030# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025031
Martin v. Löwis11437992002-04-12 09:54:03 +000025032debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025033ac_cs_recheck=false
25034ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025035SHELL=\${CONFIG_SHELL-$SHELL}
25036_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025037
Martin v. Löwis11437992002-04-12 09:54:03 +000025038cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025039## --------------------- ##
25040## M4sh Initialization. ##
25041## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025042
Martin v. Löwiseba40652007-08-30 20:10:57 +000025043# Be more Bourne compatible
25044DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025045if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25046 emulate sh
25047 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000025048 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
25049 # is contrary to our usage. Disable this feature.
25050 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025051 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025052else
Martin v. Löwiseba40652007-08-30 20:10:57 +000025053 case `(set -o) 2>/dev/null` in
25054 *posix*) set -o posix ;;
25055esac
25056
Martin v. Löwis11437992002-04-12 09:54:03 +000025057fi
Michael W. Hudson54241132001-12-07 15:38:26 +000025058
Skip Montanaro6dead952003-09-25 14:50:04 +000025059
Martin v. Löwis11437992002-04-12 09:54:03 +000025060
25061
Martin v. Löwiseba40652007-08-30 20:10:57 +000025062# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025063# Avoid depending upon Character Ranges.
25064as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25065as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25066as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25067as_cr_digits='0123456789'
25068as_cr_alnum=$as_cr_Letters$as_cr_digits
25069
25070# The user is always right.
25071if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000025072 echo "#! /bin/sh" >conf$$.sh
25073 echo "exit 0" >>conf$$.sh
25074 chmod +x conf$$.sh
25075 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025076 PATH_SEPARATOR=';'
25077 else
25078 PATH_SEPARATOR=:
25079 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000025080 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025081fi
25082
Martin v. Löwiseba40652007-08-30 20:10:57 +000025083# Support unset when possible.
25084if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25085 as_unset=unset
25086else
25087 as_unset=false
25088fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025089
Martin v. Löwiseba40652007-08-30 20:10:57 +000025090
25091# IFS
25092# We need space, tab and new line, in precisely that order. Quoting is
25093# there to prevent editors from complaining about space-tab.
25094# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25095# splitting by setting IFS to empty value.)
25096as_nl='
25097'
25098IFS=" "" $as_nl"
25099
25100# Find who we are. Look in the path if we contain no directory separator.
25101case $0 in
25102 *[\\/]* ) as_myself=$0 ;;
25103 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025104for as_dir in $PATH
25105do
25106 IFS=$as_save_IFS
25107 test -z "$as_dir" && as_dir=.
25108 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25109done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025110IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025111
Martin v. Löwiseba40652007-08-30 20:10:57 +000025112 ;;
25113esac
25114# We did not find ourselves, most probably we were run as `sh COMMAND'
25115# in which case we are not to be found in the path.
25116if test "x$as_myself" = x; then
25117 as_myself=$0
25118fi
25119if test ! -f "$as_myself"; then
25120 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
25121 { (exit 1); exit 1; }
25122fi
25123
25124# Work around bugs in pre-3.0 UWIN ksh.
25125for as_var in ENV MAIL MAILPATH
25126do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25127done
25128PS1='$ '
25129PS2='> '
25130PS4='+ '
25131
25132# NLS nuisances.
25133for as_var in \
25134 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
25135 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
25136 LC_TELEPHONE LC_TIME
Skip Montanaro89e975f2007-08-22 19:05:21 +000025137do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025138 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
25139 eval $as_var=C; export $as_var
25140 else
25141 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25142 fi
25143done
25144
25145# Required to use basename.
25146if expr a : '\(a\)' >/dev/null 2>&1 &&
25147 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25148 as_expr=expr
25149else
25150 as_expr=false
25151fi
25152
25153if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25154 as_basename=basename
25155else
25156 as_basename=false
25157fi
25158
25159
25160# Name of the executable.
25161as_me=`$as_basename -- "$0" ||
25162$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25163 X"$0" : 'X\(//\)$' \| \
25164 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
25165echo X/"$0" |
25166 sed '/^.*\/\([^/][^/]*\)\/*$/{
25167 s//\1/
25168 q
25169 }
25170 /^X\/\(\/\/\)$/{
25171 s//\1/
25172 q
25173 }
25174 /^X\/\(\/\).*/{
25175 s//\1/
25176 q
25177 }
25178 s/.*/./; q'`
25179
25180# CDPATH.
25181$as_unset CDPATH
25182
25183
25184
Martin v. Löwis11437992002-04-12 09:54:03 +000025185 as_lineno_1=$LINENO
25186 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025187 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025188 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025189
Martin v. Löwis11437992002-04-12 09:54:03 +000025190 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25191 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000025192 # line-number line after each line using $LINENO; the second 'sed'
25193 # does the real work. The second script uses 'N' to pair each
25194 # line-number line with the line containing $LINENO, and appends
25195 # trailing '-' during substitution so that $LINENO is not a special
25196 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025197 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198 # scripts with optimization help from Paolo Bonzini. Blame Lee
25199 # E. McMahon (1931-1989) for sed's syntax. :-)
25200 sed -n '
25201 p
25202 /[$]LINENO/=
25203 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025204 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000025205 s/[$]LINENO.*/&-/
25206 t lineno
25207 b
25208 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025209 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000025210 :loop
25211 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025212 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000025213 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025214 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000025215 chmod +x "$as_me.lineno" ||
25216 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025217 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025218
Martin v. Löwis11437992002-04-12 09:54:03 +000025219 # Don't try to exec as it changes $[0], causing all sort of problems
25220 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000025221 # original and so on. Autoconf is especially sensitive to this).
25222 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025223 # Exit status is that of the last command.
25224 exit
25225}
25226
25227
Martin v. Löwiseba40652007-08-30 20:10:57 +000025228if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25229 as_dirname=dirname
25230else
25231 as_dirname=false
25232fi
25233
25234ECHO_C= ECHO_N= ECHO_T=
25235case `echo -n x` in
25236-n*)
25237 case `echo 'x\c'` in
25238 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25239 *) ECHO_C='\c';;
25240 esac;;
25241*)
25242 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025243esac
25244
Martin v. Löwiseba40652007-08-30 20:10:57 +000025245if expr a : '\(a\)' >/dev/null 2>&1 &&
25246 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025247 as_expr=expr
25248else
25249 as_expr=false
25250fi
25251
25252rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253if test -d conf$$.dir; then
25254 rm -f conf$$.dir/conf$$.file
25255else
25256 rm -f conf$$.dir
25257 mkdir conf$$.dir
25258fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025259echo >conf$$.file
25260if ln -s conf$$.file conf$$ 2>/dev/null; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025261 as_ln_s='ln -s'
25262 # ... but there are two gotchas:
25263 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25264 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25265 # In both cases, we have to default to `cp -p'.
25266 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025267 as_ln_s='cp -p'
Martin v. Löwis11437992002-04-12 09:54:03 +000025268elif ln conf$$.file conf$$ 2>/dev/null; then
25269 as_ln_s=ln
25270else
25271 as_ln_s='cp -p'
25272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25274rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025275
Skip Montanaro6dead952003-09-25 14:50:04 +000025276if mkdir -p . 2>/dev/null; then
25277 as_mkdir_p=:
25278else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025279 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025280 as_mkdir_p=false
25281fi
25282
Martin v. Löwiseba40652007-08-30 20:10:57 +000025283if test -x / >/dev/null 2>&1; then
25284 as_test_x='test -x'
25285else
25286 if ls -dL / >/dev/null 2>&1; then
25287 as_ls_L_option=L
25288 else
25289 as_ls_L_option=
25290 fi
25291 as_test_x='
25292 eval sh -c '\''
25293 if test -d "$1"; then
25294 test -d "$1/.";
25295 else
25296 case $1 in
25297 -*)set "./$1";;
25298 esac;
25299 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25300 ???[sx]*):;;*)false;;esac;fi
25301 '\'' sh
25302 '
25303fi
25304as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025305
25306# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025307as_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 +000025308
25309# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025310as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025311
25312
Martin v. Löwis11437992002-04-12 09:54:03 +000025313exec 6>&1
25314
Martin v. Löwiseba40652007-08-30 20:10:57 +000025315# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025316# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000025317# values after options handling.
25318ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000025319This file was extended by python $as_me 2.6, which was
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025321
25322 CONFIG_FILES = $CONFIG_FILES
25323 CONFIG_HEADERS = $CONFIG_HEADERS
25324 CONFIG_LINKS = $CONFIG_LINKS
25325 CONFIG_COMMANDS = $CONFIG_COMMANDS
25326 $ $0 $@
25327
Martin v. Löwiseba40652007-08-30 20:10:57 +000025328on `(hostname || uname -n) 2>/dev/null | sed 1q`
25329"
25330
Martin v. Löwis11437992002-04-12 09:54:03 +000025331_ACEOF
25332
Martin v. Löwiseba40652007-08-30 20:10:57 +000025333cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025334# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025335config_files="$ac_config_files"
25336config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000025337
Martin v. Löwiseba40652007-08-30 20:10:57 +000025338_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025339
25340cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025341ac_cs_usage="\
25342\`$as_me' instantiates files from templates according to the
25343current configuration.
25344
25345Usage: $0 [OPTIONS] [FILE]...
25346
25347 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000025348 -V, --version print version number and configuration settings, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000025349 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025350 -d, --debug don't remove temporary files
25351 --recheck update $as_me by reconfiguring in the same conditions
25352 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025353 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025354 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000025355 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025356
25357Configuration files:
25358$config_files
25359
25360Configuration headers:
25361$config_headers
25362
25363Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000025364
Martin v. Löwiseba40652007-08-30 20:10:57 +000025365_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025366cat >>$CONFIG_STATUS <<_ACEOF
25367ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000025368python config.status 2.6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025369configured by $0, generated by GNU Autoconf 2.61,
25370 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025371
Martin v. Löwiseba40652007-08-30 20:10:57 +000025372Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025373This config.status script is free software; the Free Software Foundation
25374gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000025375
25376ac_pwd='$ac_pwd'
25377srcdir='$srcdir'
25378INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000025379_ACEOF
25380
25381cat >>$CONFIG_STATUS <<\_ACEOF
25382# If no file are specified by the user, then we need to provide default
25383# value. By we need to know if files were specified by the user.
25384ac_need_defaults=:
25385while test $# != 0
25386do
25387 case $1 in
25388 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025389 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25390 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025391 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025392 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025393 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025394 ac_option=$1
25395 ac_optarg=$2
25396 ac_shift=shift
25397 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025398 esac
25399
Skip Montanaro6dead952003-09-25 14:50:04 +000025400 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025401 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025402 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25403 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025404 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
25405 echo "$ac_cs_version"; exit ;;
25406 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025407 debug=: ;;
25408 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025409 $ac_shift
25410 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025411 ac_need_defaults=false;;
25412 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025413 $ac_shift
25414 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000025415 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025416 --he | --h)
25417 # Conflict between --help and --header
25418 { echo "$as_me: error: ambiguous option: $1
25419Try \`$0 --help' for more information." >&2
25420 { (exit 1); exit 1; }; };;
25421 --help | --hel | -h )
25422 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025423 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25424 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25425 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025426
25427 # This is an error.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025428 -*) { echo "$as_me: error: unrecognized option: $1
25429Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025430 { (exit 1); exit 1; }; } ;;
25431
Martin v. Löwiseba40652007-08-30 20:10:57 +000025432 *) ac_config_targets="$ac_config_targets $1"
25433 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025434
25435 esac
25436 shift
25437done
25438
Skip Montanaro6dead952003-09-25 14:50:04 +000025439ac_configure_extra_args=
25440
25441if $ac_cs_silent; then
25442 exec 6>/dev/null
25443 ac_configure_extra_args="$ac_configure_extra_args --silent"
25444fi
25445
25446_ACEOF
25447cat >>$CONFIG_STATUS <<_ACEOF
25448if \$ac_cs_recheck; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025449 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25450 CONFIG_SHELL=$SHELL
25451 export CONFIG_SHELL
25452 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000025453fi
25454
Martin v. Löwis11437992002-04-12 09:54:03 +000025455_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025456cat >>$CONFIG_STATUS <<\_ACEOF
25457exec 5>>config.log
25458{
25459 echo
25460 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25461## Running $as_me. ##
25462_ASBOX
25463 echo "$ac_log"
25464} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025465
Martin v. Löwiseba40652007-08-30 20:10:57 +000025466_ACEOF
25467cat >>$CONFIG_STATUS <<_ACEOF
25468_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025469
25470cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025471
25472# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025473for ac_config_target in $ac_config_targets
25474do
Martin v. Löwiseba40652007-08-30 20:10:57 +000025475 case $ac_config_target in
25476 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25477 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25478 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
25479 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025480 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25481 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025482 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25483 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25484
Martin v. Löwis11437992002-04-12 09:54:03 +000025485 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25486echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25487 { (exit 1); exit 1; }; };;
25488 esac
25489done
25490
Martin v. Löwiseba40652007-08-30 20:10:57 +000025491
Martin v. Löwis11437992002-04-12 09:54:03 +000025492# If the user did not use the arguments to specify the items to instantiate,
25493# then the envvar interface is used. Set only those that are not.
25494# We use the long form for the default assignment because of an extremely
25495# bizarre bug on SunOS 4.1.3.
25496if $ac_need_defaults; then
25497 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25498 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25499fi
25500
Skip Montanaro6dead952003-09-25 14:50:04 +000025501# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000025502# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025503# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025504# Hook for its removal unless debugging.
25505# Note that there is a small window in which the directory will not be cleaned:
25506# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025507$debug ||
25508{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025509 tmp=
25510 trap 'exit_status=$?
25511 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25512' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025513 trap '{ (exit 1); exit 1; }' 1 2 13 15
25514}
Martin v. Löwis11437992002-04-12 09:54:03 +000025515# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025516
Martin v. Löwis11437992002-04-12 09:54:03 +000025517{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025518 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025519 test -n "$tmp" && test -d "$tmp"
25520} ||
25521{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025522 tmp=./conf$$-$RANDOM
25523 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025524} ||
25525{
Skip Montanaro6dead952003-09-25 14:50:04 +000025526 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025527 { (exit 1); exit 1; }
25528}
25529
Martin v. Löwis11437992002-04-12 09:54:03 +000025530#
Martin v. Löwiseba40652007-08-30 20:10:57 +000025531# Set up the sed scripts for CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000025532#
25533
25534# No need to generate the scripts if there are no CONFIG_FILES.
25535# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000025536if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025537
25538_ACEOF
25539
Martin v. Löwiseba40652007-08-30 20:10:57 +000025540
25541
25542ac_delim='%!_!# '
25543for ac_last_try in false false false false false :; do
25544 cat >conf$$subs.sed <<_ACEOF
25545SHELL!$SHELL$ac_delim
25546PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25547PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25548PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25549PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25550PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25551PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25552exec_prefix!$exec_prefix$ac_delim
25553prefix!$prefix$ac_delim
25554program_transform_name!$program_transform_name$ac_delim
25555bindir!$bindir$ac_delim
25556sbindir!$sbindir$ac_delim
25557libexecdir!$libexecdir$ac_delim
25558datarootdir!$datarootdir$ac_delim
25559datadir!$datadir$ac_delim
25560sysconfdir!$sysconfdir$ac_delim
25561sharedstatedir!$sharedstatedir$ac_delim
25562localstatedir!$localstatedir$ac_delim
25563includedir!$includedir$ac_delim
25564oldincludedir!$oldincludedir$ac_delim
25565docdir!$docdir$ac_delim
25566infodir!$infodir$ac_delim
25567htmldir!$htmldir$ac_delim
25568dvidir!$dvidir$ac_delim
25569pdfdir!$pdfdir$ac_delim
25570psdir!$psdir$ac_delim
25571libdir!$libdir$ac_delim
25572localedir!$localedir$ac_delim
25573mandir!$mandir$ac_delim
25574DEFS!$DEFS$ac_delim
25575ECHO_C!$ECHO_C$ac_delim
25576ECHO_N!$ECHO_N$ac_delim
25577ECHO_T!$ECHO_T$ac_delim
25578LIBS!$LIBS$ac_delim
25579build_alias!$build_alias$ac_delim
25580host_alias!$host_alias$ac_delim
25581target_alias!$target_alias$ac_delim
25582VERSION!$VERSION$ac_delim
25583SOVERSION!$SOVERSION$ac_delim
25584CONFIG_ARGS!$CONFIG_ARGS$ac_delim
25585UNIVERSALSDK!$UNIVERSALSDK$ac_delim
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025586ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025587PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025588PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025589PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
25590PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
25591PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
25592FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
25593FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
25594FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
25595FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
25596FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
25597MACHDEP!$MACHDEP$ac_delim
25598SGI_ABI!$SGI_ABI$ac_delim
25599EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
25600EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
25601CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
25602EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
25603CC!$CC$ac_delim
25604CFLAGS!$CFLAGS$ac_delim
25605LDFLAGS!$LDFLAGS$ac_delim
25606CPPFLAGS!$CPPFLAGS$ac_delim
25607ac_ct_CC!$ac_ct_CC$ac_delim
25608EXEEXT!$EXEEXT$ac_delim
25609OBJEXT!$OBJEXT$ac_delim
25610CXX!$CXX$ac_delim
25611MAINCC!$MAINCC$ac_delim
25612CPP!$CPP$ac_delim
25613GREP!$GREP$ac_delim
25614EGREP!$EGREP$ac_delim
25615BUILDEXEEXT!$BUILDEXEEXT$ac_delim
25616LIBRARY!$LIBRARY$ac_delim
25617LDLIBRARY!$LDLIBRARY$ac_delim
25618DLLLIBRARY!$DLLLIBRARY$ac_delim
25619BLDLIBRARY!$BLDLIBRARY$ac_delim
25620LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
25621INSTSONAME!$INSTSONAME$ac_delim
25622RUNSHARED!$RUNSHARED$ac_delim
25623LINKCC!$LINKCC$ac_delim
25624RANLIB!$RANLIB$ac_delim
25625AR!$AR$ac_delim
25626SVNVERSION!$SVNVERSION$ac_delim
25627INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25628INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25629INSTALL_DATA!$INSTALL_DATA$ac_delim
25630LN!$LN$ac_delim
25631OPT!$OPT$ac_delim
25632BASECFLAGS!$BASECFLAGS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025633UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
25635LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
25636SO!$SO$ac_delim
25637LDSHARED!$LDSHARED$ac_delim
25638BLDSHARED!$BLDSHARED$ac_delim
25639CCSHARED!$CCSHARED$ac_delim
25640LINKFORSHARED!$LINKFORSHARED$ac_delim
25641CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025642_ACEOF
25643
25644 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25645 break
25646 elif $ac_last_try; then
25647 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25648echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25649 { (exit 1); exit 1; }; }
25650 else
25651 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000025652 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025653done
25654
25655ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25656if test -n "$ac_eof"; then
25657 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25658 ac_eof=`expr $ac_eof + 1`
25659fi
25660
25661cat >>$CONFIG_STATUS <<_ACEOF
25662cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25663/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25664_ACEOF
25665sed '
25666s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25667s/^/s,@/; s/!/@,|#_!!_#|/
25668:n
25669t n
25670s/'"$ac_delim"'$/,g/; t
25671s/$/\\/; p
25672N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25673' >>$CONFIG_STATUS <conf$$subs.sed
25674rm -f conf$$subs.sed
25675cat >>$CONFIG_STATUS <<_ACEOF
25676CEOF$ac_eof
25677_ACEOF
25678
25679
25680ac_delim='%!_!# '
25681for ac_last_try in false false false false false :; do
25682 cat >conf$$subs.sed <<_ACEOF
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025683SHLIBS!$SHLIBS$ac_delim
Ronald Oussoren5640ce22008-06-05 12:58:24 +000025684USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000025685SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
Martin v. Löwiseba40652007-08-30 20:10:57 +000025686USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
25687LDLAST!$LDLAST$ac_delim
25688THREADOBJ!$THREADOBJ$ac_delim
25689DLINCLDIR!$DLINCLDIR$ac_delim
25690DYNLOADFILE!$DYNLOADFILE$ac_delim
25691MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
25692TRUE!$TRUE$ac_delim
25693LIBOBJS!$LIBOBJS$ac_delim
25694HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
25695HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
25696HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
25697HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
25698HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
25699LIBM!$LIBM$ac_delim
25700LIBC!$LIBC$ac_delim
25701UNICODE_OBJS!$UNICODE_OBJS$ac_delim
25702THREADHEADERS!$THREADHEADERS$ac_delim
25703SRCDIRS!$SRCDIRS$ac_delim
25704LTLIBOBJS!$LTLIBOBJS$ac_delim
25705_ACEOF
25706
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +000025707 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025708 break
25709 elif $ac_last_try; then
25710 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25711echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25712 { (exit 1); exit 1; }; }
25713 else
25714 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25715 fi
25716done
25717
25718ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25719if test -n "$ac_eof"; then
25720 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25721 ac_eof=`expr $ac_eof + 1`
25722fi
25723
25724cat >>$CONFIG_STATUS <<_ACEOF
25725cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25726/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25727_ACEOF
25728sed '
25729s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25730s/^/s,@/; s/!/@,|#_!!_#|/
25731:n
25732t n
25733s/'"$ac_delim"'$/,g/; t
25734s/$/\\/; p
25735N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25736' >>$CONFIG_STATUS <conf$$subs.sed
25737rm -f conf$$subs.sed
25738cat >>$CONFIG_STATUS <<_ACEOF
25739:end
25740s/|#_!!_#|//g
25741CEOF$ac_eof
25742_ACEOF
25743
25744
25745# VPATH may cause trouble with some makes, so we remove $(srcdir),
25746# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25747# trailing colons and then remove the whole line if VPATH becomes empty
25748# (actually we leave an empty line to preserve line numbers).
25749if test "x$srcdir" = x.; then
25750 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25751s/:*\$(srcdir):*/:/
25752s/:*\${srcdir}:*/:/
25753s/:*@srcdir@:*/:/
25754s/^\([^=]*=[ ]*\):*/\1/
25755s/:*$//
25756s/^[^=]*=[ ]*$//
25757}'
25758fi
25759
25760cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025761fi # test -n "$CONFIG_FILES"
25762
Martin v. Löwiseba40652007-08-30 20:10:57 +000025763
25764for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
25765do
25766 case $ac_tag in
25767 :[FHLC]) ac_mode=$ac_tag; continue;;
25768 esac
25769 case $ac_mode$ac_tag in
25770 :[FHL]*:*);;
25771 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25772echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25773 { (exit 1); exit 1; }; };;
25774 :[FH]-) ac_tag=-:-;;
25775 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25776 esac
25777 ac_save_IFS=$IFS
25778 IFS=:
25779 set x $ac_tag
25780 IFS=$ac_save_IFS
25781 shift
25782 ac_file=$1
25783 shift
25784
25785 case $ac_mode in
25786 :L) ac_source=$1;;
25787 :[FH])
25788 ac_file_inputs=
25789 for ac_f
25790 do
25791 case $ac_f in
25792 -) ac_f="$tmp/stdin";;
25793 *) # Look for the file first in the build tree, then in the source tree
25794 # (if the path is not absolute). The absolute path cannot be DOS-style,
25795 # because $ac_f cannot contain `:'.
25796 test -f "$ac_f" ||
25797 case $ac_f in
25798 [\\/$]*) false;;
25799 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25800 esac ||
25801 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25802echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25803 { (exit 1); exit 1; }; };;
25804 esac
25805 ac_file_inputs="$ac_file_inputs $ac_f"
25806 done
25807
25808 # Let's still pretend it is `configure' which instantiates (i.e., don't
25809 # use $as_me), people would be surprised to read:
25810 # /* config.h. Generated by config.status. */
25811 configure_input="Generated from "`IFS=:
25812 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25813 if test x"$ac_file" != x-; then
25814 configure_input="$ac_file. $configure_input"
25815 { echo "$as_me:$LINENO: creating $ac_file" >&5
25816echo "$as_me: creating $ac_file" >&6;}
25817 fi
25818
25819 case $ac_tag in
25820 *:-:* | *:-) cat >"$tmp/stdin";;
25821 esac
25822 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025823 esac
25824
Martin v. Löwiseba40652007-08-30 20:10:57 +000025825 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025826$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025827 X"$ac_file" : 'X\(//\)[^/]' \| \
25828 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025829 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000025830echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025831 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25832 s//\1/
25833 q
25834 }
25835 /^X\(\/\/\)[^/].*/{
25836 s//\1/
25837 q
25838 }
25839 /^X\(\/\/\)$/{
25840 s//\1/
25841 q
25842 }
25843 /^X\(\/\).*/{
25844 s//\1/
25845 q
25846 }
25847 s/.*/./; q'`
25848 { as_dir="$ac_dir"
25849 case $as_dir in #(
25850 -*) as_dir=./$as_dir;;
25851 esac
25852 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000025853 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000025854 while :; do
25855 case $as_dir in #(
25856 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25857 *) as_qdir=$as_dir;;
25858 esac
25859 as_dirs="'$as_qdir' $as_dirs"
25860 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025861$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025862 X"$as_dir" : 'X\(//\)[^/]' \| \
25863 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000025864 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000025865echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000025866 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25867 s//\1/
25868 q
25869 }
25870 /^X\(\/\/\)[^/].*/{
25871 s//\1/
25872 q
25873 }
25874 /^X\(\/\/\)$/{
25875 s//\1/
25876 q
25877 }
25878 /^X\(\/\).*/{
25879 s//\1/
25880 q
25881 }
25882 s/.*/./; q'`
25883 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000025884 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000025885 test -z "$as_dirs" || eval "mkdir $as_dirs"
25886 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25887echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000025888 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025889 ac_builddir=.
25890
Martin v. Löwiseba40652007-08-30 20:10:57 +000025891case "$ac_dir" in
25892.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25893*)
Martin v. Löwis11437992002-04-12 09:54:03 +000025894 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000025895 # A ".." for each directory in $ac_dir_suffix.
25896 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25897 case $ac_top_builddir_sub in
25898 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25899 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25900 esac ;;
25901esac
25902ac_abs_top_builddir=$ac_pwd
25903ac_abs_builddir=$ac_pwd$ac_dir_suffix
25904# for backward compatibility:
25905ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000025906
25907case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000025908 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000025909 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000025910 ac_top_srcdir=$ac_top_builddir_sub
25911 ac_abs_top_srcdir=$ac_pwd ;;
25912 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000025913 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025914 ac_top_srcdir=$srcdir
25915 ac_abs_top_srcdir=$srcdir ;;
25916 *) # Relative name.
25917 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25918 ac_top_srcdir=$ac_top_build_prefix$srcdir
25919 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025920esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000025921ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000025922
Martin v. Löwis11437992002-04-12 09:54:03 +000025923
Martin v. Löwiseba40652007-08-30 20:10:57 +000025924 case $ac_mode in
25925 :F)
25926 #
25927 # CONFIG_FILE
25928 #
Martin v. Löwis11437992002-04-12 09:54:03 +000025929
25930 case $INSTALL in
25931 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025932 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025933 esac
Brett Cannon19fab762007-06-02 03:02:29 +000025934_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025935
25936cat >>$CONFIG_STATUS <<\_ACEOF
25937# If the template does not know about datarootdir, expand it.
25938# FIXME: This hack should be removed a few years after 2.60.
25939ac_datarootdir_hack=; ac_datarootdir_seen=
25940
25941case `sed -n '/datarootdir/ {
25942 p
25943 q
25944}
25945/@datadir@/p
25946/@docdir@/p
25947/@infodir@/p
25948/@localedir@/p
25949/@mandir@/p
25950' $ac_file_inputs` in
25951*datarootdir*) ac_datarootdir_seen=yes;;
25952*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25953 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25954echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25955_ACEOF
25956cat >>$CONFIG_STATUS <<_ACEOF
25957 ac_datarootdir_hack='
25958 s&@datadir@&$datadir&g
25959 s&@docdir@&$docdir&g
25960 s&@infodir@&$infodir&g
25961 s&@localedir@&$localedir&g
25962 s&@mandir@&$mandir&g
25963 s&\\\${datarootdir}&$datarootdir&g' ;;
25964esac
25965_ACEOF
25966
25967# Neutralize VPATH when `$srcdir' = `.'.
25968# Shell code in configure.ac might set extrasub.
25969# FIXME: do we really want to maintain this feature?
Brett Cannon19fab762007-06-02 03:02:29 +000025970cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025971 sed "$ac_vpsub
25972$extrasub
25973_ACEOF
25974cat >>$CONFIG_STATUS <<\_ACEOF
25975:t
25976/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000025977s&@configure_input@&$configure_input&;t t
25978s&@top_builddir@&$ac_top_builddir_sub&;t t
25979s&@srcdir@&$ac_srcdir&;t t
25980s&@abs_srcdir@&$ac_abs_srcdir&;t t
25981s&@top_srcdir@&$ac_top_srcdir&;t t
25982s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25983s&@builddir@&$ac_builddir&;t t
25984s&@abs_builddir@&$ac_abs_builddir&;t t
25985s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25986s&@INSTALL@&$ac_INSTALL&;t t
25987$ac_datarootdir_hack
25988" $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 +000025989
Martin v. Löwiseba40652007-08-30 20:10:57 +000025990test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25991 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25992 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25993 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25994which seems to be undefined. Please make sure it is defined." >&5
25995echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25996which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025997
Martin v. Löwiseba40652007-08-30 20:10:57 +000025998 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000025999 case $ac_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +000026000 -) cat "$tmp/out"; rm -f "$tmp/out";;
26001 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026002 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026003 ;;
26004 :H)
26005 #
26006 # CONFIG_HEADER
26007 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026008_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026009
Martin v. Löwiseba40652007-08-30 20:10:57 +000026010# Transform confdefs.h into a sed script `conftest.defines', that
26011# substitutes the proper values into config.h.in to produce config.h.
26012rm -f conftest.defines conftest.tail
26013# First, append a space to every undef/define line, to ease matching.
26014echo 's/$/ /' >conftest.defines
26015# Then, protect against being on the right side of a sed subst, or in
26016# an unquoted here document, in config.status. If some macros were
26017# called several times there might be several #defines for the same
26018# symbol, which is useless. But do not sort them, since the last
26019# AC_DEFINE must be honored.
26020ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26021# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
26022# NAME is the cpp macro being defined, VALUE is the value it is being given.
26023# PARAMS is the parameter list in the macro definition--in most cases, it's
26024# just an empty string.
26025ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
26026ac_dB='\\)[ (].*,\\1define\\2'
26027ac_dC=' '
26028ac_dD=' ,'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026029
Martin v. Löwiseba40652007-08-30 20:10:57 +000026030uniq confdefs.h |
26031 sed -n '
26032 t rset
26033 :rset
26034 s/^[ ]*#[ ]*define[ ][ ]*//
26035 t ok
26036 d
26037 :ok
26038 s/[\\&,]/\\&/g
26039 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
26040 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
26041 ' >>conftest.defines
26042
26043# Remove the space that was appended to ease matching.
26044# Then replace #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026045# example, in the case of _POSIX_SOURCE, which is predefined and required
26046# on some systems where configure will not decide to define it.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026047# (The regexp can be short, since the line contains either #define or #undef.)
26048echo 's/ $//
26049s,^[ #]*u.*,/* & */,' >>conftest.defines
Skip Montanaro89e975f2007-08-22 19:05:21 +000026050
Martin v. Löwiseba40652007-08-30 20:10:57 +000026051# Break up conftest.defines:
26052ac_max_sed_lines=50
26053
26054# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
26055# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
26056# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
26057# et cetera.
26058ac_in='$ac_file_inputs'
26059ac_out='"$tmp/out1"'
26060ac_nxt='"$tmp/out2"'
26061
26062while :
Skip Montanaro89e975f2007-08-22 19:05:21 +000026063do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026064 # Write a here document:
26065 cat >>$CONFIG_STATUS <<_ACEOF
26066 # First, check the format of the line:
26067 cat >"\$tmp/defines.sed" <<\\CEOF
26068/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
26069/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
26070b
26071:def
26072_ACEOF
26073 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000026074 echo 'CEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026075 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
26076 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
26077 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
26078 grep . conftest.tail >/dev/null || break
Martin v. Löwis11437992002-04-12 09:54:03 +000026079 rm -f conftest.defines
26080 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000026081done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026082rm -f conftest.defines conftest.tail
Jack Jansendd19cf82001-12-06 22:36:17 +000026083
Martin v. Löwiseba40652007-08-30 20:10:57 +000026084echo "ac_result=$ac_in" >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026085cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026086 if test x"$ac_file" != x-; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026087 echo "/* $configure_input */" >"$tmp/config.h"
26088 cat "$ac_result" >>"$tmp/config.h"
26089 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026090 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26091echo "$as_me: $ac_file is unchanged" >&6;}
26092 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026093 rm -f $ac_file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026094 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000026095 fi
26096 else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026097 echo "/* $configure_input */"
26098 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000026099 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026100 rm -f "$tmp/out12"
26101 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026102
Martin v. Löwiseba40652007-08-30 20:10:57 +000026103
26104 esac
26105
26106done # for ac_tag
26107
Guido van Rossum627b2d71993-12-24 10:39:16 +000026108
Martin v. Löwis11437992002-04-12 09:54:03 +000026109{ (exit 0); exit 0; }
26110_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026111chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026112ac_clean_files=$ac_clean_files_save
26113
26114
26115# configure is writing to config.log, and then calls config.status.
26116# config.status does its own redirection, appending to config.log.
26117# Unfortunately, on DOS this fails, as config.log is still kept open
26118# by configure, so config.status won't be able to write to it; its
26119# output is simply discarded. So we exec the FD to /dev/null,
26120# effectively closing config.log, so it can be properly (re)opened and
26121# appended to by config.status. When coming back to configure, we
26122# need to make the FD available again.
26123if test "$no_create" != yes; then
26124 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026125 ac_config_status_args=
26126 test "$silent" = yes &&
26127 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026128 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026129 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026130 exec 5>>config.log
26131 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26132 # would make configure fail if this is the last instruction.
26133 $ac_cs_success || { (exit 1); exit 1; }
26134fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026135
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026136
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026137echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026138if test ! -f Modules/Setup
26139then
26140 cp $srcdir/Modules/Setup.dist Modules/Setup
26141fi
26142
Martin v. Löwisf7afe952006-04-14 15:16:15 +000026143echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026144if test ! -f Modules/Setup.local
26145then
26146 echo "# Edit this file for local setup changes" >Modules/Setup.local
26147fi
26148
26149echo "creating Makefile"
26150$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26151 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026152 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000026153
26154case $ac_sys_system in
26155BeOS)
26156 { echo "$as_me:$LINENO: WARNING:
26157
26158 Support for BeOS is deprecated as of Python 2.6.
26159 See PEP 11 for the gory details.
26160 " >&5
26161echo "$as_me: WARNING:
26162
26163 Support for BeOS is deprecated as of Python 2.6.
26164 See PEP 11 for the gory details.
26165 " >&2;}
26166 ;;
26167*) ;;
26168esac
26169
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026170mv config.c Modules