blob: c9672d03430b0f58b4ba43053738c0abf99000be [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00002# From configure.in Revision: 74044 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004# Generated by GNU Autoconf 2.61 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009# 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=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # 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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +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
49 PATH_SEPARATOR=';'
50 else
51 PATH_SEPARATOR=:
52 fi
53 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.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000069as_nl='
70'
Martin v. Löwiseba40652007-08-30 20:10:57 +000071IFS=" "" $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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000093 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000094 { (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.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000106for 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
115 fi
116done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000117
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 ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000138echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000139 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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000164 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +0000165(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=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000247 # 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=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +0000268 # 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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000347 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+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +0000351fi
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.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000419 echo Please tell autoconf@gnu.org about your system,
420 echo including any error possibly output before this
421 echo message
Martin v. Löwiseba40652007-08-30 20:10:57 +0000422}
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" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 { (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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000485
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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000498 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +0000499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000500echo >conf$$.file
501if ln -s conf$$.file conf$$ 2>/dev/null; then
502 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'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000509elif ln conf$$.file conf$$ 2>/dev/null; then
510 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +0000511else
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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000535 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000536 else
537 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000538 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000539 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'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000578PACKAGE_VERSION='2.7'
579PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000580PACKAGE_BUGREPORT='http://bugs.python.org/'
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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000619ac_subst_vars='SHELL
Alexandre Vassalottia2db6872009-07-17 07:46:46 +0000620PATH_SEPARATOR
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000621PACKAGE_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
660ARCH_RUN_32BIT
661PYTHONFRAMEWORK
662PYTHONFRAMEWORKIDENTIFIER
663PYTHONFRAMEWORKDIR
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
698GNULD
699RANLIB
700AR
701ARFLAGS
702SVNVERSION
703INSTALL_PROGRAM
704INSTALL_SCRIPT
705INSTALL_DATA
706LN
707OPT
708BASECFLAGS
709UNIVERSAL_ARCH_FLAGS
710OTHER_LIBTOOL_OPT
711LIBTOOL_CRUFT
712SO
713LDSHARED
714BLDSHARED
715CCSHARED
716LINKFORSHARED
717CFLAGSFORSHARED
718SHLIBS
719USE_SIGNAL_MODULE
720SIGNAL_OBJS
721USE_THREAD_MODULE
722LDLAST
723THREADOBJ
724DLINCLDIR
725DYNLOADFILE
726MACHDEP_OBJS
727TRUE
728LIBOBJS
729HAVE_GETHOSTBYNAME_R_6_ARG
730HAVE_GETHOSTBYNAME_R_5_ARG
731HAVE_GETHOSTBYNAME_R_3_ARG
732HAVE_GETHOSTBYNAME_R
733HAVE_GETHOSTBYNAME
734LIBM
735LIBC
736UNICODE_OBJS
737THREADHEADERS
738SRCDIRS
739LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000740ac_subst_files=''
Martin v. Löwiseba40652007-08-30 20:10:57 +0000741 ac_precious_vars='build_alias
742host_alias
743target_alias
744CC
745CFLAGS
746LDFLAGS
747LIBS
748CPPFLAGS
749CPP'
750
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000753ac_init_help=
754ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# The variables have the same names as the options, with
756# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000757cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000758exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000760no_recursion=
761prefix=NONE
762program_prefix=NONE
763program_suffix=NONE
764program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000766site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000767srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000768verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000769x_includes=NONE
770x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000771
772# Installation directory options.
773# These are left unexpanded so users can "make install exec_prefix=/foo"
774# and all the variables that are supposed to be based on exec_prefix
775# by default will actually change.
776# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000777# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000778bindir='${exec_prefix}/bin'
779sbindir='${exec_prefix}/sbin'
780libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000781datarootdir='${prefix}/share'
782datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000783sysconfdir='${prefix}/etc'
784sharedstatedir='${prefix}/com'
785localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000786includedir='${prefix}/include'
787oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000788docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
789infodir='${datarootdir}/info'
790htmldir='${docdir}'
791dvidir='${docdir}'
792pdfdir='${docdir}'
793psdir='${docdir}'
794libdir='${exec_prefix}/lib'
795localedir='${datarootdir}/locale'
796mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000797
Guido van Rossum7f43da71994-08-01 12:15:30 +0000798ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000799ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000800for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000801do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802 # If the previous option needs an argument, assign it.
803 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000804 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805 ac_prev=
806 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808
Martin v. Löwiseba40652007-08-30 20:10:57 +0000809 case $ac_option in
810 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
811 *) ac_optarg=yes ;;
812 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814 # Accept the important Cygnus configure options, so we can diagnose typos.
815
Martin v. Löwiseba40652007-08-30 20:10:57 +0000816 case $ac_dashdash$ac_option in
817 --)
818 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000820 -bindir | --bindir | --bindi | --bind | --bin | --bi)
821 ac_prev=bindir ;;
822 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000823 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000824
825 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000826 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000828 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000830 -cache-file | --cache-file | --cache-fil | --cache-fi \
831 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
832 ac_prev=cache_file ;;
833 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
834 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000835 cache_file=$ac_optarg ;;
836
837 --config-cache | -C)
838 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839
Martin v. Löwiseba40652007-08-30 20:10:57 +0000840 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000844
Martin v. Löwiseba40652007-08-30 20:10:57 +0000845 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
846 | --dataroo | --dataro | --datar)
847 ac_prev=datarootdir ;;
848 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
849 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
850 datarootdir=$ac_optarg ;;
851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852 -disable-* | --disable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000853 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000855 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
856 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000857 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000858 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
859 eval enable_$ac_feature=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000860
861 -docdir | --docdir | --docdi | --doc | --do)
862 ac_prev=docdir ;;
863 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
864 docdir=$ac_optarg ;;
865
866 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
867 ac_prev=dvidir ;;
868 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
869 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870
871 -enable-* | --enable-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000872 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000873 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000874 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
875 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000877 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
878 eval enable_$ac_feature=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
881 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
882 | --exec | --exe | --ex)
883 ac_prev=exec_prefix ;;
884 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
885 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
886 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000887 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888
889 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000890 # Obsolete; use --with-gas.
891 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 -help | --help | --hel | --he | -h)
894 ac_init_help=long ;;
895 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
896 ac_init_help=recursive ;;
897 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
898 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
900 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
906 ac_prev=htmldir ;;
907 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
908 | --ht=*)
909 htmldir=$ac_optarg ;;
910
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000911 -includedir | --includedir | --includedi | --included | --include \
912 | --includ | --inclu | --incl | --inc)
913 ac_prev=includedir ;;
914 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
915 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917
918 -infodir | --infodir | --infodi | --infod | --info | --inf)
919 ac_prev=infodir ;;
920 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
923 -libdir | --libdir | --libdi | --libd)
924 ac_prev=libdir ;;
925 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
929 | --libexe | --libex | --libe)
930 ac_prev=libexecdir ;;
931 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
932 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -localedir | --localedir | --localedi | --localed | --locale)
936 ac_prev=localedir ;;
937 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
938 localedir=$ac_optarg ;;
939
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000940 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000941 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000942 ac_prev=localstatedir ;;
943 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +0000944 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000945 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946
947 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
948 ac_prev=mandir ;;
949 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000950 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000951
Guido van Rossum7f43da71994-08-01 12:15:30 +0000952 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953 # Obsolete; use --without-fp.
954 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 no_create=yes ;;
959
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
961 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
962 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000964 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
965 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
966 | --oldin | --oldi | --old | --ol | --o)
967 ac_prev=oldincludedir ;;
968 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
969 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
970 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000972
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
974 ac_prev=prefix ;;
975 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000976 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977
978 -program-prefix | --program-prefix | --program-prefi | --program-pref \
979 | --program-pre | --program-pr | --program-p)
980 ac_prev=program_prefix ;;
981 -program-prefix=* | --program-prefix=* | --program-prefi=* \
982 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000983 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
985 -program-suffix | --program-suffix | --program-suffi | --program-suff \
986 | --program-suf | --program-su | --program-s)
987 ac_prev=program_suffix ;;
988 -program-suffix=* | --program-suffix=* | --program-suffi=* \
989 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -program-transform-name | --program-transform-name \
993 | --program-transform-nam | --program-transform-na \
994 | --program-transform-n | --program-transform- \
995 | --program-transform | --program-transfor \
996 | --program-transfo | --program-transf \
997 | --program-trans | --program-tran \
998 | --progr-tra | --program-tr | --program-t)
999 ac_prev=program_transform_name ;;
1000 -program-transform-name=* | --program-transform-name=* \
1001 | --program-transform-nam=* | --program-transform-na=* \
1002 | --program-transform-n=* | --program-transform-=* \
1003 | --program-transform=* | --program-transfor=* \
1004 | --program-transfo=* | --program-transf=* \
1005 | --program-trans=* | --program-tran=* \
1006 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1010 ac_prev=pdfdir ;;
1011 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1012 pdfdir=$ac_optarg ;;
1013
1014 -psdir | --psdir | --psdi | --psd | --ps)
1015 ac_prev=psdir ;;
1016 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1017 psdir=$ac_optarg ;;
1018
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1020 | -silent | --silent | --silen | --sile | --sil)
1021 silent=yes ;;
1022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001023 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1024 ac_prev=sbindir ;;
1025 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1026 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1030 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1031 | --sharedst | --shareds | --shared | --share | --shar \
1032 | --sha | --sh)
1033 ac_prev=sharedstatedir ;;
1034 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1035 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1036 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1037 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001040 -site | --site | --sit)
1041 ac_prev=site ;;
1042 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044
Guido van Rossum7f43da71994-08-01 12:15:30 +00001045 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1046 ac_prev=srcdir ;;
1047 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1051 | --syscon | --sysco | --sysc | --sys | --sy)
1052 ac_prev=sysconfdir ;;
1053 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1054 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1063 verbose=yes ;;
1064
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 -version | --version | --versio | --versi | --vers | -V)
1066 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
1068 -with-* | --with-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001069 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -without-* | --without-*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001078 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 # Reject names that are not valid shell variable names.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001080 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 { echo "$as_me: error: invalid package name: $ac_package" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001083 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1084 eval with_$ac_package=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001086 --x)
1087 # Obsolete; use --with-x.
1088 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089
1090 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1091 | --x-incl | --x-inc | --x-in | --x-i)
1092 ac_prev=x_includes ;;
1093 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1094 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1098 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1099 ac_prev=x_libraries ;;
1100 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1101 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001104 -*) { echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001105Try \`$0 --help' for more information." >&2
1106 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 ;;
1108
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 *=*)
1110 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1111 # Reject names that are not valid shell variable names.
1112 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001113 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001115 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 export $ac_envvar ;;
1117
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001118 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001120 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001122 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ;;
1125
1126 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001127done
1128
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001131 { echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133fi
1134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001135# Be sure to have absolute directory names.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001136for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1137 datadir sysconfdir sharedstatedir localstatedir includedir \
1138 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1139 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001141 eval ac_val=\$$ac_var
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001143 [\\/$]* | ?:[\\/]* ) continue;;
1144 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001146 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001147 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001148done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001149
Martin v. Löwis11437992002-04-12 09:54:03 +00001150# There might be people who depend on the old broken behavior: `$host'
1151# used to hold the argument of --host etc.
1152# FIXME: To remove some day.
1153build=$build_alias
1154host=$host_alias
1155target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157# FIXME: To remove some day.
1158if test "x$host_alias" != x; then
1159 if test "x$build_alias" = x; then
1160 cross_compiling=maybe
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001161 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 If a cross compiler is detected then cross compile mode will be used." >&2
1163 elif test "x$build_alias" != "x$host_alias"; then
1164 cross_compiling=yes
1165 fi
1166fi
1167
1168ac_tool_prefix=
1169test -n "$host_alias" && ac_tool_prefix=$host_alias-
1170
1171test "$silent" = yes && exec 6>/dev/null
1172
Guido van Rossum627b2d71993-12-24 10:39:16 +00001173
Martin v. Löwiseba40652007-08-30 20:10:57 +00001174ac_pwd=`pwd` && test -n "$ac_pwd" &&
1175ac_ls_di=`ls -di .` &&
1176ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001177 { echo "$as_me: error: Working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001178 { (exit 1); exit 1; }; }
1179test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001180 { echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001181 { (exit 1); exit 1; }; }
1182
1183
Guido van Rossum627b2d71993-12-24 10:39:16 +00001184# Find the source files, if location was not specified.
1185if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001187 # Try the directory containing this script, then the parent directory.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001188 ac_confdir=`$as_dirname -- "$0" ||
1189$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1190 X"$0" : 'X\(//\)[^/]' \| \
1191 X"$0" : 'X\(//\)$' \| \
1192 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1193echo X"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001194 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1195 s//\1/
1196 q
1197 }
1198 /^X\(\/\/\)[^/].*/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)$/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\).*/{
1207 s//\1/
1208 q
1209 }
1210 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001212 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213 srcdir=..
1214 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001215else
1216 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001218if test ! -r "$srcdir/$ac_unique_file"; then
1219 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001220 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001223ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1224ac_abs_confdir=`(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001225 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001226 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001227 pwd)`
1228# When building in place, set srcdir=.
1229if test "$ac_abs_confdir" = "$ac_pwd"; then
1230 srcdir=.
1231fi
1232# Remove unnecessary trailing slashes from srcdir.
1233# Double slashes in file names in object file debugging info
1234# mess up M-x gdb in Emacs.
1235case $srcdir in
1236*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1237esac
1238for ac_var in $ac_precious_vars; do
1239 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1240 eval ac_env_${ac_var}_value=\$${ac_var}
1241 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1242 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1243done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001244
Martin v. Löwis11437992002-04-12 09:54:03 +00001245#
1246# Report the --help message.
1247#
1248if test "$ac_init_help" = "long"; then
1249 # Omit some internal or obsolete options to make the list less imposing.
1250 # This message is too long to be a string in the A/UX 3.1 sh.
1251 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001252\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001253
1254Usage: $0 [OPTION]... [VAR=VALUE]...
1255
1256To assign environment variables (e.g., CC, CFLAGS...), specify them as
1257VAR=VALUE. See below for descriptions of some of the useful variables.
1258
1259Defaults for the options are specified in brackets.
1260
1261Configuration:
1262 -h, --help display this help and exit
1263 --help=short display options specific to this package
1264 --help=recursive display the short help of all the included packages
1265 -V, --version display version information and exit
1266 -q, --quiet, --silent do not print \`checking...' messages
1267 --cache-file=FILE cache test results in FILE [disabled]
1268 -C, --config-cache alias for \`--cache-file=config.cache'
1269 -n, --no-create do not create output files
1270 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272Installation directories:
1273 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001274 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001276 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001277
1278By default, \`make install' will install all the files in
1279\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1280an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1281for instance \`--prefix=\$HOME'.
1282
1283For better control, use the options below.
1284
1285Fine tuning of the installation directories:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001286 --bindir=DIR user executables [EPREFIX/bin]
1287 --sbindir=DIR system admin executables [EPREFIX/sbin]
1288 --libexecdir=DIR program executables [EPREFIX/libexec]
1289 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1290 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1291 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1292 --libdir=DIR object code libraries [EPREFIX/lib]
1293 --includedir=DIR C header files [PREFIX/include]
1294 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1295 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1296 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1297 --infodir=DIR info documentation [DATAROOTDIR/info]
1298 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1299 --mandir=DIR man documentation [DATAROOTDIR/man]
1300 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1301 --htmldir=DIR html documentation [DOCDIR]
1302 --dvidir=DIR dvi documentation [DOCDIR]
1303 --pdfdir=DIR pdf documentation [DOCDIR]
1304 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001305_ACEOF
1306
1307 cat <<\_ACEOF
1308_ACEOF
1309fi
1310
1311if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001312 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001313 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001314 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001315 cat <<\_ACEOF
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001320 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001321 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001322 --enable-framework[=INSTALLDIR]
1323 Build (MacOSX|Darwin) framework
1324 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001325 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001326 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1327 --enable-ipv6 Enable ipv6 (with ipv4) support
1328 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001329 --enable-big-digits[=BITS]
1330 use big digits for Python longs [BITS=30]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001331 --enable-unicode[=ucs[24]]
1332 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +00001333
1334Optional Packages:
1335 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1336 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001337 --with-universal-archs=ARCH
1338 select architectures for universal build ("32-bit",
1339 "64-bit" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001340 --with-framework-name=FRAMEWORK
1341 specify an alternate name of the framework built
1342 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001343 --without-gcc never use gcc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001344 --with-cxx-main=<compiler>
1345 compile main() and link python executable with C++
1346 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001347 --with-suffix=.exe set executable suffix
1348 --with-pydebug build with Py_DEBUG defined
1349 --with-libs='lib1 ...' link against additional libs
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001350 --with-system-ffi build _ctypes module using an installed ffi library
Benjamin Peterson867475c2009-04-29 20:36:25 +00001351 --with-dbmliborder=db1:db2:...
1352 order to check db backends for dbm. Valid value is a
1353 colon separated string with the backend names
1354 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001355 --with-signal-module disable/enable signal module
1356 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1357 --with(out)-threads[=DIRECTORY]
1358 disable/enable thread support
1359 --with(out)-thread[=DIRECTORY]
1360 deprecated; use --with(out)-threads
1361 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001362 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001363 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001364 --with(out)-pymalloc disable/enable specialized mallocs
1365 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001366 --with-fpectl enable SIGFPE catching
1367 --with-libm=STRING math library
1368 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001369
1370Some influential environment variables:
1371 CC C compiler command
1372 CFLAGS C compiler flags
1373 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1374 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001375 LIBS libraries to pass to the linker, e.g. -l<library>
1376 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1377 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 CPP C preprocessor
1379
1380Use these variables to override the choices made by `configure' or to help
1381it to find libraries and programs with nonstandard names/locations.
1382
Georg Brandl464432d2009-05-20 18:24:08 +00001383Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001384_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001385ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001386fi
1387
1388if test "$ac_init_help" = "recursive"; then
1389 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001391 test -d "$ac_dir" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 ac_builddir=.
1393
Martin v. Löwiseba40652007-08-30 20:10:57 +00001394case "$ac_dir" in
1395.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001397 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001398 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001399 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001400 case $ac_top_builddir_sub in
1401 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1403 esac ;;
1404esac
1405ac_abs_top_builddir=$ac_pwd
1406ac_abs_builddir=$ac_pwd$ac_dir_suffix
1407# for backward compatibility:
1408ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001409
1410case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001411 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001413 ac_top_srcdir=$ac_top_builddir_sub
1414 ac_abs_top_srcdir=$ac_pwd ;;
1415 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001417 ac_top_srcdir=$srcdir
1418 ac_abs_top_srcdir=$srcdir ;;
1419 *) # Relative name.
1420 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1421 ac_top_srcdir=$ac_top_build_prefix$srcdir
1422 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001423esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001424ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001425
Martin v. Löwiseba40652007-08-30 20:10:57 +00001426 cd "$ac_dir" || { ac_status=$?; continue; }
1427 # Check for guested configure.
1428 if test -f "$ac_srcdir/configure.gnu"; then
1429 echo &&
1430 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1431 elif test -f "$ac_srcdir/configure"; then
1432 echo &&
1433 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001435 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001436 fi || ac_status=$?
1437 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 done
1439fi
1440
Martin v. Löwiseba40652007-08-30 20:10:57 +00001441test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001442if $ac_init_version; then
1443 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001444python configure 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001445generated by GNU Autoconf 2.61
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
Martin v. Löwiseba40652007-08-30 20:10:57 +00001447Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014482002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001449This configure script is free software; the Free Software Foundation
1450gives unlimited permission to copy, distribute and modify it.
1451_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001452 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001454cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001455This file contains any messages produced by compilers while
1456running configure, to aid debugging if configure makes a mistake.
1457
Martin v. Löwis174440b2008-10-03 08:59:41 +00001458It was created by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001459generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001460
1461 $ $0 $@
1462
1463_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001464exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001465{
1466cat <<_ASUNAME
1467## --------- ##
1468## Platform. ##
1469## --------- ##
1470
1471hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1472uname -m = `(uname -m) 2>/dev/null || echo unknown`
1473uname -r = `(uname -r) 2>/dev/null || echo unknown`
1474uname -s = `(uname -s) 2>/dev/null || echo unknown`
1475uname -v = `(uname -v) 2>/dev/null || echo unknown`
1476
1477/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1478/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1479
1480/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1481/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1482/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001483/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001484/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1485/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1486/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1487
1488_ASUNAME
1489
1490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1491for as_dir in $PATH
1492do
1493 IFS=$as_save_IFS
1494 test -z "$as_dir" && as_dir=.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001495 echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001496done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001498
1499} >&5
1500
1501cat >&5 <<_ACEOF
1502
1503
1504## ----------- ##
1505## Core tests. ##
1506## ----------- ##
1507
1508_ACEOF
1509
1510
1511# Keep a trace of the command line.
1512# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001513# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001514# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001515# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001517ac_configure_args0=
1518ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001519ac_must_keep_next=false
1520for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001521do
Skip Montanaro6dead952003-09-25 14:50:04 +00001522 for ac_arg
1523 do
1524 case $ac_arg in
1525 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1526 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1527 | -silent | --silent | --silen | --sile | --sil)
1528 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001529 *\'*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001530 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001531 esac
1532 case $ac_pass in
1533 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1534 2)
1535 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1536 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001537 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001538 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001539 case $ac_arg in
1540 *=* | --config-cache | -C | -disable-* | --disable-* \
1541 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1542 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1543 | -with-* | --with-* | -without-* | --without-* | --x)
1544 case "$ac_configure_args0 " in
1545 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1546 esac
1547 ;;
1548 -* ) ac_must_keep_next=true ;;
1549 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001550 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001552 ;;
1553 esac
1554 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001555done
Skip Montanaro6dead952003-09-25 14:50:04 +00001556$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1557$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 +00001558
1559# When interrupted or exit'd, cleanup temporary files, and complete
1560# config.log. We remove comments because anyway the quotes in there
1561# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562# WARNING: Use '\'' to represent an apostrophe within the trap.
1563# 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 +00001564trap 'exit_status=$?
1565 # Save into config.log some information that might help in debugging.
1566 {
1567 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001568
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 cat <<\_ASBOX
1570## ---------------- ##
1571## Cache variables. ##
1572## ---------------- ##
1573_ASBOX
1574 echo
1575 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001576(
1577 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1578 eval ac_val=\$$ac_var
1579 case $ac_val in #(
1580 *${as_nl}*)
1581 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001582 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1583echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001584 esac
1585 case $ac_var in #(
1586 _ | IFS | as_nl) ;; #(
1587 *) $as_unset $ac_var ;;
1588 esac ;;
1589 esac
1590 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001591 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1593 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001594 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001595 "s/'\''/'\''\\\\'\'''\''/g;
1596 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1597 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001598 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001599 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001600 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001601 esac |
1602 sort
1603)
Martin v. Löwis11437992002-04-12 09:54:03 +00001604 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001605
1606 cat <<\_ASBOX
1607## ----------------- ##
1608## Output variables. ##
1609## ----------------- ##
1610_ASBOX
1611 echo
1612 for ac_var in $ac_subst_vars
1613 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001614 eval ac_val=\$$ac_var
1615 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001616 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001617 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001618 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001619 done | sort
1620 echo
1621
1622 if test -n "$ac_subst_files"; then
1623 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001624## ------------------- ##
1625## File substitutions. ##
1626## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_files
1630 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001631 eval ac_val=\$$ac_var
1632 case $ac_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001634 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001635 echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001636 done | sort
1637 echo
1638 fi
1639
Martin v. Löwis11437992002-04-12 09:54:03 +00001640 if test -s confdefs.h; then
1641 cat <<\_ASBOX
1642## ----------- ##
1643## confdefs.h. ##
1644## ----------- ##
1645_ASBOX
1646 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001647 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001648 echo
1649 fi
1650 test "$ac_signal" != 0 &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001651 echo "$as_me: caught signal $ac_signal"
1652 echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001653 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001654 rm -f core *.core core.conftest.* &&
1655 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001656 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001657' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001658for ac_signal in 1 2 13 15; do
1659 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1660done
1661ac_signal=0
1662
1663# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001664rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001665
1666# Predefined preprocessor variables.
1667
1668cat >>confdefs.h <<_ACEOF
1669#define PACKAGE_NAME "$PACKAGE_NAME"
1670_ACEOF
1671
1672
1673cat >>confdefs.h <<_ACEOF
1674#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1675_ACEOF
1676
1677
1678cat >>confdefs.h <<_ACEOF
1679#define PACKAGE_VERSION "$PACKAGE_VERSION"
1680_ACEOF
1681
1682
1683cat >>confdefs.h <<_ACEOF
1684#define PACKAGE_STRING "$PACKAGE_STRING"
1685_ACEOF
1686
1687
1688cat >>confdefs.h <<_ACEOF
1689#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1690_ACEOF
1691
1692
1693# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001694# Prefer explicitly selected file to automatically selected ones.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695if test -n "$CONFIG_SITE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001696 set x "$CONFIG_SITE"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001697elif test "x$prefix" != xNONE; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001698 set x "$prefix/share/config.site" "$prefix/etc/config.site"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001700 set x "$ac_default_prefix/share/config.site" \
1701 "$ac_default_prefix/etc/config.site"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001703shift
1704for ac_site_file
Martin v. Löwiseba40652007-08-30 20:10:57 +00001705do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706 if test -r "$ac_site_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001707 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1708echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001710 . "$ac_site_file"
1711 fi
1712done
1713
1714if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001715 # Some versions of bash will fail to source /dev/null (special
1716 # files actually), so we avoid doing that.
1717 if test -f "$cache_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001718 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1719echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001723 esac
1724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001725else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001726 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1727echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001728 >$cache_file
1729fi
1730
1731# Check that the precious variables saved in the cache have kept the same
1732# value.
1733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001739 case $ac_old_set,$ac_new_set in
1740 set,)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001741 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1742echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 ac_cache_corrupted=: ;;
1744 ,set)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001745 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1746echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 ac_cache_corrupted=: ;;
1748 ,);;
1749 *)
1750 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001751 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1752echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1753 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1754echo "$as_me: former value: $ac_old_val" >&2;}
1755 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1756echo "$as_me: current value: $ac_new_val" >&2;}
1757 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 fi;;
1759 esac
1760 # Pass precious variables to config.status.
1761 if test "$ac_new_set" = set; then
1762 case $ac_new_val in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001763 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001764 *) ac_arg=$ac_var=$ac_new_val ;;
1765 esac
1766 case " $ac_configure_args " in
1767 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1768 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1769 esac
1770 fi
1771done
1772if $ac_cache_corrupted; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001773 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1774echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1775 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1776echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001777 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001778fi
1779
Martin v. Löwiseba40652007-08-30 20:10:57 +00001780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
Guido van Rossum7f43da71994-08-01 12:15:30 +00001804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810
Michael W. Hudson54241132001-12-07 15:38:26 +00001811
Martin v. Löwiseba40652007-08-30 20:10:57 +00001812ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001813
1814
Martin v. Löwis11437992002-04-12 09:54:03 +00001815
Georg Brandlbcd64a32009-03-31 21:45:18 +00001816if test "$prefix" != "/"; then
1817 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1818fi
1819
1820
Martin v. Löwis11437992002-04-12 09:54:03 +00001821
1822
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001823
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001824
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001825# We don't use PACKAGE_ variables, and they cause conflicts
1826# with other autoconf-based packages that include Python.h
1827grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1828rm confdefs.h
1829mv confdefs.h.new confdefs.h
1830
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001831
Martin v. Löwis174440b2008-10-03 08:59:41 +00001832VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001833
Martin v. Löwis1142de32002-03-29 16:28:31 +00001834
1835SOVERSION=1.0
1836
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001837# The later defininition of _XOPEN_SOURCE disables certain features
1838# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1839
1840cat >>confdefs.h <<\_ACEOF
1841#define _GNU_SOURCE 1
1842_ACEOF
1843
1844
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001845# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1846# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1847# them.
1848
1849cat >>confdefs.h <<\_ACEOF
1850#define _NETBSD_SOURCE 1
1851_ACEOF
1852
1853
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001854# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1855# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1856# them.
1857
1858cat >>confdefs.h <<\_ACEOF
1859#define __BSD_VISIBLE 1
1860_ACEOF
1861
1862
Martin v. Löwisd6320502004-08-12 13:45:08 +00001863# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1864# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1865
1866cat >>confdefs.h <<\_ACEOF
1867#define _BSD_TYPES 1
1868_ACEOF
1869
1870
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001871# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1872# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1873# them.
1874
1875cat >>confdefs.h <<\_ACEOF
1876#define _DARWIN_C_SOURCE 1
1877_ACEOF
1878
1879
1880
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001881define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001882
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001883# Arguments passed to configure.
1884
1885CONFIG_ARGS="$ac_configure_args"
1886
Martin v. Löwiseba40652007-08-30 20:10:57 +00001887# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001888if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001889 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001890 case $enableval in
1891 yes)
1892 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1893 ;;
1894 esac
1895 case $enableval in
1896 no)
1897 UNIVERSALSDK=
1898 enable_universalsdk=
1899 ;;
1900 *)
1901 UNIVERSALSDK=$enableval
1902 ;;
1903 esac
1904
1905else
1906
1907 UNIVERSALSDK=
1908 enable_universalsdk=
1909
Martin v. Löwiseba40652007-08-30 20:10:57 +00001910fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00001911
1912
Martin v. Löwiseba40652007-08-30 20:10:57 +00001913
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00001914ARCH_RUN_32BIT=
1915
1916
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001917UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001918{ echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
1919echo $ECHO_N "checking for --with-universal-archs... $ECHO_C" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001920
1921# Check whether --with-universal-archs was given.
1922if test "${with_universal_archs+set}" = set; then
1923 withval=$with_universal_archs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001924 { echo "$as_me:$LINENO: result: $withval" >&5
1925echo "${ECHO_T}$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001926 UNIVERSAL_ARCHS="$withval"
1927
1928else
1929
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00001930 { echo "$as_me:$LINENO: result: 32-bit" >&5
1931echo "${ECHO_T}32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001932
1933fi
1934
1935
1936
1937
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001938
1939# Check whether --with-framework-name was given.
1940if test "${with_framework_name+set}" = set; then
1941 withval=$with_framework_name;
1942 PYTHONFRAMEWORK=${withval}
1943 PYTHONFRAMEWORKDIR=${withval}.framework
1944 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
1945
1946else
1947
1948 PYTHONFRAMEWORK=Python
1949 PYTHONFRAMEWORKDIR=Python.framework
1950 PYTHONFRAMEWORKIDENTIFIER=org.python.python
1951
1952fi
1953
Martin v. Löwiseba40652007-08-30 20:10:57 +00001954# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001955if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00001956 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00001957 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001958 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001959 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001960 esac
1961 case $enableval in
1962 no)
1963 PYTHONFRAMEWORK=
1964 PYTHONFRAMEWORKDIR=no-framework
1965 PYTHONFRAMEWORKPREFIX=
1966 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001967 FRAMEWORKINSTALLFIRST=
1968 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001969 FRAMEWORKALTINSTALLFIRST=
1970 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001971 if test "x${prefix}" = "xNONE"; then
1972 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1973 else
1974 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1975 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001976 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001977 ;;
1978 *)
1979 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001980 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001981 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001982 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
1983 if test "$UNIVERSAL_ARCHS" = "all"
1984 then
1985 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001986 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001987 else
Ronald Oussorenbb8cb0e2009-03-30 17:53:39 +00001988 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001989 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1990 fi
1991
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001992 if test "x${prefix}" = "xNONE" ; then
1993 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1994 else
1995 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1996 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001997 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00001998
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001999 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002000 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002001 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002002
Martin v. Löwiseba40652007-08-30 20:10:57 +00002003 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002004
Martin v. Löwiseba40652007-08-30 20:10:57 +00002005 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002006
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002007 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2008
2009 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2010
Jack Jansene578a632001-08-15 01:27:14 +00002011 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002012
Guido van Rossum563e7081996-09-10 18:20:48 +00002013else
Martin v. Löwis11437992002-04-12 09:54:03 +00002014
Jack Jansene578a632001-08-15 01:27:14 +00002015 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002016 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002017 PYTHONFRAMEWORKPREFIX=
2018 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002019 FRAMEWORKINSTALLFIRST=
2020 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002021 FRAMEWORKALTINSTALLFIRST=
2022 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002023 if test "x${prefix}" = "xNONE" ; then
2024 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2025 else
2026 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2027 fi
Jack Jansene578a632001-08-15 01:27:14 +00002028 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002029
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002030 if test "$UNIVERSAL_ARCHS" = "all"
2031 then
2032 FRAMEWORKINSTALLLAST=update4wayuniversal
2033 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2034 fi
2035
Martin v. Löwiseba40652007-08-30 20:10:57 +00002036fi
2037
Michael W. Hudson54241132001-12-07 15:38:26 +00002038
2039
2040
2041
Jack Jansene578a632001-08-15 01:27:14 +00002042
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002043
2044
Ronald Oussoren5b787322006-06-06 19:50:24 +00002045
2046
2047
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002048
Jack Jansene578a632001-08-15 01:27:14 +00002049##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002050## AC_HELP_STRING(--with-dyld,
2051## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002052##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002053# Set name for machine-dependent library files
2054
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002055{ echo "$as_me:$LINENO: checking MACHDEP" >&5
2056echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002057if test -z "$MACHDEP"
2058then
Guido van Rossum563e7081996-09-10 18:20:48 +00002059 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002060 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2061 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002062 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002063 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002064 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002065 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002066 ac_md_system=`echo $ac_sys_system |
2067 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2068 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002069 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002070 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002071
Guido van Rossum07397971997-04-29 21:49:50 +00002072 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002073 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002074 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002075 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002076 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002077 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002078 esac
2079fi
Guido van Rossum91922671997-10-09 20:24:13 +00002080
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002081# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2082# disable features if it is defined, without any means to access these
2083# features as extensions. For these systems, we skip the definition of
2084# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2085# some feature, make sure there is no alternative way to access this
2086# feature. Also, when using wildcards, make sure you have verified the
2087# need for not defining _XOPEN_SOURCE on all systems matching the
2088# wildcard, and that the wildcard does not include future systems
2089# (which may remove their limitations).
2090case $ac_sys_system/$ac_sys_release in
2091 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2092 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002093 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Gregory P. Smithcc023f12008-09-07 05:15:58 +00002094 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002095 define_xopen_source=no
2096 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2097 # also defined. This can be overridden by defining _BSD_SOURCE
2098 # As this has a different meaning on Linux, only define it on OpenBSD
2099
2100cat >>confdefs.h <<\_ACEOF
2101#define _BSD_SOURCE 1
2102_ACEOF
2103
2104 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002105 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2106 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2107 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00002108 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 +00002109 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002110 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2111 # of union __?sigval. Reported by Stuart Bishop.
2112 SunOS/5.6)
2113 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002114 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2115 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002116 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002117 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002118 define_xopen_source=no;;
2119 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002120 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002121 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002122 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00002123 # On FreeBSD 4, the math functions C89 does not cover are never defined
2124 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2125 FreeBSD/4.*)
2126 define_xopen_source=no;;
2127 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2128 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2129 # identifies itself as Darwin/7.*
2130 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2131 # disables platform specific features beyond repair.
2132 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2133 # has no effect, don't bother defining them
2134 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002135 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002136 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2137 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2138 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002139 AIX/4)
2140 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002141 AIX/5)
2142 if test `uname -r` -eq 1; then
2143 define_xopen_source=no
2144 fi
2145 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002146 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2147 # defining NI_NUMERICHOST.
2148 QNX/6.3.2)
2149 define_xopen_source=no
2150 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002151
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002152esac
2153
2154if test $define_xopen_source = yes
2155then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002156 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2157 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002158 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2159 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002161 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002162
2163cat >>confdefs.h <<\_ACEOF
2164#define _XOPEN_SOURCE 500
2165_ACEOF
2166
2167 ;;
2168 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002169
2170cat >>confdefs.h <<\_ACEOF
2171#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002172_ACEOF
2173
Skip Montanarof0d5f792004-08-15 14:08:23 +00002174 ;;
2175 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002176
2177 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2178 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2179 # several APIs are not declared. Since this is also needed in some
2180 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002181 # except for Solaris 10, where it must not be defined,
2182 # as it implies XPG4.2
2183 case $ac_sys_system/$ac_sys_release in
2184 SunOS/5.10)
2185 ;;
2186 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002187
2188cat >>confdefs.h <<\_ACEOF
2189#define _XOPEN_SOURCE_EXTENDED 1
2190_ACEOF
2191
Martin v. Löwis7dece662005-11-26 11:38:24 +00002192 ;;
2193 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002194
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002195
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002196cat >>confdefs.h <<\_ACEOF
2197#define _POSIX_C_SOURCE 200112L
2198_ACEOF
2199
2200
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002201fi
2202
Guido van Rossum91922671997-10-09 20:24:13 +00002203#
2204# SGI compilers allow the specification of the both the ABI and the
2205# ISA on the command line. Depending on the values of these switches,
2206# different and often incompatable code will be generated.
2207#
2208# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2209# thus supply support for various ABI/ISA combinations. The MACHDEP
2210# variable is also adjusted.
2211#
2212
2213if test ! -z "$SGI_ABI"
2214then
2215 CC="cc $SGI_ABI"
2216 LDFLAGS="$SGI_ABI $LDFLAGS"
2217 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2218fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002219{ echo "$as_me:$LINENO: result: $MACHDEP" >&5
2220echo "${ECHO_T}$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002221
Jack Jansen83f898c2002-12-30 22:23:40 +00002222# And add extra plat-mac for darwin
2223
Jack Jansen7b59b422003-03-17 15:44:10 +00002224
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002225{ echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2226echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002227if test -z "$EXTRAPLATDIR"
2228then
2229 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002230 darwin)
2231 EXTRAPLATDIR="\$(PLATMACDIRS)"
2232 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2233 ;;
2234 *)
2235 EXTRAPLATDIR=""
2236 EXTRAMACHDEPPATH=""
2237 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002238 esac
2239fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002240{ echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2241echo "${ECHO_T}$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002242
Jack Jansen6b08a402004-06-03 12:41:45 +00002243# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2244# it may influence the way we can build extensions, so distutils
2245# needs to check it
2246
Ronald Oussoren988117f2006-04-29 11:31:35 +00002247
Jack Jansen6b08a402004-06-03 12:41:45 +00002248CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002249EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002251{ echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2252echo $ECHO_N "checking machine type as reported by uname -m... $ECHO_C" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002253ac_sys_machine=`uname -m`
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002254{ echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2255echo "${ECHO_T}$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002256
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002258
2259# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2260# for debug/optimization stuff. BASECFLAGS is for flags that are required
2261# just to get things to compile and link. Users are free to override OPT
2262# when running configure or make. The build should not break if they do.
2263# BASECFLAGS should generally not be messed with, however.
2264
2265# XXX shouldn't some/most/all of this code be merged with the stuff later
2266# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002267{ echo "$as_me:$LINENO: checking for --without-gcc" >&5
2268echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002269
Martin v. Löwiseba40652007-08-30 20:10:57 +00002270# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002271if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002272 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002273 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00002274 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002275 without_gcc=yes;;
2276 yes) CC=gcc
2277 without_gcc=no;;
2278 *) CC=$withval
2279 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002280 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002281else
Martin v. Löwis11437992002-04-12 09:54:03 +00002282
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002283 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002284 AIX*) CC=cc_r
2285 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002286 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002287 case $BE_HOST_CPU in
2288 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002289 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002290 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002291 BASECFLAGS="$BASECFLAGS -export pragma"
2292 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002293 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002294 ;;
2295 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002296 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002297 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002298 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002299 ;;
2300 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002301 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2302echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002303 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002304 ;;
2305 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002306 AR="\$(srcdir)/Modules/ar_beos"
2307 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002308 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002309 Monterey*)
2310 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002311 without_gcc=;;
2312 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002313 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002314fi
2315
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002316{ echo "$as_me:$LINENO: result: $without_gcc" >&5
2317echo "${ECHO_T}$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002318
Guido van Rossum8b131c51995-03-09 14:10:13 +00002319# If the user switches compilers, we can't believe the cache
2320if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2321then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002322 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002323(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002324echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002325(it is also a good idea to do 'make clean' before compiling)" >&2;}
2326 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002327fi
2328
Martin v. Löwis11437992002-04-12 09:54:03 +00002329ac_ext=c
2330ac_cpp='$CPP $CPPFLAGS'
2331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2333ac_compiler_gnu=$ac_cv_c_compiler_gnu
2334if test -n "$ac_tool_prefix"; then
2335 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2336set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002337{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002339if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002340 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002341else
2342 if test -n "$CC"; then
2343 ac_cv_prog_CC="$CC" # Let the user override the test.
2344else
Martin v. Löwis11437992002-04-12 09:54:03 +00002345as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2346for as_dir in $PATH
2347do
2348 IFS=$as_save_IFS
2349 test -z "$as_dir" && as_dir=.
2350 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002351 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 +00002352 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002353 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002354 break 2
2355 fi
2356done
2357done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002358IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002359
Jack Jansendd19cf82001-12-06 22:36:17 +00002360fi
2361fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002362CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002363if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002364 { echo "$as_me:$LINENO: result: $CC" >&5
2365echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002366else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002367 { echo "$as_me:$LINENO: result: no" >&5
2368echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002369fi
2370
Martin v. Löwiseba40652007-08-30 20:10:57 +00002371
Martin v. Löwis11437992002-04-12 09:54:03 +00002372fi
2373if test -z "$ac_cv_prog_CC"; then
2374 ac_ct_CC=$CC
2375 # Extract the first word of "gcc", so it can be a program name with args.
2376set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002377{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002379if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002380 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002381else
2382 if test -n "$ac_ct_CC"; then
2383 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2384else
2385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2386for as_dir in $PATH
2387do
2388 IFS=$as_save_IFS
2389 test -z "$as_dir" && as_dir=.
2390 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002391 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 +00002392 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002393 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002394 break 2
2395 fi
2396done
2397done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002398IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002399
2400fi
2401fi
2402ac_ct_CC=$ac_cv_prog_ac_ct_CC
2403if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002404 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2405echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002406else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002407 { echo "$as_me:$LINENO: result: no" >&5
2408echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002409fi
2410
Martin v. Löwiseba40652007-08-30 20:10:57 +00002411 if test "x$ac_ct_CC" = x; then
2412 CC=""
2413 else
2414 case $cross_compiling:$ac_tool_warned in
2415yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002416{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2417whose name does not start with the host triplet. If you think this
2418configuration is useful to you, please write to autoconf@gnu.org." >&5
2419echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2420whose name does not start with the host triplet. If you think this
2421configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002422ac_tool_warned=yes ;;
2423esac
2424 CC=$ac_ct_CC
2425 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002426else
2427 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002428fi
2429
Jack Jansendd19cf82001-12-06 22:36:17 +00002430if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002431 if test -n "$ac_tool_prefix"; then
2432 # 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 +00002433set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002434{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2435echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002436if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002437 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002438else
2439 if test -n "$CC"; then
2440 ac_cv_prog_CC="$CC" # Let the user override the test.
2441else
Martin v. Löwis11437992002-04-12 09:54:03 +00002442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2443for as_dir in $PATH
2444do
2445 IFS=$as_save_IFS
2446 test -z "$as_dir" && as_dir=.
2447 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002448 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002450 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002451 break 2
2452 fi
2453done
2454done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002456
2457fi
2458fi
2459CC=$ac_cv_prog_CC
2460if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002461 { echo "$as_me:$LINENO: result: $CC" >&5
2462echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002464 { echo "$as_me:$LINENO: result: no" >&5
2465echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002466fi
2467
Martin v. Löwiseba40652007-08-30 20:10:57 +00002468
Martin v. Löwis11437992002-04-12 09:54:03 +00002469 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002470fi
2471if test -z "$CC"; then
2472 # Extract the first word of "cc", so it can be a program name with args.
2473set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002474{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2475echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002476if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002477 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002478else
2479 if test -n "$CC"; then
2480 ac_cv_prog_CC="$CC" # Let the user override the test.
2481else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002482 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486 IFS=$as_save_IFS
2487 test -z "$as_dir" && as_dir=.
2488 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002489 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 +00002490 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2491 ac_prog_rejected=yes
2492 continue
2493 fi
2494 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002495 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002496 break 2
2497 fi
2498done
2499done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002500IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002502if test $ac_prog_rejected = yes; then
2503 # We found a bogon in the path, so make sure we never use it.
2504 set dummy $ac_cv_prog_CC
2505 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002506 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002507 # We chose a different compiler from the bogus one.
2508 # However, it has the same basename, so the bogon will be chosen
2509 # first if we set CC to just the basename; use the full file name.
2510 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002512 fi
2513fi
2514fi
2515fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002516CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002517if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002518 { echo "$as_me:$LINENO: result: $CC" >&5
2519echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002520else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002521 { echo "$as_me:$LINENO: result: no" >&5
2522echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002523fi
2524
Martin v. Löwiseba40652007-08-30 20:10:57 +00002525
Martin v. Löwis11437992002-04-12 09:54:03 +00002526fi
2527if test -z "$CC"; then
2528 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002529 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002530 do
2531 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2532set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002533{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2534echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002535if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002536 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002537else
2538 if test -n "$CC"; then
2539 ac_cv_prog_CC="$CC" # Let the user override the test.
2540else
Martin v. Löwis11437992002-04-12 09:54:03 +00002541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542for as_dir in $PATH
2543do
2544 IFS=$as_save_IFS
2545 test -z "$as_dir" && as_dir=.
2546 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002547 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 +00002548 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002549 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002550 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002551 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002552done
2553done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002554IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
2556fi
2557fi
2558CC=$ac_cv_prog_CC
2559if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002560 { echo "$as_me:$LINENO: result: $CC" >&5
2561echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002563 { echo "$as_me:$LINENO: result: no" >&5
2564echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002565fi
2566
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567
Martin v. Löwis11437992002-04-12 09:54:03 +00002568 test -n "$CC" && break
2569 done
2570fi
2571if test -z "$CC"; then
2572 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002574do
2575 # Extract the first word of "$ac_prog", so it can be a program name with args.
2576set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002577{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2578echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002579if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002580 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002581else
2582 if test -n "$ac_ct_CC"; then
2583 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2584else
2585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2586for as_dir in $PATH
2587do
2588 IFS=$as_save_IFS
2589 test -z "$as_dir" && as_dir=.
2590 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 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 +00002592 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002593 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002594 break 2
2595 fi
2596done
2597done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002598IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002599
Martin v. Löwis11437992002-04-12 09:54:03 +00002600fi
2601fi
2602ac_ct_CC=$ac_cv_prog_ac_ct_CC
2603if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002604 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2605echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002606else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002607 { echo "$as_me:$LINENO: result: no" >&5
2608echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002609fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002610
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 test -n "$ac_ct_CC" && break
2613done
Michael W. Hudson54241132001-12-07 15:38:26 +00002614
Martin v. Löwiseba40652007-08-30 20:10:57 +00002615 if test "x$ac_ct_CC" = x; then
2616 CC=""
2617 else
2618 case $cross_compiling:$ac_tool_warned in
2619yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002620{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2621whose name does not start with the host triplet. If you think this
2622configuration is useful to you, please write to autoconf@gnu.org." >&5
2623echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2624whose name does not start with the host triplet. If you think this
2625configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002626ac_tool_warned=yes ;;
2627esac
2628 CC=$ac_ct_CC
2629 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002630fi
2631
2632fi
2633
2634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002635test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002636See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002637echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002638See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002639 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002640
2641# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002642echo "$as_me:$LINENO: checking for C compiler version" >&5
2643ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644{ (ac_try="$ac_compiler --version >&5"
2645case "(($ac_try" in
2646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2647 *) ac_try_echo=$ac_try;;
2648esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654{ (ac_try="$ac_compiler -v >&5"
2655case "(($ac_try" in
2656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2657 *) ac_try_echo=$ac_try;;
2658esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002660 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002664{ (ac_try="$ac_compiler -V >&5"
2665case "(($ac_try" in
2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2667 *) ac_try_echo=$ac_try;;
2668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002670 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 (exit $ac_status); }
2674
2675cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002676/* confdefs.h. */
2677_ACEOF
2678cat confdefs.h >>conftest.$ac_ext
2679cat >>conftest.$ac_ext <<_ACEOF
2680/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682int
2683main ()
2684{
2685
2686 ;
2687 return 0;
2688}
2689_ACEOF
2690ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002691ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002692# Try to create an executable without -o first, disregard a.out.
2693# It will help us diagnose broken compilers, and finding out an intuition
2694# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002695{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2696echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2697ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2698#
2699# List of possible output files, starting from the most likely.
2700# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2701# only as a last resort. b.out is created by i960 compilers.
2702ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2703#
2704# The IRIX 6 linker writes into existing files which may not be
2705# executable, retaining their permissions. Remove them first so a
2706# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002707ac_rmfiles=
2708for ac_file in $ac_files
2709do
2710 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002711 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002712 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2713 esac
2714done
2715rm -f $ac_rmfiles
2716
2717if { (ac_try="$ac_link_default"
2718case "(($ac_try" in
2719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2720 *) ac_try_echo=$ac_try;;
2721esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002723 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002727 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2728# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2729# in a Makefile. We should not override ac_cv_exeext if it was cached,
2730# so that the user can short-circuit this test for compilers unknown to
2731# Autoconf.
2732for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002733do
2734 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002736 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002737 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002738 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002739 # We found the default executable, but exeext='' is most
2740 # certainly right.
2741 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002742 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002743 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2744 then :; else
2745 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2746 fi
2747 # We set ac_cv_exeext here because the later test for it is not
2748 # safe: cross compilers may not add the suffix if given an `-o'
2749 # argument, so we may need to know it at that point already.
2750 # Even if this section looks crufty: it has the advantage of
2751 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002752 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002753 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002754 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 esac
2756done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002757test "$ac_cv_exeext" = no && ac_cv_exeext=
2758
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002759else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002760 ac_file=''
2761fi
2762
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002763{ echo "$as_me:$LINENO: result: $ac_file" >&5
2764echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002765if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002766 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002767sed 's/^/| /' conftest.$ac_ext >&5
2768
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002769{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002770See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002771echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002772See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002773 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002774fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002775
Martin v. Löwis11437992002-04-12 09:54:03 +00002776ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002777
Martin v. Löwiseba40652007-08-30 20:10:57 +00002778# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002779# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002780{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2781echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002782# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2783# If not cross compiling, check that we can run a simple program.
2784if test "$cross_compiling" != yes; then
2785 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002786 { (case "(($ac_try" in
2787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2788 *) ac_try_echo=$ac_try;;
2789esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002791 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002792 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002794 (exit $ac_status); }; }; then
2795 cross_compiling=no
2796 else
2797 if test "$cross_compiling" = maybe; then
2798 cross_compiling=yes
2799 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002800 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002801If you meant to cross compile, use \`--host'.
2802See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002803echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002804If you meant to cross compile, use \`--host'.
2805See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002807 fi
2808 fi
2809fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002810{ echo "$as_me:$LINENO: result: yes" >&5
2811echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002812
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002813rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002814ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002815# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002816# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002817{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2818echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2819{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2820echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002821
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002822{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2823echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002824if { (ac_try="$ac_link"
2825case "(($ac_try" in
2826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2827 *) ac_try_echo=$ac_try;;
2828esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002830 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002831 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002833 (exit $ac_status); }; then
2834 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2835# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2836# work properly (i.e., refer to `conftest.exe'), while it won't with
2837# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002838for ac_file in conftest.exe conftest conftest.*; do
2839 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002840 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002841 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002842 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002843 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002844 * ) break;;
2845 esac
2846done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002848 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002849See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002850echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002851See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002852 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002853fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002854
Martin v. Löwis11437992002-04-12 09:54:03 +00002855rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002856{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2857echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002858
2859rm -f conftest.$ac_ext
2860EXEEXT=$ac_cv_exeext
2861ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002862{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2863echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002864if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002865 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002866else
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002868/* confdefs.h. */
2869_ACEOF
2870cat confdefs.h >>conftest.$ac_ext
2871cat >>conftest.$ac_ext <<_ACEOF
2872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002873
Martin v. Löwis11437992002-04-12 09:54:03 +00002874int
2875main ()
2876{
2877
2878 ;
2879 return 0;
2880}
2881_ACEOF
2882rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002883if { (ac_try="$ac_compile"
2884case "(($ac_try" in
2885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2886 *) ac_try_echo=$ac_try;;
2887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002889 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002892 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002893 for ac_file in conftest.o conftest.obj conftest.*; do
2894 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002896 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002897 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2898 break;;
2899 esac
2900done
2901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002903sed 's/^/| /' conftest.$ac_ext >&5
2904
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002905{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002906See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002907echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002908See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002909 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002910fi
2911
2912rm -f conftest.$ac_cv_objext conftest.$ac_ext
2913fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002914{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2915echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916OBJEXT=$ac_cv_objext
2917ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002918{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2919echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002920if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002921 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002922else
2923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002929
Martin v. Löwis11437992002-04-12 09:54:03 +00002930int
2931main ()
2932{
2933#ifndef __GNUC__
2934 choke me
2935#endif
2936
2937 ;
2938 return 0;
2939}
2940_ACEOF
2941rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00002942if { (ac_try="$ac_compile"
2943case "(($ac_try" in
2944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2945 *) ac_try_echo=$ac_try;;
2946esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002948 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002950 grep -v '^ *+' conftest.er1 >conftest.err
2951 rm -f conftest.er1
2952 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002954 (exit $ac_status); } && {
2955 test -z "$ac_c_werror_flag" ||
2956 test ! -s conftest.err
2957 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002958 ac_compiler_gnu=yes
2959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002961sed 's/^/| /' conftest.$ac_ext >&5
2962
Martin v. Löwiseba40652007-08-30 20:10:57 +00002963 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00002965
2966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002967ac_cv_c_compiler_gnu=$ac_compiler_gnu
2968
2969fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002970{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2971echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2972GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00002973ac_test_CFLAGS=${CFLAGS+set}
2974ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002975{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2976echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002977if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002978 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002979else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002980 ac_save_c_werror_flag=$ac_c_werror_flag
2981 ac_c_werror_flag=yes
2982 ac_cv_prog_cc_g=no
2983 CFLAGS="-g"
2984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991int
2992main ()
2993{
2994
2995 ;
2996 return 0;
2997}
2998_ACEOF
2999rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003000if { (ac_try="$ac_compile"
3001case "(($ac_try" in
3002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3003 *) ac_try_echo=$ac_try;;
3004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003008 grep -v '^ *+' conftest.er1 >conftest.err
3009 rm -f conftest.er1
3010 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003012 (exit $ac_status); } && {
3013 test -z "$ac_c_werror_flag" ||
3014 test ! -s conftest.err
3015 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003016 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003017else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003019sed 's/^/| /' conftest.$ac_ext >&5
3020
Martin v. Löwiseba40652007-08-30 20:10:57 +00003021 CFLAGS=""
3022 cat >conftest.$ac_ext <<_ACEOF
3023/* confdefs.h. */
3024_ACEOF
3025cat confdefs.h >>conftest.$ac_ext
3026cat >>conftest.$ac_ext <<_ACEOF
3027/* end confdefs.h. */
3028
3029int
3030main ()
3031{
3032
3033 ;
3034 return 0;
3035}
3036_ACEOF
3037rm -f conftest.$ac_objext
3038if { (ac_try="$ac_compile"
3039case "(($ac_try" in
3040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3041 *) ac_try_echo=$ac_try;;
3042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003044 (eval "$ac_compile") 2>conftest.er1
3045 ac_status=$?
3046 grep -v '^ *+' conftest.er1 >conftest.err
3047 rm -f conftest.er1
3048 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003050 (exit $ac_status); } && {
3051 test -z "$ac_c_werror_flag" ||
3052 test ! -s conftest.err
3053 } && test -s conftest.$ac_objext; then
3054 :
3055else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003056 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003057sed 's/^/| /' conftest.$ac_ext >&5
3058
3059 ac_c_werror_flag=$ac_save_c_werror_flag
3060 CFLAGS="-g"
3061 cat >conftest.$ac_ext <<_ACEOF
3062/* confdefs.h. */
3063_ACEOF
3064cat confdefs.h >>conftest.$ac_ext
3065cat >>conftest.$ac_ext <<_ACEOF
3066/* end confdefs.h. */
3067
3068int
3069main ()
3070{
3071
3072 ;
3073 return 0;
3074}
3075_ACEOF
3076rm -f conftest.$ac_objext
3077if { (ac_try="$ac_compile"
3078case "(($ac_try" in
3079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3080 *) ac_try_echo=$ac_try;;
3081esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003083 (eval "$ac_compile") 2>conftest.er1
3084 ac_status=$?
3085 grep -v '^ *+' conftest.er1 >conftest.err
3086 rm -f conftest.er1
3087 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003089 (exit $ac_status); } && {
3090 test -z "$ac_c_werror_flag" ||
3091 test ! -s conftest.err
3092 } && test -s conftest.$ac_objext; then
3093 ac_cv_prog_cc_g=yes
3094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003095 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096sed 's/^/| /' conftest.$ac_ext >&5
3097
3098
Guido van Rossum627b2d71993-12-24 10:39:16 +00003099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003100
3101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003103
3104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3105fi
3106
3107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3108 ac_c_werror_flag=$ac_save_c_werror_flag
3109fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003110{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3111echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003112if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003113 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003114elif test $ac_cv_prog_cc_g = yes; then
3115 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003116 CFLAGS="-g -O2"
3117 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003118 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003119 fi
3120else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003121 if test "$GCC" = yes; then
3122 CFLAGS="-O2"
3123 else
3124 CFLAGS=
3125 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003126fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003127{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3128echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003129if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003130 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003131else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003133ac_save_CC=$CC
3134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003135/* confdefs.h. */
3136_ACEOF
3137cat confdefs.h >>conftest.$ac_ext
3138cat >>conftest.$ac_ext <<_ACEOF
3139/* end confdefs.h. */
3140#include <stdarg.h>
3141#include <stdio.h>
3142#include <sys/types.h>
3143#include <sys/stat.h>
3144/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3145struct buf { int x; };
3146FILE * (*rcsopen) (struct buf *, struct stat *, int);
3147static char *e (p, i)
3148 char **p;
3149 int i;
3150{
3151 return p[i];
3152}
3153static char *f (char * (*g) (char **, int), char **p, ...)
3154{
3155 char *s;
3156 va_list v;
3157 va_start (v,p);
3158 s = g (p, va_arg (v,int));
3159 va_end (v);
3160 return s;
3161}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003162
3163/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3164 function prototypes and stuff, but not '\xHH' hex character constants.
3165 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003166 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003167 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3168 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003169 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003170int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3171
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3173 inside strings and character constants. */
3174#define FOO(x) 'x'
3175int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3176
Skip Montanaro6dead952003-09-25 14:50:04 +00003177int test (int i, double x);
3178struct s1 {int (*f) (int a);};
3179struct s2 {int (*f) (double a);};
3180int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3181int argc;
3182char **argv;
3183int
3184main ()
3185{
3186return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3187 ;
3188 return 0;
3189}
3190_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003191for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3192 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003193do
3194 CC="$ac_save_CC $ac_arg"
3195 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003196if { (ac_try="$ac_compile"
3197case "(($ac_try" in
3198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3199 *) ac_try_echo=$ac_try;;
3200esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003204 grep -v '^ *+' conftest.er1 >conftest.err
3205 rm -f conftest.er1
3206 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003208 (exit $ac_status); } && {
3209 test -z "$ac_c_werror_flag" ||
3210 test ! -s conftest.err
3211 } && test -s conftest.$ac_objext; then
3212 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003213else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003214 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003215sed 's/^/| /' conftest.$ac_ext >&5
3216
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217
Skip Montanaro6dead952003-09-25 14:50:04 +00003218fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003219
3220rm -f core conftest.err conftest.$ac_objext
3221 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003222done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003224CC=$ac_save_CC
3225
3226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003227# AC_CACHE_VAL
3228case "x$ac_cv_prog_cc_c89" in
3229 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003230 { echo "$as_me:$LINENO: result: none needed" >&5
3231echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003232 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003233 { echo "$as_me:$LINENO: result: unsupported" >&5
3234echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003235 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003236 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003237 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3238echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003239esac
3240
Skip Montanaro6dead952003-09-25 14:50:04 +00003241
Martin v. Löwis11437992002-04-12 09:54:03 +00003242ac_ext=c
3243ac_cpp='$CPP $CPPFLAGS'
3244ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3245ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3246ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003247
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003248
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003249
3250
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003251{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3252echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003253
Martin v. Löwiseba40652007-08-30 20:10:57 +00003254# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003255if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003257
3258 case $withval in
3259 no) with_cxx_main=no
3260 MAINCC='$(CC)';;
3261 yes) with_cxx_main=yes
3262 MAINCC='$(CXX)';;
3263 *) with_cxx_main=yes
3264 MAINCC=$withval
3265 if test -z "$CXX"
3266 then
3267 CXX=$withval
3268 fi;;
3269 esac
3270else
3271
3272 with_cxx_main=no
3273 MAINCC='$(CC)'
3274
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275fi
3276
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003277{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3278echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003279
3280preset_cxx="$CXX"
3281if test -z "$CXX"
3282then
3283 case "$CC" in
3284 gcc) # Extract the first word of "g++", so it can be a program name with args.
3285set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003286{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003288if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003289 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003290else
3291 case $CXX in
3292 [\\/]* | ?:[\\/]*)
3293 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3294 ;;
3295 *)
3296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3297for as_dir in notfound
3298do
3299 IFS=$as_save_IFS
3300 test -z "$as_dir" && as_dir=.
3301 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003302 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 +00003303 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003304 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003305 break 2
3306 fi
3307done
3308done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003309IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003310
3311 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3312 ;;
3313esac
3314fi
3315CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003316if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003317 { echo "$as_me:$LINENO: result: $CXX" >&5
3318echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003319else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003320 { echo "$as_me:$LINENO: result: no" >&5
3321echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003322fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003323
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003324 ;;
3325 cc) # Extract the first word of "c++", so it can be a program name with args.
3326set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003327{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3328echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003329if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003330 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003331else
3332 case $CXX in
3333 [\\/]* | ?:[\\/]*)
3334 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3335 ;;
3336 *)
3337 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3338for as_dir in notfound
3339do
3340 IFS=$as_save_IFS
3341 test -z "$as_dir" && as_dir=.
3342 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 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 +00003344 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003345 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003346 break 2
3347 fi
3348done
3349done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003350IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003351
3352 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3353 ;;
3354esac
3355fi
3356CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003357if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003358 { echo "$as_me:$LINENO: result: $CXX" >&5
3359echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003360else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003361 { echo "$as_me:$LINENO: result: no" >&5
3362echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003364
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003365 ;;
3366 esac
3367 if test "$CXX" = "notfound"
3368 then
3369 CXX=""
3370 fi
3371fi
3372if test -z "$CXX"
3373then
3374 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3375do
3376 # Extract the first word of "$ac_prog", so it can be a program name with args.
3377set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003378{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3379echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003380if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003381 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003382else
3383 if test -n "$CXX"; then
3384 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3385else
3386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3387for as_dir in $PATH
3388do
3389 IFS=$as_save_IFS
3390 test -z "$as_dir" && as_dir=.
3391 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392 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 +00003393 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003394 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003395 break 2
3396 fi
3397done
3398done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003399IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003400
3401fi
3402fi
3403CXX=$ac_cv_prog_CXX
3404if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003405 { echo "$as_me:$LINENO: result: $CXX" >&5
3406echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003408 { echo "$as_me:$LINENO: result: no" >&5
3409echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003410fi
3411
Martin v. Löwiseba40652007-08-30 20:10:57 +00003412
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003413 test -n "$CXX" && break
3414done
3415test -n "$CXX" || CXX="notfound"
3416
3417 if test "$CXX" = "notfound"
3418 then
3419 CXX=""
3420 fi
3421fi
3422if test "$preset_cxx" != "$CXX"
3423then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003424 { echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003425
3426 By default, distutils will build C++ extension modules with \"$CXX\".
3427 If this is not intended, then set CXX on the configure command line.
3428 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003429echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003430
3431 By default, distutils will build C++ extension modules with \"$CXX\".
3432 If this is not intended, then set CXX on the configure command line.
3433 " >&2;}
3434fi
3435
3436
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003437# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003438
3439ac_ext=c
3440ac_cpp='$CPP $CPPFLAGS'
3441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3443ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003444{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3445echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003446# On Suns, sometimes $CPP names a directory.
3447if test -n "$CPP" && test -d "$CPP"; then
3448 CPP=
3449fi
3450if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003451 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003452 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003453else
Martin v. Löwis11437992002-04-12 09:54:03 +00003454 # Double quotes because CPP needs to be expanded
3455 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3456 do
3457 ac_preproc_ok=false
3458for ac_c_preproc_warn_flag in '' yes
3459do
3460 # Use a header file that comes with gcc, so configuring glibc
3461 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003462 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3463 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003464 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003465 # not just through cpp. "Syntax error" is here to catch this case.
3466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003467/* confdefs.h. */
3468_ACEOF
3469cat confdefs.h >>conftest.$ac_ext
3470cat >>conftest.$ac_ext <<_ACEOF
3471/* end confdefs.h. */
3472#ifdef __STDC__
3473# include <limits.h>
3474#else
3475# include <assert.h>
3476#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003477 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003478_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003479if { (ac_try="$ac_cpp conftest.$ac_ext"
3480case "(($ac_try" in
3481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3482 *) ac_try_echo=$ac_try;;
3483esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003485 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003486 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003487 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003488 rm -f conftest.er1
3489 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003491 (exit $ac_status); } >/dev/null && {
3492 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3493 test ! -s conftest.err
3494 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003495 :
3496else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003498sed 's/^/| /' conftest.$ac_ext >&5
3499
Martin v. Löwis11437992002-04-12 09:54:03 +00003500 # Broken: fails on valid input.
3501continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003503
Martin v. Löwis11437992002-04-12 09:54:03 +00003504rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003505
Martin v. Löwiseba40652007-08-30 20:10:57 +00003506 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003507 # can be detected and how.
3508 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003509/* confdefs.h. */
3510_ACEOF
3511cat confdefs.h >>conftest.$ac_ext
3512cat >>conftest.$ac_ext <<_ACEOF
3513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003514#include <ac_nonexistent.h>
3515_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003516if { (ac_try="$ac_cpp conftest.$ac_ext"
3517case "(($ac_try" in
3518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3519 *) ac_try_echo=$ac_try;;
3520esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003522 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003523 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003524 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 rm -f conftest.er1
3526 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003528 (exit $ac_status); } >/dev/null && {
3529 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3530 test ! -s conftest.err
3531 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 # Broken: success on invalid input.
3533continue
3534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003535 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003536sed 's/^/| /' conftest.$ac_ext >&5
3537
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 # Passes both tests.
3539ac_preproc_ok=:
3540break
3541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003542
Martin v. Löwis11437992002-04-12 09:54:03 +00003543rm -f conftest.err conftest.$ac_ext
3544
3545done
3546# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3547rm -f conftest.err conftest.$ac_ext
3548if $ac_preproc_ok; then
3549 break
3550fi
3551
3552 done
3553 ac_cv_prog_CPP=$CPP
3554
3555fi
3556 CPP=$ac_cv_prog_CPP
3557else
3558 ac_cv_prog_CPP=$CPP
3559fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003560{ echo "$as_me:$LINENO: result: $CPP" >&5
3561echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003562ac_preproc_ok=false
3563for ac_c_preproc_warn_flag in '' yes
3564do
3565 # Use a header file that comes with gcc, so configuring glibc
3566 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003567 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3568 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 # On the NeXT, cc -E runs the code through the compiler's parser,
3570 # not just through cpp. "Syntax error" is here to catch this case.
3571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003572/* confdefs.h. */
3573_ACEOF
3574cat confdefs.h >>conftest.$ac_ext
3575cat >>conftest.$ac_ext <<_ACEOF
3576/* end confdefs.h. */
3577#ifdef __STDC__
3578# include <limits.h>
3579#else
3580# include <assert.h>
3581#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003582 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003583_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003584if { (ac_try="$ac_cpp conftest.$ac_ext"
3585case "(($ac_try" in
3586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3587 *) ac_try_echo=$ac_try;;
3588esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003590 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003592 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 rm -f conftest.er1
3594 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003596 (exit $ac_status); } >/dev/null && {
3597 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3598 test ! -s conftest.err
3599 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 :
3601else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003603sed 's/^/| /' conftest.$ac_ext >&5
3604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605 # Broken: fails on valid input.
3606continue
3607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003608
Martin v. Löwis11437992002-04-12 09:54:03 +00003609rm -f conftest.err conftest.$ac_ext
3610
Martin v. Löwiseba40652007-08-30 20:10:57 +00003611 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 # can be detected and how.
3613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003614/* confdefs.h. */
3615_ACEOF
3616cat confdefs.h >>conftest.$ac_ext
3617cat >>conftest.$ac_ext <<_ACEOF
3618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003619#include <ac_nonexistent.h>
3620_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621if { (ac_try="$ac_cpp conftest.$ac_ext"
3622case "(($ac_try" in
3623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3624 *) ac_try_echo=$ac_try;;
3625esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003627 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003628 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003629 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003630 rm -f conftest.er1
3631 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003633 (exit $ac_status); } >/dev/null && {
3634 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3635 test ! -s conftest.err
3636 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 # Broken: success on invalid input.
3638continue
3639else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003641sed 's/^/| /' conftest.$ac_ext >&5
3642
Martin v. Löwis11437992002-04-12 09:54:03 +00003643 # Passes both tests.
3644ac_preproc_ok=:
3645break
3646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003647
Martin v. Löwis11437992002-04-12 09:54:03 +00003648rm -f conftest.err conftest.$ac_ext
3649
3650done
3651# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3652rm -f conftest.err conftest.$ac_ext
3653if $ac_preproc_ok; then
3654 :
3655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003656 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003657See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003658echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003659See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003660 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003661fi
3662
3663ac_ext=c
3664ac_cpp='$CPP $CPPFLAGS'
3665ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3666ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3667ac_compiler_gnu=$ac_cv_c_compiler_gnu
3668
3669
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003670{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3671echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003673 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003674else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003675 # Extract the first word of "grep ggrep" to use in msg output
3676if test -z "$GREP"; then
3677set dummy grep ggrep; ac_prog_name=$2
3678if test "${ac_cv_path_GREP+set}" = set; then
3679 echo $ECHO_N "(cached) $ECHO_C" >&6
3680else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003681 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003682# Loop through the user's path and test for each of PROGNAME-LIST
3683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003684for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3685do
3686 IFS=$as_save_IFS
3687 test -z "$as_dir" && as_dir=.
3688 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003689 for ac_exec_ext in '' $ac_executable_extensions; do
3690 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3691 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3692 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003693 # Check for GNU $ac_path_GREP
3694case `"$ac_path_GREP" --version 2>&1` in
3695*GNU*)
3696 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3697*)
3698 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003699 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003700 while :
3701 do
3702 cat "conftest.in" "conftest.in" >"conftest.tmp"
3703 mv "conftest.tmp" "conftest.in"
3704 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003705 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003706 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3707 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3708 ac_count=`expr $ac_count + 1`
3709 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3710 # Best one so far, save it but keep looking for a better one
3711 ac_cv_path_GREP="$ac_path_GREP"
3712 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003713 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003714 # 10*(2^10) chars as input seems more than enough
3715 test $ac_count -gt 10 && break
3716 done
3717 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3718esac
3719
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003720
3721 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003722 done
3723done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003724
3725done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003726IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003727
3728
3729fi
3730
3731GREP="$ac_cv_path_GREP"
3732if test -z "$GREP"; then
3733 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3734echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003735 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003736fi
3737
Martin v. Löwiseba40652007-08-30 20:10:57 +00003738else
3739 ac_cv_path_GREP=$GREP
3740fi
3741
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003742
Martin v. Löwiseba40652007-08-30 20:10:57 +00003743fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003744{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3745echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003746 GREP="$ac_cv_path_GREP"
3747
3748
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003749{ echo "$as_me:$LINENO: checking for egrep" >&5
3750echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003751if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003752 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003753else
3754 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3755 then ac_cv_path_EGREP="$GREP -E"
3756 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003757 # Extract the first word of "egrep" to use in msg output
3758if test -z "$EGREP"; then
3759set dummy egrep; ac_prog_name=$2
3760if test "${ac_cv_path_EGREP+set}" = set; then
3761 echo $ECHO_N "(cached) $ECHO_C" >&6
3762else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003763 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003764# Loop through the user's path and test for each of PROGNAME-LIST
3765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003766for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3767do
3768 IFS=$as_save_IFS
3769 test -z "$as_dir" && as_dir=.
3770 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003771 for ac_exec_ext in '' $ac_executable_extensions; do
3772 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3773 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3774 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003775 # Check for GNU $ac_path_EGREP
3776case `"$ac_path_EGREP" --version 2>&1` in
3777*GNU*)
3778 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3779*)
3780 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003781 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003782 while :
3783 do
3784 cat "conftest.in" "conftest.in" >"conftest.tmp"
3785 mv "conftest.tmp" "conftest.in"
3786 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003787 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3789 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3790 ac_count=`expr $ac_count + 1`
3791 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3792 # Best one so far, save it but keep looking for a better one
3793 ac_cv_path_EGREP="$ac_path_EGREP"
3794 ac_path_EGREP_max=$ac_count
3795 fi
3796 # 10*(2^10) chars as input seems more than enough
3797 test $ac_count -gt 10 && break
3798 done
3799 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3800esac
3801
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003802
3803 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003804 done
3805done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003806
3807done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003808IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003809
3810
3811fi
3812
3813EGREP="$ac_cv_path_EGREP"
3814if test -z "$EGREP"; then
3815 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3816echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003818fi
3819
Martin v. Löwiseba40652007-08-30 20:10:57 +00003820else
3821 ac_cv_path_EGREP=$EGREP
3822fi
3823
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003824
Martin v. Löwiseba40652007-08-30 20:10:57 +00003825 fi
3826fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003827{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3828echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003829 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003830
3831
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003832
3833{ echo "$as_me:$LINENO: checking for AIX" >&5
3834echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3835cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003836/* confdefs.h. */
3837_ACEOF
3838cat confdefs.h >>conftest.$ac_ext
3839cat >>conftest.$ac_ext <<_ACEOF
3840/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003841#ifdef _AIX
3842 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003843#endif
3844
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003845_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3847 $EGREP "yes" >/dev/null 2>&1; then
3848 { echo "$as_me:$LINENO: result: yes" >&5
3849echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003850cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003851#define _ALL_SOURCE 1
3852_ACEOF
3853
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003854else
3855 { echo "$as_me:$LINENO: result: no" >&5
3856echo "${ECHO_T}no" >&6; }
3857fi
3858rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003859
3860
3861
3862# Check for unsupported systems
3863case $ac_sys_system/$ac_sys_release in
3864atheos*|Linux*/1*)
3865 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3866 echo See README for details.
3867 exit 1;;
3868esac
3869
3870
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003871{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3872echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003873
3874# Check whether --with-suffix was given.
3875if test "${with_suffix+set}" = set; then
3876 withval=$with_suffix;
3877 case $withval in
3878 no) EXEEXT=;;
3879 yes) EXEEXT=.exe;;
3880 *) EXEEXT=$withval;;
3881 esac
3882fi
3883
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003884{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3885echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003886
3887# Test whether we're running on a non-case-sensitive system, in which
3888# case we give a warning if no ext is given
3889
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003890{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3891echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003892if test ! -d CaseSensitiveTestDir; then
3893mkdir CaseSensitiveTestDir
3894fi
3895
3896if test -d casesensitivetestdir
3897then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003898 { echo "$as_me:$LINENO: result: yes" >&5
3899echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003900 BUILDEXEEXT=.exe
3901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003902 { echo "$as_me:$LINENO: result: no" >&5
3903echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003904 BUILDEXEEXT=$EXEEXT
3905fi
3906rmdir CaseSensitiveTestDir
3907
3908case $MACHDEP in
3909bsdos*)
3910 case $CC in
3911 gcc) CC="$CC -D_HAVE_BSDI";;
3912 esac;;
3913esac
3914
3915case $ac_sys_system in
3916hp*|HP*)
3917 case $CC in
3918 cc|*/cc) CC="$CC -Ae";;
3919 esac;;
3920Monterey*)
3921 case $CC in
3922 cc) CC="$CC -Wl,-Bexport";;
3923 esac;;
3924SunOS*)
3925 # Some functions have a prototype only with that define, e.g. confstr
3926
3927cat >>confdefs.h <<\_ACEOF
3928#define __EXTENSIONS__ 1
3929_ACEOF
3930
3931 ;;
3932esac
3933
3934
3935
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003936{ echo "$as_me:$LINENO: checking LIBRARY" >&5
3937echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003938if test -z "$LIBRARY"
3939then
3940 LIBRARY='libpython$(VERSION).a'
3941fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
3943echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003944
3945# LDLIBRARY is the name of the library to link against (as opposed to the
3946# name of the library into which to insert object files). BLDLIBRARY is also
3947# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3948# is blank as the main program is not linked directly against LDLIBRARY.
3949# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3950# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3951# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3952# DLLLIBRARY is the shared (i.e., DLL) library.
3953#
3954# RUNSHARED is used to run shared python without installed libraries
3955#
3956# INSTSONAME is the name of the shared library that will be use to install
3957# on the system - some systems like version suffix, others don't
3958
3959
3960
3961
3962
3963
3964LDLIBRARY="$LIBRARY"
3965BLDLIBRARY='$(LDLIBRARY)'
3966INSTSONAME='$(LDLIBRARY)'
3967DLLLIBRARY=''
3968LDLIBRARYDIR=''
3969RUNSHARED=''
3970
3971# LINKCC is the command that links the python executable -- default is $(CC).
3972# If CXX is set, and if it is needed to link a main function that was
3973# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3974# python might then depend on the C++ runtime
3975# This is altered for AIX in order to build the export list before
3976# linking.
3977
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003978{ echo "$as_me:$LINENO: checking LINKCC" >&5
3979echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003980if test -z "$LINKCC"
3981then
3982 LINKCC='$(PURIFY) $(MAINCC)'
3983 case $ac_sys_system in
3984 AIX*)
3985 exp_extra="\"\""
3986 if test $ac_sys_release -ge 5 -o \
3987 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3988 exp_extra="."
3989 fi
3990 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
3991 Monterey64*)
3992 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
3993 QNX*)
3994 # qcc must be used because the other compilers do not
3995 # support -N.
3996 LINKCC=qcc;;
3997 esac
3998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003999{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4000echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004001
4002# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4003# make sure we default having it set to "no": this is used by
4004# distutils.unixccompiler to know if it should add --enable-new-dtags
4005# to linker command lines, and failing to detect GNU ld simply results
4006# in the same bahaviour as before.
4007
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004008{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4009echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004010ac_prog=ld
4011if test "$GCC" = yes; then
4012 ac_prog=`$CC -print-prog-name=ld`
4013fi
4014case `"$ac_prog" -V 2>&1 < /dev/null` in
4015 *GNU*)
4016 GNULD=yes;;
4017 *)
4018 GNULD=no;;
4019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004020{ echo "$as_me:$LINENO: result: $GNULD" >&5
4021echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004022
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004023{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4024echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004025# Check whether --enable-shared was given.
4026if test "${enable_shared+set}" = set; then
4027 enableval=$enable_shared;
4028fi
4029
4030
4031if test -z "$enable_shared"
4032then
4033 case $ac_sys_system in
4034 CYGWIN* | atheos*)
4035 enable_shared="yes";;
4036 *)
4037 enable_shared="no";;
4038 esac
4039fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004040{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4041echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004043{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4044echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004045# Check whether --enable-profiling was given.
4046if test "${enable_profiling+set}" = set; then
4047 enableval=$enable_profiling; ac_save_cc="$CC"
4048 CC="$CC -pg"
4049 if test "$cross_compiling" = yes; then
4050 ac_enable_profiling="no"
4051else
4052 cat >conftest.$ac_ext <<_ACEOF
4053/* confdefs.h. */
4054_ACEOF
4055cat confdefs.h >>conftest.$ac_ext
4056cat >>conftest.$ac_ext <<_ACEOF
4057/* end confdefs.h. */
4058int main() { return 0; }
4059_ACEOF
4060rm -f conftest$ac_exeext
4061if { (ac_try="$ac_link"
4062case "(($ac_try" in
4063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4064 *) ac_try_echo=$ac_try;;
4065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004067 (eval "$ac_link") 2>&5
4068 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4071 { (case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004076 (eval "$ac_try") 2>&5
4077 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004079 (exit $ac_status); }; }; then
4080 ac_enable_profiling="yes"
4081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004082 echo "$as_me: program exited with status $ac_status" >&5
4083echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004084sed 's/^/| /' conftest.$ac_ext >&5
4085
4086( exit $ac_status )
4087ac_enable_profiling="no"
4088fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4090fi
4091
4092
4093 CC="$ac_save_cc"
4094fi
4095
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004096{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4097echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004098
4099case "$ac_enable_profiling" in
4100 "yes")
4101 BASECFLAGS="-pg $BASECFLAGS"
4102 LDFLAGS="-pg $LDFLAGS"
4103 ;;
4104esac
4105
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004106{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4107echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004108
4109# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4110# library that we build, but we do not want to link against it (we
4111# will find it with a -framework option). For this reason there is an
4112# extra variable BLDLIBRARY against which Python and the extension
4113# modules are linked, BLDLIBRARY. This is normally the same as
4114# LDLIBRARY, but empty for MacOSX framework builds.
4115if test "$enable_framework"
4116then
4117 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4118 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4119 BLDLIBRARY=''
4120else
4121 BLDLIBRARY='$(LDLIBRARY)'
4122fi
4123
4124# Other platforms follow
4125if test $enable_shared = "yes"; then
4126
4127cat >>confdefs.h <<\_ACEOF
4128#define Py_ENABLE_SHARED 1
4129_ACEOF
4130
4131 case $ac_sys_system in
4132 BeOS*)
4133 LDLIBRARY='libpython$(VERSION).so'
4134 ;;
4135 CYGWIN*)
4136 LDLIBRARY='libpython$(VERSION).dll.a'
4137 DLLLIBRARY='libpython$(VERSION).dll'
4138 ;;
4139 SunOS*)
4140 LDLIBRARY='libpython$(VERSION).so'
4141 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4142 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4143 INSTSONAME="$LDLIBRARY".$SOVERSION
4144 ;;
4145 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4146 LDLIBRARY='libpython$(VERSION).so'
4147 BLDLIBRARY='-L. -lpython$(VERSION)'
4148 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4149 case $ac_sys_system in
4150 FreeBSD*)
4151 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4152 ;;
4153 esac
4154 INSTSONAME="$LDLIBRARY".$SOVERSION
4155 ;;
4156 hp*|HP*)
4157 case `uname -m` in
4158 ia64)
4159 LDLIBRARY='libpython$(VERSION).so'
4160 ;;
4161 *)
4162 LDLIBRARY='libpython$(VERSION).sl'
4163 ;;
4164 esac
4165 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4166 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4167 ;;
4168 OSF*)
4169 LDLIBRARY='libpython$(VERSION).so'
4170 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4171 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4172 ;;
4173 atheos*)
4174 LDLIBRARY='libpython$(VERSION).so'
4175 BLDLIBRARY='-L. -lpython$(VERSION)'
4176 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4177 ;;
4178 Darwin*)
4179 LDLIBRARY='libpython$(VERSION).dylib'
4180 BLDLIBRARY='-L. -lpython$(VERSION)'
4181 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4182 ;;
4183
4184 esac
4185else # shared is disabled
4186 case $ac_sys_system in
4187 CYGWIN*)
4188 BLDLIBRARY='$(LIBRARY)'
4189 LDLIBRARY='libpython$(VERSION).dll.a'
4190 ;;
4191 esac
4192fi
4193
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004194{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4195echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004196
4197if test -n "$ac_tool_prefix"; then
4198 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4199set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004200{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4201echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004202if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004203 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004204else
4205 if test -n "$RANLIB"; then
4206 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4207else
4208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209for as_dir in $PATH
4210do
4211 IFS=$as_save_IFS
4212 test -z "$as_dir" && as_dir=.
4213 for ac_exec_ext in '' $ac_executable_extensions; do
4214 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4215 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004216 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004217 break 2
4218 fi
4219done
4220done
4221IFS=$as_save_IFS
4222
4223fi
4224fi
4225RANLIB=$ac_cv_prog_RANLIB
4226if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004227 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4228echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004229else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004230 { echo "$as_me:$LINENO: result: no" >&5
4231echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004232fi
4233
4234
4235fi
4236if test -z "$ac_cv_prog_RANLIB"; then
4237 ac_ct_RANLIB=$RANLIB
4238 # Extract the first word of "ranlib", so it can be a program name with args.
4239set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004240{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4241echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004242if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004243 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004244else
4245 if test -n "$ac_ct_RANLIB"; then
4246 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4247else
4248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4249for as_dir in $PATH
4250do
4251 IFS=$as_save_IFS
4252 test -z "$as_dir" && as_dir=.
4253 for ac_exec_ext in '' $ac_executable_extensions; do
4254 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4255 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004256 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004257 break 2
4258 fi
4259done
4260done
4261IFS=$as_save_IFS
4262
4263fi
4264fi
4265ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4266if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004267 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4268echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004269else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004270 { echo "$as_me:$LINENO: result: no" >&5
4271echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004272fi
4273
4274 if test "x$ac_ct_RANLIB" = x; then
4275 RANLIB=":"
4276 else
4277 case $cross_compiling:$ac_tool_warned in
4278yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004279{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4280whose name does not start with the host triplet. If you think this
4281configuration is useful to you, please write to autoconf@gnu.org." >&5
4282echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4283whose name does not start with the host triplet. If you think this
4284configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004285ac_tool_warned=yes ;;
4286esac
4287 RANLIB=$ac_ct_RANLIB
4288 fi
4289else
4290 RANLIB="$ac_cv_prog_RANLIB"
4291fi
4292
4293
4294for ac_prog in ar aal
4295do
4296 # Extract the first word of "$ac_prog", so it can be a program name with args.
4297set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004298{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4299echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004300if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004301 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004302else
4303 if test -n "$AR"; then
4304 ac_cv_prog_AR="$AR" # Let the user override the test.
4305else
4306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4307for as_dir in $PATH
4308do
4309 IFS=$as_save_IFS
4310 test -z "$as_dir" && as_dir=.
4311 for ac_exec_ext in '' $ac_executable_extensions; do
4312 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4313 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004314 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004315 break 2
4316 fi
4317done
4318done
4319IFS=$as_save_IFS
4320
4321fi
4322fi
4323AR=$ac_cv_prog_AR
4324if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004325 { echo "$as_me:$LINENO: result: $AR" >&5
4326echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004328 { echo "$as_me:$LINENO: result: no" >&5
4329echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004330fi
4331
4332
4333 test -n "$AR" && break
4334done
4335test -n "$AR" || AR="ar"
4336
4337
4338# tweak ARFLAGS only if the user didn't set it on the command line
4339
4340if test -z "$ARFLAGS"
4341then
4342 ARFLAGS="rc"
4343fi
4344
4345
4346# Extract the first word of "svnversion", so it can be a program name with args.
4347set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004348{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4349echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004350if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004351 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004352else
4353 if test -n "$SVNVERSION"; then
4354 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4355else
4356as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4357for as_dir in $PATH
4358do
4359 IFS=$as_save_IFS
4360 test -z "$as_dir" && as_dir=.
4361 for ac_exec_ext in '' $ac_executable_extensions; do
4362 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4363 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004365 break 2
4366 fi
4367done
4368done
4369IFS=$as_save_IFS
4370
4371 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4372fi
4373fi
4374SVNVERSION=$ac_cv_prog_SVNVERSION
4375if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004376 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4377echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004379 { echo "$as_me:$LINENO: result: no" >&5
4380echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004381fi
4382
4383
4384if test $SVNVERSION = found
4385then
4386 SVNVERSION="svnversion \$(srcdir)"
4387else
4388 SVNVERSION="echo Unversioned directory"
4389fi
4390
4391case $MACHDEP in
4392bsdos*|hp*|HP*)
4393 # install -d does not work on BSDI or HP-UX
4394 if test -z "$INSTALL"
4395 then
4396 INSTALL="${srcdir}/install-sh -c"
4397 fi
4398esac
4399ac_aux_dir=
4400for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4401 if test -f "$ac_dir/install-sh"; then
4402 ac_aux_dir=$ac_dir
4403 ac_install_sh="$ac_aux_dir/install-sh -c"
4404 break
4405 elif test -f "$ac_dir/install.sh"; then
4406 ac_aux_dir=$ac_dir
4407 ac_install_sh="$ac_aux_dir/install.sh -c"
4408 break
4409 elif test -f "$ac_dir/shtool"; then
4410 ac_aux_dir=$ac_dir
4411 ac_install_sh="$ac_aux_dir/shtool install -c"
4412 break
4413 fi
4414done
4415if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004416 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4417echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004418 { (exit 1); exit 1; }; }
4419fi
4420
4421# These three variables are undocumented and unsupported,
4422# and are intended to be withdrawn in a future Autoconf release.
4423# They can cause serious problems if a builder's source tree is in a directory
4424# whose full name contains unusual characters.
4425ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4426ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4427ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4428
4429
4430# Find a good install program. We prefer a C program (faster),
4431# so one script is as good as another. But avoid the broken or
4432# incompatible versions:
4433# SysV /etc/install, /usr/sbin/install
4434# SunOS /usr/etc/install
4435# IRIX /sbin/install
4436# AIX /bin/install
4437# AmigaOS /C/install, which installs bootblocks on floppy discs
4438# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4439# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4440# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4441# OS/2's system install, which has a completely different semantic
4442# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004443{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4444echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004445if test -z "$INSTALL"; then
4446if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004447 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004448else
4449 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4450for as_dir in $PATH
4451do
4452 IFS=$as_save_IFS
4453 test -z "$as_dir" && as_dir=.
4454 # Account for people who put trailing slashes in PATH elements.
4455case $as_dir/ in
4456 ./ | .// | /cC/* | \
4457 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4458 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4459 /usr/ucb/* ) ;;
4460 *)
4461 # OSF1 and SCO ODT 3.0 have their own names for install.
4462 # Don't use installbsd from OSF since it installs stuff as root
4463 # by default.
4464 for ac_prog in ginstall scoinst install; do
4465 for ac_exec_ext in '' $ac_executable_extensions; do
4466 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4467 if test $ac_prog = install &&
4468 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4469 # AIX install. It has an incompatible calling convention.
4470 :
4471 elif test $ac_prog = install &&
4472 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4473 # program-specific install script used by HP pwplus--don't use.
4474 :
4475 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004476 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4477 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004478 fi
4479 fi
4480 done
4481 done
4482 ;;
4483esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004484done
4485IFS=$as_save_IFS
4486
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004487
4488fi
4489 if test "${ac_cv_path_install+set}" = set; then
4490 INSTALL=$ac_cv_path_install
4491 else
4492 # As a last resort, use the slow shell script. Don't cache a
4493 # value for INSTALL within a source directory, because that will
4494 # break other packages using the cache if that directory is
4495 # removed, or if the value is a relative name.
4496 INSTALL=$ac_install_sh
4497 fi
4498fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004499{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4500echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004501
4502# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4503# It thinks the first close brace ends the variable substitution.
4504test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4505
4506test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4507
4508test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4509
4510
4511# Not every filesystem supports hard links
4512
4513if test -z "$LN" ; then
4514 case $ac_sys_system in
4515 BeOS*) LN="ln -s";;
4516 CYGWIN*) LN="ln -s";;
4517 atheos*) LN="ln -s";;
4518 *) LN=ln;;
4519 esac
4520fi
4521
4522# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004523{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4524echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004525
4526# Check whether --with-pydebug was given.
4527if test "${with_pydebug+set}" = set; then
4528 withval=$with_pydebug;
4529if test "$withval" != no
4530then
4531
4532cat >>confdefs.h <<\_ACEOF
4533#define Py_DEBUG 1
4534_ACEOF
4535
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004536 { echo "$as_me:$LINENO: result: yes" >&5
4537echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004538 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004539else { echo "$as_me:$LINENO: result: no" >&5
4540echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004541fi
4542else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004543 { echo "$as_me:$LINENO: result: no" >&5
4544echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004545fi
4546
4547
4548# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4549# merged with this chunk of code?
4550
4551# Optimizer/debugger flags
4552# ------------------------
4553# (The following bit of code is complicated enough - please keep things
4554# indented properly. Just pretend you're editing Python code. ;-)
4555
4556# There are two parallel sets of case statements below, one that checks to
4557# see if OPT was set and one that does BASECFLAGS setting based upon
4558# compiler and platform. BASECFLAGS tweaks need to be made even if the
4559# user set OPT.
4560
4561# tweak OPT based on compiler and platform, only if the user didn't set
4562# it on the command line
4563
4564if test -z "$OPT"
4565then
4566 case $GCC in
4567 yes)
4568 if test "$CC" != 'g++' ; then
4569 STRICT_PROTO="-Wstrict-prototypes"
4570 fi
4571 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4572 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4573 WRAP="-fwrapv"
4574 fi
4575 case $ac_cv_prog_cc_g in
4576 yes)
4577 if test "$Py_DEBUG" = 'true' ; then
4578 # Optimization messes up debuggers, so turn it off for
4579 # debug builds.
4580 OPT="-g -Wall $STRICT_PROTO"
4581 else
4582 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4583 fi
4584 ;;
4585 *)
4586 OPT="-O3 -Wall $STRICT_PROTO"
4587 ;;
4588 esac
4589 case $ac_sys_system in
4590 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4591 ;;
4592 esac
4593 ;;
4594
4595 *)
4596 OPT="-O"
4597 ;;
4598 esac
4599
4600 # The current (beta) Monterey compiler dies with optimizations
4601 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
4602 case $ac_sys_system in
4603 Monterey*)
4604 OPT=""
4605 ;;
4606 esac
4607
4608fi
4609
4610
4611
4612# The -arch flags for universal builds on OSX
4613UNIVERSAL_ARCH_FLAGS=
4614
4615
4616# tweak BASECFLAGS based on compiler and platform
4617case $GCC in
4618yes)
4619 # Python violates C99 rules, by casting between incompatible
4620 # pointer types. GCC may generate bad code as a result of that,
4621 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004622 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4623echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004624 ac_save_cc="$CC"
4625 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004626 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4627 echo $ECHO_N "(cached) $ECHO_C" >&6
4628else
4629 if test "$cross_compiling" = yes; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004630 ac_cv_no_strict_aliasing_ok=no
4631else
4632 cat >conftest.$ac_ext <<_ACEOF
4633/* confdefs.h. */
4634_ACEOF
4635cat confdefs.h >>conftest.$ac_ext
4636cat >>conftest.$ac_ext <<_ACEOF
4637/* end confdefs.h. */
4638int main() { return 0; }
4639_ACEOF
4640rm -f conftest$ac_exeext
4641if { (ac_try="$ac_link"
4642case "(($ac_try" in
4643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4644 *) ac_try_echo=$ac_try;;
4645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004647 (eval "$ac_link") 2>&5
4648 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4651 { (case "(($ac_try" in
4652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4653 *) ac_try_echo=$ac_try;;
4654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004656 (eval "$ac_try") 2>&5
4657 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004659 (exit $ac_status); }; }; then
4660 ac_cv_no_strict_aliasing_ok=yes
4661else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004662 echo "$as_me: program exited with status $ac_status" >&5
4663echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004664sed 's/^/| /' conftest.$ac_ext >&5
4665
4666( exit $ac_status )
4667ac_cv_no_strict_aliasing_ok=no
4668fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4670fi
4671
4672
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004673fi
4674
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004675 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004676 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4677echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004678 if test $ac_cv_no_strict_aliasing_ok = yes
4679 then
4680 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4681 fi
4682
4683 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4684 # support. Without this, treatment of subnormals doesn't follow
4685 # the standard.
4686 case $ac_sys_machine in
4687 alpha*)
4688 BASECFLAGS="$BASECFLAGS -mieee"
4689 ;;
4690 esac
4691
4692 case $ac_sys_system in
4693 SCO_SV*)
4694 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4695 ;;
4696 # is there any other compiler on Darwin besides gcc?
4697 Darwin*)
4698 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4699 # used to be here, but non-Apple gcc doesn't accept them.
4700
4701
4702 if test "${enable_universalsdk}"; then
4703 UNIVERSAL_ARCH_FLAGS=""
4704 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4705 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4706 ARCH_RUN_32BIT=""
4707
4708 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4709 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4710
4711 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4712 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4713 ARCH_RUN_32BIT="arch -i386 -ppc"
4714
4715 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004716 { { echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
4717echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004718 { (exit 1); exit 1; }; }
4719
4720 fi
4721
4722
4723 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4724 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4725 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4726 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4727 fi
4728 fi
4729
4730 # Calculate the right deployment target for this build.
4731 #
4732 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4733 if test ${cur_target} '>' 10.2; then
4734 cur_target=10.3
4735 fi
4736 if test "${UNIVERSAL_ARCHS}" = "all"; then
4737 # Ensure that the default platform for a 4-way
4738 # universal build is OSX 10.5, that's the first
4739 # OS release where 4-way builds make sense.
4740 cur_target='10.5'
4741 fi
4742 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4743
4744 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4745 # environment with a value that is the same as what we'll use
4746 # in the Makefile to ensure that we'll get the same compiler
4747 # environment during configure and build time.
4748 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4749 export MACOSX_DEPLOYMENT_TARGET
4750 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4751
4752 ;;
4753 OSF*)
4754 BASECFLAGS="$BASECFLAGS -mieee"
4755 ;;
4756 esac
4757 ;;
4758
4759*)
4760 case $ac_sys_system in
4761 OpenUNIX*|UnixWare*)
4762 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4763 ;;
4764 OSF*)
4765 BASECFLAGS="$BASECFLAGS -ieee -std"
4766 ;;
4767 SCO_SV*)
4768 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4769 ;;
4770 esac
4771 ;;
4772esac
4773
4774if test "$Py_DEBUG" = 'true'; then
4775 :
4776else
4777 OPT="-DNDEBUG $OPT"
4778fi
4779
4780if test "$ac_arch_flags"
4781then
4782 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4783fi
4784
4785# disable check for icc since it seems to pass, but generates a warning
4786if test "$CC" = icc
4787then
4788 ac_cv_opt_olimit_ok=no
4789fi
4790
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004791{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4792echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004793if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004794 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004795else
4796 ac_save_cc="$CC"
4797CC="$CC -OPT:Olimit=0"
4798if test "$cross_compiling" = yes; then
4799 ac_cv_opt_olimit_ok=no
4800else
4801 cat >conftest.$ac_ext <<_ACEOF
4802/* confdefs.h. */
4803_ACEOF
4804cat confdefs.h >>conftest.$ac_ext
4805cat >>conftest.$ac_ext <<_ACEOF
4806/* end confdefs.h. */
4807int main() { return 0; }
4808_ACEOF
4809rm -f conftest$ac_exeext
4810if { (ac_try="$ac_link"
4811case "(($ac_try" in
4812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4813 *) ac_try_echo=$ac_try;;
4814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004816 (eval "$ac_link") 2>&5
4817 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4820 { (case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004825 (eval "$ac_try") 2>&5
4826 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004828 (exit $ac_status); }; }; then
4829 ac_cv_opt_olimit_ok=yes
4830else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004831 echo "$as_me: program exited with status $ac_status" >&5
4832echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004833sed 's/^/| /' conftest.$ac_ext >&5
4834
4835( exit $ac_status )
4836ac_cv_opt_olimit_ok=no
4837fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004838rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4839fi
4840
4841
4842CC="$ac_save_cc"
4843fi
4844
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004845{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4846echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004847if test $ac_cv_opt_olimit_ok = yes; then
4848 case $ac_sys_system in
4849 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4850 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4851 # environment?
4852 Darwin*)
4853 ;;
4854 *)
4855 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4856 ;;
4857 esac
4858else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004859 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4860echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004861 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004862 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004863else
4864 ac_save_cc="$CC"
4865 CC="$CC -Olimit 1500"
4866 if test "$cross_compiling" = yes; then
4867 ac_cv_olimit_ok=no
4868else
4869 cat >conftest.$ac_ext <<_ACEOF
4870/* confdefs.h. */
4871_ACEOF
4872cat confdefs.h >>conftest.$ac_ext
4873cat >>conftest.$ac_ext <<_ACEOF
4874/* end confdefs.h. */
4875int main() { return 0; }
4876_ACEOF
4877rm -f conftest$ac_exeext
4878if { (ac_try="$ac_link"
4879case "(($ac_try" in
4880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4881 *) ac_try_echo=$ac_try;;
4882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004884 (eval "$ac_link") 2>&5
4885 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004887 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4888 { (case "(($ac_try" in
4889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4890 *) ac_try_echo=$ac_try;;
4891esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004893 (eval "$ac_try") 2>&5
4894 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004896 (exit $ac_status); }; }; then
4897 ac_cv_olimit_ok=yes
4898else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004899 echo "$as_me: program exited with status $ac_status" >&5
4900echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004901sed 's/^/| /' conftest.$ac_ext >&5
4902
4903( exit $ac_status )
4904ac_cv_olimit_ok=no
4905fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4907fi
4908
4909
4910 CC="$ac_save_cc"
4911fi
4912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004913 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4914echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915 if test $ac_cv_olimit_ok = yes; then
4916 BASECFLAGS="$BASECFLAGS -Olimit 1500"
4917 fi
4918fi
4919
4920# Check whether GCC supports PyArg_ParseTuple format
4921if test "$GCC" = "yes"
4922then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004923 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4924echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004925 save_CFLAGS=$CFLAGS
4926 CFLAGS="$CFLAGS -Werror"
4927 cat >conftest.$ac_ext <<_ACEOF
4928/* confdefs.h. */
4929_ACEOF
4930cat confdefs.h >>conftest.$ac_ext
4931cat >>conftest.$ac_ext <<_ACEOF
4932/* end confdefs.h. */
4933
4934 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4935
4936int
4937main ()
4938{
4939
4940 ;
4941 return 0;
4942}
4943_ACEOF
4944rm -f conftest.$ac_objext
4945if { (ac_try="$ac_compile"
4946case "(($ac_try" in
4947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4948 *) ac_try_echo=$ac_try;;
4949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004951 (eval "$ac_compile") 2>conftest.er1
4952 ac_status=$?
4953 grep -v '^ *+' conftest.er1 >conftest.err
4954 rm -f conftest.er1
4955 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004957 (exit $ac_status); } && {
4958 test -z "$ac_c_werror_flag" ||
4959 test ! -s conftest.err
4960 } && test -s conftest.$ac_objext; then
4961
4962cat >>confdefs.h <<\_ACEOF
4963#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4964_ACEOF
4965
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004966 { echo "$as_me:$LINENO: result: yes" >&5
4967echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004969 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004970sed 's/^/| /' conftest.$ac_ext >&5
4971
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004972 { echo "$as_me:$LINENO: result: no" >&5
4973echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004974
4975fi
4976
4977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4978 CFLAGS=$save_CFLAGS
4979fi
4980
4981# On some compilers, pthreads are available without further options
4982# (e.g. MacOS X). On some of these systems, the compiler will not
4983# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4984# So we have to see first whether pthreads are available without
4985# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004986{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4987echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004988if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004989 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004990else
4991 if test "$cross_compiling" = yes; then
4992 ac_cv_pthread_is_default=no
4993else
4994 cat >conftest.$ac_ext <<_ACEOF
4995/* confdefs.h. */
4996_ACEOF
4997cat confdefs.h >>conftest.$ac_ext
4998cat >>conftest.$ac_ext <<_ACEOF
4999/* end confdefs.h. */
5000
5001#include <pthread.h>
5002
5003void* routine(void* p){return NULL;}
5004
5005int main(){
5006 pthread_t p;
5007 if(pthread_create(&p,NULL,routine,NULL)!=0)
5008 return 1;
5009 (void)pthread_detach(p);
5010 return 0;
5011}
5012
5013_ACEOF
5014rm -f conftest$ac_exeext
5015if { (ac_try="$ac_link"
5016case "(($ac_try" in
5017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5018 *) ac_try_echo=$ac_try;;
5019esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005021 (eval "$ac_link") 2>&5
5022 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005024 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5025 { (case "(($ac_try" in
5026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5027 *) ac_try_echo=$ac_try;;
5028esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005030 (eval "$ac_try") 2>&5
5031 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005033 (exit $ac_status); }; }; then
5034
5035 ac_cv_pthread_is_default=yes
5036 ac_cv_kthread=no
5037 ac_cv_pthread=no
5038
5039else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005040 echo "$as_me: program exited with status $ac_status" >&5
5041echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005042sed 's/^/| /' conftest.$ac_ext >&5
5043
5044( exit $ac_status )
5045ac_cv_pthread_is_default=no
5046fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5048fi
5049
5050
5051
5052fi
5053
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005054{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5055echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005056
5057
5058if test $ac_cv_pthread_is_default = yes
5059then
5060 ac_cv_kpthread=no
5061else
5062# -Kpthread, if available, provides the right #defines
5063# and linker options to make pthread_create available
5064# Some compilers won't report that they do not support -Kpthread,
5065# so we need to run a program to see whether it really made the
5066# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005067{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5068echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005069if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005070 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005071else
5072 ac_save_cc="$CC"
5073CC="$CC -Kpthread"
5074if test "$cross_compiling" = yes; then
5075 ac_cv_kpthread=no
5076else
5077 cat >conftest.$ac_ext <<_ACEOF
5078/* confdefs.h. */
5079_ACEOF
5080cat confdefs.h >>conftest.$ac_ext
5081cat >>conftest.$ac_ext <<_ACEOF
5082/* end confdefs.h. */
5083
5084#include <pthread.h>
5085
5086void* routine(void* p){return NULL;}
5087
5088int main(){
5089 pthread_t p;
5090 if(pthread_create(&p,NULL,routine,NULL)!=0)
5091 return 1;
5092 (void)pthread_detach(p);
5093 return 0;
5094}
5095
5096_ACEOF
5097rm -f conftest$ac_exeext
5098if { (ac_try="$ac_link"
5099case "(($ac_try" in
5100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5101 *) ac_try_echo=$ac_try;;
5102esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005104 (eval "$ac_link") 2>&5
5105 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5108 { (case "(($ac_try" in
5109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5110 *) ac_try_echo=$ac_try;;
5111esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005113 (eval "$ac_try") 2>&5
5114 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005116 (exit $ac_status); }; }; then
5117 ac_cv_kpthread=yes
5118else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005119 echo "$as_me: program exited with status $ac_status" >&5
5120echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005121sed 's/^/| /' conftest.$ac_ext >&5
5122
5123( exit $ac_status )
5124ac_cv_kpthread=no
5125fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5127fi
5128
5129
5130CC="$ac_save_cc"
5131fi
5132
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005133{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5134echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005135fi
5136
5137if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5138then
5139# -Kthread, if available, provides the right #defines
5140# and linker options to make pthread_create available
5141# Some compilers won't report that they do not support -Kthread,
5142# so we need to run a program to see whether it really made the
5143# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005144{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5145echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005147 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005148else
5149 ac_save_cc="$CC"
5150CC="$CC -Kthread"
5151if test "$cross_compiling" = yes; then
5152 ac_cv_kthread=no
5153else
5154 cat >conftest.$ac_ext <<_ACEOF
5155/* confdefs.h. */
5156_ACEOF
5157cat confdefs.h >>conftest.$ac_ext
5158cat >>conftest.$ac_ext <<_ACEOF
5159/* end confdefs.h. */
5160
5161#include <pthread.h>
5162
5163void* routine(void* p){return NULL;}
5164
5165int main(){
5166 pthread_t p;
5167 if(pthread_create(&p,NULL,routine,NULL)!=0)
5168 return 1;
5169 (void)pthread_detach(p);
5170 return 0;
5171}
5172
5173_ACEOF
5174rm -f conftest$ac_exeext
5175if { (ac_try="$ac_link"
5176case "(($ac_try" in
5177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5178 *) ac_try_echo=$ac_try;;
5179esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005181 (eval "$ac_link") 2>&5
5182 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005184 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5185 { (case "(($ac_try" in
5186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5187 *) ac_try_echo=$ac_try;;
5188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005190 (eval "$ac_try") 2>&5
5191 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005193 (exit $ac_status); }; }; then
5194 ac_cv_kthread=yes
5195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005196 echo "$as_me: program exited with status $ac_status" >&5
5197echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005198sed 's/^/| /' conftest.$ac_ext >&5
5199
5200( exit $ac_status )
5201ac_cv_kthread=no
5202fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5204fi
5205
5206
5207CC="$ac_save_cc"
5208fi
5209
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005210{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5211echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005212fi
5213
5214if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5215then
5216# -pthread, if available, provides the right #defines
5217# and linker options to make pthread_create available
5218# Some compilers won't report that they do not support -pthread,
5219# so we need to run a program to see whether it really made the
5220# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005221{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5222echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005223if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005224 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005225else
5226 ac_save_cc="$CC"
5227CC="$CC -pthread"
5228if test "$cross_compiling" = yes; then
5229 ac_cv_pthread=no
5230else
5231 cat >conftest.$ac_ext <<_ACEOF
5232/* confdefs.h. */
5233_ACEOF
5234cat confdefs.h >>conftest.$ac_ext
5235cat >>conftest.$ac_ext <<_ACEOF
5236/* end confdefs.h. */
5237
5238#include <pthread.h>
5239
5240void* routine(void* p){return NULL;}
5241
5242int main(){
5243 pthread_t p;
5244 if(pthread_create(&p,NULL,routine,NULL)!=0)
5245 return 1;
5246 (void)pthread_detach(p);
5247 return 0;
5248}
5249
5250_ACEOF
5251rm -f conftest$ac_exeext
5252if { (ac_try="$ac_link"
5253case "(($ac_try" in
5254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5255 *) ac_try_echo=$ac_try;;
5256esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005258 (eval "$ac_link") 2>&5
5259 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005261 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5262 { (case "(($ac_try" in
5263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5264 *) ac_try_echo=$ac_try;;
5265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005267 (eval "$ac_try") 2>&5
5268 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270 (exit $ac_status); }; }; then
5271 ac_cv_pthread=yes
5272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005273 echo "$as_me: program exited with status $ac_status" >&5
5274echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005275sed 's/^/| /' conftest.$ac_ext >&5
5276
5277( exit $ac_status )
5278ac_cv_pthread=no
5279fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5281fi
5282
5283
5284CC="$ac_save_cc"
5285fi
5286
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005287{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5288echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005289fi
5290
5291# If we have set a CC compiler flag for thread support then
5292# check if it works for CXX, too.
5293ac_cv_cxx_thread=no
5294if test ! -z "$CXX"
5295then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005296{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5297echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005298ac_save_cxx="$CXX"
5299
5300if test "$ac_cv_kpthread" = "yes"
5301then
5302 CXX="$CXX -Kpthread"
5303 ac_cv_cxx_thread=yes
5304elif test "$ac_cv_kthread" = "yes"
5305then
5306 CXX="$CXX -Kthread"
5307 ac_cv_cxx_thread=yes
5308elif test "$ac_cv_pthread" = "yes"
5309then
5310 CXX="$CXX -pthread"
5311 ac_cv_cxx_thread=yes
5312fi
5313
5314if test $ac_cv_cxx_thread = yes
5315then
5316 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5317 $CXX -c conftest.$ac_ext 2>&5
5318 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5319 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5320 then
5321 ac_cv_cxx_thread=yes
5322 else
5323 ac_cv_cxx_thread=no
5324 fi
5325 rm -fr conftest*
5326fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005327{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5328echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329fi
5330CXX="$ac_save_cxx"
5331
5332
5333# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005334{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5335echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005336if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005337 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005338else
5339 cat >conftest.$ac_ext <<_ACEOF
5340/* confdefs.h. */
5341_ACEOF
5342cat confdefs.h >>conftest.$ac_ext
5343cat >>conftest.$ac_ext <<_ACEOF
5344/* end confdefs.h. */
5345#include <stdlib.h>
5346#include <stdarg.h>
5347#include <string.h>
5348#include <float.h>
5349
5350int
5351main ()
5352{
5353
5354 ;
5355 return 0;
5356}
5357_ACEOF
5358rm -f conftest.$ac_objext
5359if { (ac_try="$ac_compile"
5360case "(($ac_try" in
5361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5362 *) ac_try_echo=$ac_try;;
5363esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005365 (eval "$ac_compile") 2>conftest.er1
5366 ac_status=$?
5367 grep -v '^ *+' conftest.er1 >conftest.err
5368 rm -f conftest.er1
5369 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005371 (exit $ac_status); } && {
5372 test -z "$ac_c_werror_flag" ||
5373 test ! -s conftest.err
5374 } && test -s conftest.$ac_objext; then
5375 ac_cv_header_stdc=yes
5376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005377 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378sed 's/^/| /' conftest.$ac_ext >&5
5379
5380 ac_cv_header_stdc=no
5381fi
5382
5383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5384
5385if test $ac_cv_header_stdc = yes; then
5386 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5387 cat >conftest.$ac_ext <<_ACEOF
5388/* confdefs.h. */
5389_ACEOF
5390cat confdefs.h >>conftest.$ac_ext
5391cat >>conftest.$ac_ext <<_ACEOF
5392/* end confdefs.h. */
5393#include <string.h>
5394
5395_ACEOF
5396if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5397 $EGREP "memchr" >/dev/null 2>&1; then
5398 :
5399else
5400 ac_cv_header_stdc=no
5401fi
5402rm -f conftest*
5403
5404fi
5405
5406if test $ac_cv_header_stdc = yes; then
5407 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5408 cat >conftest.$ac_ext <<_ACEOF
5409/* confdefs.h. */
5410_ACEOF
5411cat confdefs.h >>conftest.$ac_ext
5412cat >>conftest.$ac_ext <<_ACEOF
5413/* end confdefs.h. */
5414#include <stdlib.h>
5415
5416_ACEOF
5417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5418 $EGREP "free" >/dev/null 2>&1; then
5419 :
5420else
5421 ac_cv_header_stdc=no
5422fi
5423rm -f conftest*
5424
5425fi
5426
5427if test $ac_cv_header_stdc = yes; then
5428 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5429 if test "$cross_compiling" = yes; then
5430 :
5431else
5432 cat >conftest.$ac_ext <<_ACEOF
5433/* confdefs.h. */
5434_ACEOF
5435cat confdefs.h >>conftest.$ac_ext
5436cat >>conftest.$ac_ext <<_ACEOF
5437/* end confdefs.h. */
5438#include <ctype.h>
5439#include <stdlib.h>
5440#if ((' ' & 0x0FF) == 0x020)
5441# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5442# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5443#else
5444# define ISLOWER(c) \
5445 (('a' <= (c) && (c) <= 'i') \
5446 || ('j' <= (c) && (c) <= 'r') \
5447 || ('s' <= (c) && (c) <= 'z'))
5448# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5449#endif
5450
5451#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5452int
5453main ()
5454{
5455 int i;
5456 for (i = 0; i < 256; i++)
5457 if (XOR (islower (i), ISLOWER (i))
5458 || toupper (i) != TOUPPER (i))
5459 return 2;
5460 return 0;
5461}
5462_ACEOF
5463rm -f conftest$ac_exeext
5464if { (ac_try="$ac_link"
5465case "(($ac_try" in
5466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5467 *) ac_try_echo=$ac_try;;
5468esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470 (eval "$ac_link") 2>&5
5471 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005473 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5474 { (case "(($ac_try" in
5475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5476 *) ac_try_echo=$ac_try;;
5477esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479 (eval "$ac_try") 2>&5
5480 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005482 (exit $ac_status); }; }; then
5483 :
5484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005485 echo "$as_me: program exited with status $ac_status" >&5
5486echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487sed 's/^/| /' conftest.$ac_ext >&5
5488
5489( exit $ac_status )
5490ac_cv_header_stdc=no
5491fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5493fi
5494
5495
5496fi
5497fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005498{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5499echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500if test $ac_cv_header_stdc = yes; then
5501
5502cat >>confdefs.h <<\_ACEOF
5503#define STDC_HEADERS 1
5504_ACEOF
5505
5506fi
5507
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005508# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5519 inttypes.h stdint.h unistd.h
5520do
5521as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5522{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5523echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5524if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5525 echo $ECHO_N "(cached) $ECHO_C" >&6
5526else
5527 cat >conftest.$ac_ext <<_ACEOF
5528/* confdefs.h. */
5529_ACEOF
5530cat confdefs.h >>conftest.$ac_ext
5531cat >>conftest.$ac_ext <<_ACEOF
5532/* end confdefs.h. */
5533$ac_includes_default
5534
5535#include <$ac_header>
5536_ACEOF
5537rm -f conftest.$ac_objext
5538if { (ac_try="$ac_compile"
5539case "(($ac_try" in
5540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5541 *) ac_try_echo=$ac_try;;
5542esac
5543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5544 (eval "$ac_compile") 2>conftest.er1
5545 ac_status=$?
5546 grep -v '^ *+' conftest.er1 >conftest.err
5547 rm -f conftest.er1
5548 cat conftest.err >&5
5549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5550 (exit $ac_status); } && {
5551 test -z "$ac_c_werror_flag" ||
5552 test ! -s conftest.err
5553 } && test -s conftest.$ac_objext; then
5554 eval "$as_ac_Header=yes"
5555else
5556 echo "$as_me: failed program was:" >&5
5557sed 's/^/| /' conftest.$ac_ext >&5
5558
5559 eval "$as_ac_Header=no"
5560fi
5561
5562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5563fi
5564ac_res=`eval echo '${'$as_ac_Header'}'`
5565 { echo "$as_me:$LINENO: result: $ac_res" >&5
5566echo "${ECHO_T}$ac_res" >&6; }
5567if test `eval echo '${'$as_ac_Header'}'` = yes; then
5568 cat >>confdefs.h <<_ACEOF
5569#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5570_ACEOF
5571
5572fi
5573
5574done
5575
5576
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005577
Martin v. Löwis11437992002-04-12 09:54:03 +00005578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
Anthony Baxter8a560de2004-10-13 15:30:56 +00005613
Martin v. Löwisc3001752005-01-23 09:27:24 +00005614
Martin v. Löwis11017b12006-01-14 18:12:57 +00005615
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005616
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005617
5618
5619
5620
5621
5622
5623
5624
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005625
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005626
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005627
5628
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005629
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005630
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005631for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5632fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005633ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005634shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005635unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005636sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5637sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005638sys/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 +00005639sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005640sys/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 +00005641sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005642bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005643do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005644as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005645if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005646 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5647echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005648if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005649 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005650fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005651ac_res=`eval echo '${'$as_ac_Header'}'`
5652 { echo "$as_me:$LINENO: result: $ac_res" >&5
5653echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005654else
Martin v. Löwis11437992002-04-12 09:54:03 +00005655 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005656{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5657echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005659/* confdefs.h. */
5660_ACEOF
5661cat confdefs.h >>conftest.$ac_ext
5662cat >>conftest.$ac_ext <<_ACEOF
5663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005664$ac_includes_default
5665#include <$ac_header>
5666_ACEOF
5667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005668if { (ac_try="$ac_compile"
5669case "(($ac_try" in
5670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5671 *) ac_try_echo=$ac_try;;
5672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005676 grep -v '^ *+' conftest.er1 >conftest.err
5677 rm -f conftest.er1
5678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005680 (exit $ac_status); } && {
5681 test -z "$ac_c_werror_flag" ||
5682 test ! -s conftest.err
5683 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005684 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005687sed 's/^/| /' conftest.$ac_ext >&5
5688
Martin v. Löwiseba40652007-08-30 20:10:57 +00005689 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005691
5692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005693{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5694echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005695
5696# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005697{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5698echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005700/* confdefs.h. */
5701_ACEOF
5702cat confdefs.h >>conftest.$ac_ext
5703cat >>conftest.$ac_ext <<_ACEOF
5704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005705#include <$ac_header>
5706_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005707if { (ac_try="$ac_cpp conftest.$ac_ext"
5708case "(($ac_try" in
5709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5710 *) ac_try_echo=$ac_try;;
5711esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005713 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005714 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005715 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005716 rm -f conftest.er1
5717 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005719 (exit $ac_status); } >/dev/null && {
5720 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5721 test ! -s conftest.err
5722 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005723 ac_header_preproc=yes
5724else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005726sed 's/^/| /' conftest.$ac_ext >&5
5727
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005729fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005730
Martin v. Löwis11437992002-04-12 09:54:03 +00005731rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005732{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5733echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005734
5735# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5737 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005738 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5739echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5740 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5741echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005742 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005743 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005744 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005745 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5746echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5747 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5748echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5749 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5750echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5751 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5752echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5753 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5754echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5755 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5756echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005757 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005758## -------------------------------------- ##
5759## Report this to http://bugs.python.org/ ##
5760## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005761_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005762 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005763 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005764esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005765{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5766echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005767if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005768 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005769else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005770 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005771fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005772ac_res=`eval echo '${'$as_ac_Header'}'`
5773 { echo "$as_me:$LINENO: result: $ac_res" >&5
5774echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005775
5776fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005777if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005778 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005779#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005780_ACEOF
5781
5782fi
5783
Guido van Rossum627b2d71993-12-24 10:39:16 +00005784done
5785
Martin v. Löwis11437992002-04-12 09:54:03 +00005786
5787
5788
5789
5790
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005791ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005792for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005793 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5794{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5795echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005796if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005797 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005798else
Martin v. Löwis11437992002-04-12 09:54:03 +00005799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005800/* confdefs.h. */
5801_ACEOF
5802cat confdefs.h >>conftest.$ac_ext
5803cat >>conftest.$ac_ext <<_ACEOF
5804/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005805#include <sys/types.h>
5806#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005807
Martin v. Löwis11437992002-04-12 09:54:03 +00005808int
5809main ()
5810{
5811if ((DIR *) 0)
5812return 0;
5813 ;
5814 return 0;
5815}
5816_ACEOF
5817rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005818if { (ac_try="$ac_compile"
5819case "(($ac_try" in
5820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5821 *) ac_try_echo=$ac_try;;
5822esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005826 grep -v '^ *+' conftest.er1 >conftest.err
5827 rm -f conftest.er1
5828 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005830 (exit $ac_status); } && {
5831 test -z "$ac_c_werror_flag" ||
5832 test ! -s conftest.err
5833 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005835else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005837sed 's/^/| /' conftest.$ac_ext >&5
5838
Martin v. Löwiseba40652007-08-30 20:10:57 +00005839 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005841
5842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005843fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005844ac_res=`eval echo '${'$as_ac_Header'}'`
5845 { echo "$as_me:$LINENO: result: $ac_res" >&5
5846echo "${ECHO_T}$ac_res" >&6; }
5847if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005849#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005850_ACEOF
5851
5852ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005853fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005854
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005855done
5856# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5857if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005858 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5859echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005860if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005861 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005862else
Martin v. Löwis11437992002-04-12 09:54:03 +00005863 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005865/* confdefs.h. */
5866_ACEOF
5867cat confdefs.h >>conftest.$ac_ext
5868cat >>conftest.$ac_ext <<_ACEOF
5869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005870
Martin v. Löwiseba40652007-08-30 20:10:57 +00005871/* Override any GCC internal prototype to avoid an error.
5872 Use char because int might match the return type of a GCC
5873 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005874#ifdef __cplusplus
5875extern "C"
5876#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005877char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005878int
5879main ()
5880{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005881return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005882 ;
5883 return 0;
5884}
5885_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005886for ac_lib in '' dir; do
5887 if test -z "$ac_lib"; then
5888 ac_res="none required"
5889 else
5890 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005891 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005892 fi
5893 rm -f conftest.$ac_objext conftest$ac_exeext
5894if { (ac_try="$ac_link"
5895case "(($ac_try" in
5896 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5897 *) ac_try_echo=$ac_try;;
5898esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005899eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005900 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005901 ac_status=$?
5902 grep -v '^ *+' conftest.er1 >conftest.err
5903 rm -f conftest.er1
5904 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005906 (exit $ac_status); } && {
5907 test -z "$ac_c_werror_flag" ||
5908 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005909 } && test -s conftest$ac_exeext &&
5910 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005911 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005913 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005914sed 's/^/| /' conftest.$ac_ext >&5
5915
Martin v. Löwiseba40652007-08-30 20:10:57 +00005916
Brett Cannon19fab762007-06-02 03:02:29 +00005917fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005918
5919rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
5920 conftest$ac_exeext
5921 if test "${ac_cv_search_opendir+set}" = set; then
5922 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00005923fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005924done
5925if test "${ac_cv_search_opendir+set}" = set; then
5926 :
5927else
5928 ac_cv_search_opendir=no
5929fi
5930rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005931LIBS=$ac_func_search_save_LIBS
5932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005933{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5934echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005935ac_res=$ac_cv_search_opendir
5936if test "$ac_res" != no; then
5937 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005938
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005940
Michael W. Hudson54241132001-12-07 15:38:26 +00005941else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005942 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5943echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005944if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005945 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005946else
5947 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005949/* confdefs.h. */
5950_ACEOF
5951cat confdefs.h >>conftest.$ac_ext
5952cat >>conftest.$ac_ext <<_ACEOF
5953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005954
Martin v. Löwiseba40652007-08-30 20:10:57 +00005955/* Override any GCC internal prototype to avoid an error.
5956 Use char because int might match the return type of a GCC
5957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005958#ifdef __cplusplus
5959extern "C"
5960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005961char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005962int
5963main ()
5964{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005965return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005966 ;
5967 return 0;
5968}
5969_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005970for ac_lib in '' x; do
5971 if test -z "$ac_lib"; then
5972 ac_res="none required"
5973 else
5974 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00005975 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00005976 fi
5977 rm -f conftest.$ac_objext conftest$ac_exeext
5978if { (ac_try="$ac_link"
5979case "(($ac_try" in
5980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5981 *) ac_try_echo=$ac_try;;
5982esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005984 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00005985 ac_status=$?
5986 grep -v '^ *+' conftest.er1 >conftest.err
5987 rm -f conftest.er1
5988 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005990 (exit $ac_status); } && {
5991 test -z "$ac_c_werror_flag" ||
5992 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005993 } && test -s conftest$ac_exeext &&
5994 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005995 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00005996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005997 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005998sed 's/^/| /' conftest.$ac_ext >&5
5999
Martin v. Löwiseba40652007-08-30 20:10:57 +00006000
Brett Cannon19fab762007-06-02 03:02:29 +00006001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006002
6003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6004 conftest$ac_exeext
6005 if test "${ac_cv_search_opendir+set}" = set; then
6006 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006008done
6009if test "${ac_cv_search_opendir+set}" = set; then
6010 :
6011else
6012 ac_cv_search_opendir=no
6013fi
6014rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006015LIBS=$ac_func_search_save_LIBS
6016fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006017{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6018echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006019ac_res=$ac_cv_search_opendir
6020if test "$ac_res" != no; then
6021 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006022
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006023fi
6024
6025fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006026
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006027{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6028echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006029if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006030 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006031else
6032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006033/* confdefs.h. */
6034_ACEOF
6035cat confdefs.h >>conftest.$ac_ext
6036cat >>conftest.$ac_ext <<_ACEOF
6037/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006038#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006039int
6040main ()
6041{
6042return makedev(0, 0);
6043 ;
6044 return 0;
6045}
6046_ACEOF
6047rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006048if { (ac_try="$ac_link"
6049case "(($ac_try" in
6050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6051 *) ac_try_echo=$ac_try;;
6052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006054 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006056 grep -v '^ *+' conftest.er1 >conftest.err
6057 rm -f conftest.er1
6058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006060 (exit $ac_status); } && {
6061 test -z "$ac_c_werror_flag" ||
6062 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006063 } && test -s conftest$ac_exeext &&
6064 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006065 ac_cv_header_sys_types_h_makedev=yes
6066else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006067 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006068sed 's/^/| /' conftest.$ac_ext >&5
6069
Martin v. Löwiseba40652007-08-30 20:10:57 +00006070 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006071fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006072
6073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006075
6076fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006077{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6078echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006079
6080if test $ac_cv_header_sys_types_h_makedev = no; then
6081if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006082 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6083echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006084if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006085 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006086fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006087{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6088echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006089else
6090 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006091{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6092echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006094/* confdefs.h. */
6095_ACEOF
6096cat confdefs.h >>conftest.$ac_ext
6097cat >>conftest.$ac_ext <<_ACEOF
6098/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006099$ac_includes_default
6100#include <sys/mkdev.h>
6101_ACEOF
6102rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006103if { (ac_try="$ac_compile"
6104case "(($ac_try" in
6105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6106 *) ac_try_echo=$ac_try;;
6107esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006109 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006110 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006111 grep -v '^ *+' conftest.er1 >conftest.err
6112 rm -f conftest.er1
6113 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006115 (exit $ac_status); } && {
6116 test -z "$ac_c_werror_flag" ||
6117 test ! -s conftest.err
6118 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006119 ac_header_compiler=yes
6120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006122sed 's/^/| /' conftest.$ac_ext >&5
6123
Martin v. Löwiseba40652007-08-30 20:10:57 +00006124 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126
6127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006128{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6129echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006130
6131# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006132{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6133echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006135/* confdefs.h. */
6136_ACEOF
6137cat confdefs.h >>conftest.$ac_ext
6138cat >>conftest.$ac_ext <<_ACEOF
6139/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006140#include <sys/mkdev.h>
6141_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006142if { (ac_try="$ac_cpp conftest.$ac_ext"
6143case "(($ac_try" in
6144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6145 *) ac_try_echo=$ac_try;;
6146esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006148 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006150 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006151 rm -f conftest.er1
6152 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006154 (exit $ac_status); } >/dev/null && {
6155 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6156 test ! -s conftest.err
6157 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006158 ac_header_preproc=yes
6159else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006160 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006161sed 's/^/| /' conftest.$ac_ext >&5
6162
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006163 ac_header_preproc=no
6164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006165
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006166rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006167{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6168echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006169
6170# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006171case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6172 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006173 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6174echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6175 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6176echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006177 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006178 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006179 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006180 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6181echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6182 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6183echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6185echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6186 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6187echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6188 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6189echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6190 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6191echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006192 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006193## -------------------------------------- ##
6194## Report this to http://bugs.python.org/ ##
6195## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006196_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006197 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006198 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006199esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006200{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6201echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204else
6205 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6206fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006207{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6208echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006209
6210fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006211if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006212
6213cat >>confdefs.h <<\_ACEOF
6214#define MAJOR_IN_MKDEV 1
6215_ACEOF
6216
6217fi
6218
6219
6220
6221 if test $ac_cv_header_sys_mkdev_h = no; then
6222 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006223 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6224echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006225if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006226 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006228{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6229echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006230else
6231 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006232{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6233echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006235/* confdefs.h. */
6236_ACEOF
6237cat confdefs.h >>conftest.$ac_ext
6238cat >>conftest.$ac_ext <<_ACEOF
6239/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006240$ac_includes_default
6241#include <sys/sysmacros.h>
6242_ACEOF
6243rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244if { (ac_try="$ac_compile"
6245case "(($ac_try" in
6246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6247 *) ac_try_echo=$ac_try;;
6248esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006252 grep -v '^ *+' conftest.er1 >conftest.err
6253 rm -f conftest.er1
6254 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006256 (exit $ac_status); } && {
6257 test -z "$ac_c_werror_flag" ||
6258 test ! -s conftest.err
6259 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006260 ac_header_compiler=yes
6261else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006263sed 's/^/| /' conftest.$ac_ext >&5
6264
Martin v. Löwiseba40652007-08-30 20:10:57 +00006265 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006267
6268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006269{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6270echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006271
6272# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006273{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6274echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006276/* confdefs.h. */
6277_ACEOF
6278cat confdefs.h >>conftest.$ac_ext
6279cat >>conftest.$ac_ext <<_ACEOF
6280/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281#include <sys/sysmacros.h>
6282_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006283if { (ac_try="$ac_cpp conftest.$ac_ext"
6284case "(($ac_try" in
6285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6286 *) ac_try_echo=$ac_try;;
6287esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006289 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006290 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006291 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006292 rm -f conftest.er1
6293 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006295 (exit $ac_status); } >/dev/null && {
6296 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6297 test ! -s conftest.err
6298 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006299 ac_header_preproc=yes
6300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006302sed 's/^/| /' conftest.$ac_ext >&5
6303
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006304 ac_header_preproc=no
6305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006306
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006307rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006308{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6309echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006310
6311# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006312case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6313 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006314 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6315echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6316 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6317echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006318 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006319 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006320 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006321 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6322echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6323 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6324echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6325 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6326echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6327 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6328echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6329 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6330echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6331 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6332echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006333 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006334## -------------------------------------- ##
6335## Report this to http://bugs.python.org/ ##
6336## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006337_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006338 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006339 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006340esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006341{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6342echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006344 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345else
6346 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6347fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006348{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6349echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006350
6351fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006352if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006353
6354cat >>confdefs.h <<\_ACEOF
6355#define MAJOR_IN_SYSMACROS 1
6356_ACEOF
6357
6358fi
6359
6360
6361 fi
6362fi
6363
Michael W. Hudson54241132001-12-07 15:38:26 +00006364
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006365# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006366
6367for ac_header in term.h
6368do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006369as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6370{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6371echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006372if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006373 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006374else
6375 cat >conftest.$ac_ext <<_ACEOF
6376/* confdefs.h. */
6377_ACEOF
6378cat confdefs.h >>conftest.$ac_ext
6379cat >>conftest.$ac_ext <<_ACEOF
6380/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006381
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006382#ifdef HAVE_CURSES_H
6383#include <curses.h>
6384#endif
6385
6386
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006387#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006388_ACEOF
6389rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006390if { (ac_try="$ac_compile"
6391case "(($ac_try" in
6392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6393 *) ac_try_echo=$ac_try;;
6394esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006397 ac_status=$?
6398 grep -v '^ *+' conftest.er1 >conftest.err
6399 rm -f conftest.er1
6400 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006402 (exit $ac_status); } && {
6403 test -z "$ac_c_werror_flag" ||
6404 test ! -s conftest.err
6405 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006406 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006408 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006409sed 's/^/| /' conftest.$ac_ext >&5
6410
Martin v. Löwiseba40652007-08-30 20:10:57 +00006411 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006412fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006413
6414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006415fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006416ac_res=`eval echo '${'$as_ac_Header'}'`
6417 { echo "$as_me:$LINENO: result: $ac_res" >&5
6418echo "${ECHO_T}$ac_res" >&6; }
6419if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006420 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006421#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006422_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006423
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006424fi
6425
6426done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006427
6428
Martin v. Löwis11017b12006-01-14 18:12:57 +00006429# On Linux, netlink.h requires asm/types.h
6430
6431for ac_header in linux/netlink.h
6432do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006433as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6434{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6435echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006436if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006437 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006438else
6439 cat >conftest.$ac_ext <<_ACEOF
6440/* confdefs.h. */
6441_ACEOF
6442cat confdefs.h >>conftest.$ac_ext
6443cat >>conftest.$ac_ext <<_ACEOF
6444/* end confdefs.h. */
6445
6446#ifdef HAVE_ASM_TYPES_H
6447#include <asm/types.h>
6448#endif
6449#ifdef HAVE_SYS_SOCKET_H
6450#include <sys/socket.h>
6451#endif
6452
6453
6454#include <$ac_header>
6455_ACEOF
6456rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006457if { (ac_try="$ac_compile"
6458case "(($ac_try" in
6459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6460 *) ac_try_echo=$ac_try;;
6461esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006463 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006464 ac_status=$?
6465 grep -v '^ *+' conftest.er1 >conftest.err
6466 rm -f conftest.er1
6467 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006469 (exit $ac_status); } && {
6470 test -z "$ac_c_werror_flag" ||
6471 test ! -s conftest.err
6472 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006473 eval "$as_ac_Header=yes"
6474else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006475 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006476sed 's/^/| /' conftest.$ac_ext >&5
6477
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006479fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006480
6481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006482fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006483ac_res=`eval echo '${'$as_ac_Header'}'`
6484 { echo "$as_me:$LINENO: result: $ac_res" >&5
6485echo "${ECHO_T}$ac_res" >&6; }
6486if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006487 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006488#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006489_ACEOF
6490
6491fi
6492
6493done
6494
6495
Guido van Rossum627b2d71993-12-24 10:39:16 +00006496# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006497was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006498{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6499echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006500cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006501/* confdefs.h. */
6502_ACEOF
6503cat confdefs.h >>conftest.$ac_ext
6504cat >>conftest.$ac_ext <<_ACEOF
6505/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006506#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006507
6508_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006510 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006511 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006512else
Martin v. Löwis11437992002-04-12 09:54:03 +00006513
6514
6515cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006517_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006518
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006519
Guido van Rossum627b2d71993-12-24 10:39:16 +00006520fi
6521rm -f conftest*
6522
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006523{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6524echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006525
Neal Norwitz11690112002-07-30 01:08:28 +00006526# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006527{ echo "$as_me:$LINENO: checking for makedev" >&5
6528echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006529cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006530/* confdefs.h. */
6531_ACEOF
6532cat confdefs.h >>conftest.$ac_ext
6533cat >>conftest.$ac_ext <<_ACEOF
6534/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006535#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006536int
6537main ()
6538{
6539 makedev(0, 0)
6540 ;
6541 return 0;
6542}
6543_ACEOF
6544rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006545if { (ac_try="$ac_link"
6546case "(($ac_try" in
6547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6548 *) ac_try_echo=$ac_try;;
6549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006551 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006553 grep -v '^ *+' conftest.er1 >conftest.err
6554 rm -f conftest.er1
6555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006557 (exit $ac_status); } && {
6558 test -z "$ac_c_werror_flag" ||
6559 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006560 } && test -s conftest$ac_exeext &&
6561 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006562 ac_cv_has_makedev=yes
6563else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006565sed 's/^/| /' conftest.$ac_ext >&5
6566
Martin v. Löwiseba40652007-08-30 20:10:57 +00006567 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006569
6570rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006571 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006572if test "$ac_cv_has_makedev" = "no"; then
6573 # we didn't link, try if _OSF_SOURCE will allow us to link
6574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006575/* confdefs.h. */
6576_ACEOF
6577cat confdefs.h >>conftest.$ac_ext
6578cat >>conftest.$ac_ext <<_ACEOF
6579/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006580
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006581#define _OSF_SOURCE 1
6582#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006583
Neal Norwitz11690112002-07-30 01:08:28 +00006584int
6585main ()
6586{
6587 makedev(0, 0)
6588 ;
6589 return 0;
6590}
6591_ACEOF
6592rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006593if { (ac_try="$ac_link"
6594case "(($ac_try" in
6595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6596 *) ac_try_echo=$ac_try;;
6597esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006599 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006601 grep -v '^ *+' conftest.er1 >conftest.err
6602 rm -f conftest.er1
6603 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006605 (exit $ac_status); } && {
6606 test -z "$ac_c_werror_flag" ||
6607 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006608 } && test -s conftest$ac_exeext &&
6609 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006610 ac_cv_has_makedev=yes
6611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006612 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006613sed 's/^/| /' conftest.$ac_ext >&5
6614
Martin v. Löwiseba40652007-08-30 20:10:57 +00006615 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006617
6618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006619 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006620 if test "$ac_cv_has_makedev" = "yes"; then
6621
6622cat >>confdefs.h <<\_ACEOF
6623#define _OSF_SOURCE 1
6624_ACEOF
6625
6626 fi
6627fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006628{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6629echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006630if test "$ac_cv_has_makedev" = "yes"; then
6631
6632cat >>confdefs.h <<\_ACEOF
6633#define HAVE_MAKEDEV 1
6634_ACEOF
6635
6636fi
6637
Martin v. Löwis399a6892002-10-04 10:22:02 +00006638# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6639# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6640# defined, but the compiler does not support pragma redefine_extname,
6641# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6642# structures (such as rlimit64) without declaring them. As a
6643# work-around, disable LFS on such configurations
6644
6645use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006646{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6647echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006649/* confdefs.h. */
6650_ACEOF
6651cat confdefs.h >>conftest.$ac_ext
6652cat >>conftest.$ac_ext <<_ACEOF
6653/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006654
6655#define _LARGEFILE_SOURCE 1
6656#define _FILE_OFFSET_BITS 64
6657#include <sys/resource.h>
6658
Martin v. Löwis399a6892002-10-04 10:22:02 +00006659int
6660main ()
6661{
6662struct rlimit foo;
6663 ;
6664 return 0;
6665}
6666_ACEOF
6667rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006668if { (ac_try="$ac_compile"
6669case "(($ac_try" in
6670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6671 *) ac_try_echo=$ac_try;;
6672esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006674 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006675 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006676 grep -v '^ *+' conftest.er1 >conftest.err
6677 rm -f conftest.er1
6678 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006680 (exit $ac_status); } && {
6681 test -z "$ac_c_werror_flag" ||
6682 test ! -s conftest.err
6683 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006684 sol_lfs_bug=no
6685else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006687sed 's/^/| /' conftest.$ac_ext >&5
6688
Martin v. Löwiseba40652007-08-30 20:10:57 +00006689 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006690fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006691
6692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006693{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6694echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006695if test "$sol_lfs_bug" = "yes"; then
6696 use_lfs=no
6697fi
6698
6699if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006700# Two defines needed to enable largefile support on various platforms
6701# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006702
Martin v. Löwis11437992002-04-12 09:54:03 +00006703cat >>confdefs.h <<\_ACEOF
6704#define _LARGEFILE_SOURCE 1
6705_ACEOF
6706
6707
6708cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006709#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006710_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006711
Martin v. Löwis399a6892002-10-04 10:22:02 +00006712fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006713
Guido van Rossum84e7b241996-08-19 21:59:00 +00006714# Add some code to confdefs.h so that the test for off_t works on SCO
6715cat >> confdefs.h <<\EOF
6716#if defined(SCO_DS)
6717#undef _OFF_T
6718#endif
6719EOF
6720
Guido van Rossumef2255b2000-03-10 22:30:29 +00006721# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006722{ echo "$as_me:$LINENO: checking for mode_t" >&5
6723echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006724if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006725 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006726else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006727 cat >conftest.$ac_ext <<_ACEOF
6728/* confdefs.h. */
6729_ACEOF
6730cat confdefs.h >>conftest.$ac_ext
6731cat >>conftest.$ac_ext <<_ACEOF
6732/* end confdefs.h. */
6733$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006734typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006735int
6736main ()
6737{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006738if ((ac__type_new_ *) 0)
6739 return 0;
6740if (sizeof (ac__type_new_))
6741 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006742 ;
6743 return 0;
6744}
6745_ACEOF
6746rm -f conftest.$ac_objext
6747if { (ac_try="$ac_compile"
6748case "(($ac_try" in
6749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6750 *) ac_try_echo=$ac_try;;
6751esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006753 (eval "$ac_compile") 2>conftest.er1
6754 ac_status=$?
6755 grep -v '^ *+' conftest.er1 >conftest.err
6756 rm -f conftest.er1
6757 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006759 (exit $ac_status); } && {
6760 test -z "$ac_c_werror_flag" ||
6761 test ! -s conftest.err
6762 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006763 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006764else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006766sed 's/^/| /' conftest.$ac_ext >&5
6767
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006768 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006770
6771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006772fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006773{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6774echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6775if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006776 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006777else
Martin v. Löwis11437992002-04-12 09:54:03 +00006778
6779cat >>confdefs.h <<_ACEOF
6780#define mode_t int
6781_ACEOF
6782
6783fi
6784
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006785{ echo "$as_me:$LINENO: checking for off_t" >&5
6786echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006787if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006788 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006789else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006790 cat >conftest.$ac_ext <<_ACEOF
6791/* confdefs.h. */
6792_ACEOF
6793cat confdefs.h >>conftest.$ac_ext
6794cat >>conftest.$ac_ext <<_ACEOF
6795/* end confdefs.h. */
6796$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006797typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798int
6799main ()
6800{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006801if ((ac__type_new_ *) 0)
6802 return 0;
6803if (sizeof (ac__type_new_))
6804 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006805 ;
6806 return 0;
6807}
6808_ACEOF
6809rm -f conftest.$ac_objext
6810if { (ac_try="$ac_compile"
6811case "(($ac_try" in
6812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6813 *) ac_try_echo=$ac_try;;
6814esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006816 (eval "$ac_compile") 2>conftest.er1
6817 ac_status=$?
6818 grep -v '^ *+' conftest.er1 >conftest.err
6819 rm -f conftest.er1
6820 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006822 (exit $ac_status); } && {
6823 test -z "$ac_c_werror_flag" ||
6824 test ! -s conftest.err
6825 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006826 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006827else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006829sed 's/^/| /' conftest.$ac_ext >&5
6830
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006831 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006833
6834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006835fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006836{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6837echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6838if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006839 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006840else
Martin v. Löwis11437992002-04-12 09:54:03 +00006841
6842cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006843#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006844_ACEOF
6845
6846fi
6847
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006848{ echo "$as_me:$LINENO: checking for pid_t" >&5
6849echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006850if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006851 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006852else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006853 cat >conftest.$ac_ext <<_ACEOF
6854/* confdefs.h. */
6855_ACEOF
6856cat confdefs.h >>conftest.$ac_ext
6857cat >>conftest.$ac_ext <<_ACEOF
6858/* end confdefs.h. */
6859$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006860typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006861int
6862main ()
6863{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006864if ((ac__type_new_ *) 0)
6865 return 0;
6866if (sizeof (ac__type_new_))
6867 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006868 ;
6869 return 0;
6870}
6871_ACEOF
6872rm -f conftest.$ac_objext
6873if { (ac_try="$ac_compile"
6874case "(($ac_try" in
6875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6876 *) ac_try_echo=$ac_try;;
6877esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006879 (eval "$ac_compile") 2>conftest.er1
6880 ac_status=$?
6881 grep -v '^ *+' conftest.er1 >conftest.err
6882 rm -f conftest.er1
6883 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006885 (exit $ac_status); } && {
6886 test -z "$ac_c_werror_flag" ||
6887 test ! -s conftest.err
6888 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006889 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006892sed 's/^/| /' conftest.$ac_ext >&5
6893
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006894 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006895fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006896
6897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006898fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006899{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6900echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
6901if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006902 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903else
Martin v. Löwis11437992002-04-12 09:54:03 +00006904
6905cat >>confdefs.h <<_ACEOF
6906#define pid_t int
6907_ACEOF
6908
6909fi
6910
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006911{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6912echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006913if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006914 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006915else
6916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006917/* confdefs.h. */
6918_ACEOF
6919cat confdefs.h >>conftest.$ac_ext
6920cat >>conftest.$ac_ext <<_ACEOF
6921/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006922#include <sys/types.h>
6923#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006924
Martin v. Löwis11437992002-04-12 09:54:03 +00006925int
6926main ()
6927{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006928return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00006929 ;
6930 return 0;
6931}
6932_ACEOF
6933rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006934if { (ac_try="$ac_compile"
6935case "(($ac_try" in
6936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6937 *) ac_try_echo=$ac_try;;
6938esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006942 grep -v '^ *+' conftest.er1 >conftest.err
6943 rm -f conftest.er1
6944 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006946 (exit $ac_status); } && {
6947 test -z "$ac_c_werror_flag" ||
6948 test ! -s conftest.err
6949 } && test -s conftest.$ac_objext; then
6950 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006951else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006953sed 's/^/| /' conftest.$ac_ext >&5
6954
Martin v. Löwiseba40652007-08-30 20:10:57 +00006955 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006957
6958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006959fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006960{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6961echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006962
Martin v. Löwis11437992002-04-12 09:54:03 +00006963cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006964#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006965_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966
Michael W. Hudson54241132001-12-07 15:38:26 +00006967
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006968{ echo "$as_me:$LINENO: checking for size_t" >&5
6969echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006970if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006971 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006973 cat >conftest.$ac_ext <<_ACEOF
6974/* confdefs.h. */
6975_ACEOF
6976cat confdefs.h >>conftest.$ac_ext
6977cat >>conftest.$ac_ext <<_ACEOF
6978/* end confdefs.h. */
6979$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006980typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006981int
6982main ()
6983{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006984if ((ac__type_new_ *) 0)
6985 return 0;
6986if (sizeof (ac__type_new_))
6987 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006988 ;
6989 return 0;
6990}
6991_ACEOF
6992rm -f conftest.$ac_objext
6993if { (ac_try="$ac_compile"
6994case "(($ac_try" in
6995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6996 *) ac_try_echo=$ac_try;;
6997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006999 (eval "$ac_compile") 2>conftest.er1
7000 ac_status=$?
7001 grep -v '^ *+' conftest.er1 >conftest.err
7002 rm -f conftest.er1
7003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007005 (exit $ac_status); } && {
7006 test -z "$ac_c_werror_flag" ||
7007 test ! -s conftest.err
7008 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007009 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007012sed 's/^/| /' conftest.$ac_ext >&5
7013
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007014 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007015fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007016
7017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007018fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007019{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7020echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7021if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007022 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007023else
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
7025cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007027_ACEOF
7028
7029fi
7030
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007031{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7032echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007033if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007034 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007035else
7036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007037/* confdefs.h. */
7038_ACEOF
7039cat confdefs.h >>conftest.$ac_ext
7040cat >>conftest.$ac_ext <<_ACEOF
7041/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007042#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007043
7044_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007046 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007047 ac_cv_type_uid_t=yes
7048else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007049 ac_cv_type_uid_t=no
7050fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007051rm -f conftest*
7052
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007053fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007054{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7055echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007056if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007057
Martin v. Löwis11437992002-04-12 09:54:03 +00007058cat >>confdefs.h <<\_ACEOF
7059#define uid_t int
7060_ACEOF
7061
7062
7063cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007064#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007065_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007066
7067fi
7068
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007069
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007070 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7071echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007072if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007073 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007074else
7075 ac_cv_c_uint32_t=no
7076 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7077 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7078 cat >conftest.$ac_ext <<_ACEOF
7079/* confdefs.h. */
7080_ACEOF
7081cat confdefs.h >>conftest.$ac_ext
7082cat >>conftest.$ac_ext <<_ACEOF
7083/* end confdefs.h. */
7084$ac_includes_default
7085int
7086main ()
7087{
7088static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7089test_array [0] = 0
7090
7091 ;
7092 return 0;
7093}
7094_ACEOF
7095rm -f conftest.$ac_objext
7096if { (ac_try="$ac_compile"
7097case "(($ac_try" in
7098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7099 *) ac_try_echo=$ac_try;;
7100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007102 (eval "$ac_compile") 2>conftest.er1
7103 ac_status=$?
7104 grep -v '^ *+' conftest.er1 >conftest.err
7105 rm -f conftest.er1
7106 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007108 (exit $ac_status); } && {
7109 test -z "$ac_c_werror_flag" ||
7110 test ! -s conftest.err
7111 } && test -s conftest.$ac_objext; then
7112 case $ac_type in
7113 uint32_t) ac_cv_c_uint32_t=yes ;;
7114 *) ac_cv_c_uint32_t=$ac_type ;;
7115esac
7116
7117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007118 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007119sed 's/^/| /' conftest.$ac_ext >&5
7120
7121
7122fi
7123
7124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7125 test "$ac_cv_c_uint32_t" != no && break
7126 done
7127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007128{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7129echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007130 case $ac_cv_c_uint32_t in #(
7131 no|yes) ;; #(
7132 *)
7133
7134cat >>confdefs.h <<\_ACEOF
7135#define _UINT32_T 1
7136_ACEOF
7137
7138
7139cat >>confdefs.h <<_ACEOF
7140#define uint32_t $ac_cv_c_uint32_t
7141_ACEOF
7142;;
7143 esac
7144
7145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007146 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7147echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007148if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007149 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007150else
7151 ac_cv_c_uint64_t=no
7152 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7153 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7154 cat >conftest.$ac_ext <<_ACEOF
7155/* confdefs.h. */
7156_ACEOF
7157cat confdefs.h >>conftest.$ac_ext
7158cat >>conftest.$ac_ext <<_ACEOF
7159/* end confdefs.h. */
7160$ac_includes_default
7161int
7162main ()
7163{
7164static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7165test_array [0] = 0
7166
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext
7172if { (ac_try="$ac_compile"
7173case "(($ac_try" in
7174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7175 *) ac_try_echo=$ac_try;;
7176esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007178 (eval "$ac_compile") 2>conftest.er1
7179 ac_status=$?
7180 grep -v '^ *+' conftest.er1 >conftest.err
7181 rm -f conftest.er1
7182 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007184 (exit $ac_status); } && {
7185 test -z "$ac_c_werror_flag" ||
7186 test ! -s conftest.err
7187 } && test -s conftest.$ac_objext; then
7188 case $ac_type in
7189 uint64_t) ac_cv_c_uint64_t=yes ;;
7190 *) ac_cv_c_uint64_t=$ac_type ;;
7191esac
7192
7193else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007194 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007195sed 's/^/| /' conftest.$ac_ext >&5
7196
7197
7198fi
7199
7200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201 test "$ac_cv_c_uint64_t" != no && break
7202 done
7203fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007204{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7205echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007206 case $ac_cv_c_uint64_t in #(
7207 no|yes) ;; #(
7208 *)
7209
7210cat >>confdefs.h <<\_ACEOF
7211#define _UINT64_T 1
7212_ACEOF
7213
7214
7215cat >>confdefs.h <<_ACEOF
7216#define uint64_t $ac_cv_c_uint64_t
7217_ACEOF
7218;;
7219 esac
7220
7221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007222 { echo "$as_me:$LINENO: checking for int32_t" >&5
7223echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007224if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007225 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007226else
7227 ac_cv_c_int32_t=no
7228 for ac_type in 'int32_t' 'int' 'long int' \
7229 'long long int' 'short int' 'signed char'; do
7230 cat >conftest.$ac_ext <<_ACEOF
7231/* confdefs.h. */
7232_ACEOF
7233cat confdefs.h >>conftest.$ac_ext
7234cat >>conftest.$ac_ext <<_ACEOF
7235/* end confdefs.h. */
7236$ac_includes_default
7237int
7238main ()
7239{
7240static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7241test_array [0] = 0
7242
7243 ;
7244 return 0;
7245}
7246_ACEOF
7247rm -f conftest.$ac_objext
7248if { (ac_try="$ac_compile"
7249case "(($ac_try" in
7250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7251 *) ac_try_echo=$ac_try;;
7252esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007254 (eval "$ac_compile") 2>conftest.er1
7255 ac_status=$?
7256 grep -v '^ *+' conftest.er1 >conftest.err
7257 rm -f conftest.er1
7258 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007260 (exit $ac_status); } && {
7261 test -z "$ac_c_werror_flag" ||
7262 test ! -s conftest.err
7263 } && test -s conftest.$ac_objext; then
7264 cat >conftest.$ac_ext <<_ACEOF
7265/* confdefs.h. */
7266_ACEOF
7267cat confdefs.h >>conftest.$ac_ext
7268cat >>conftest.$ac_ext <<_ACEOF
7269/* end confdefs.h. */
7270$ac_includes_default
7271int
7272main ()
7273{
7274static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007275 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007276test_array [0] = 0
7277
7278 ;
7279 return 0;
7280}
7281_ACEOF
7282rm -f conftest.$ac_objext
7283if { (ac_try="$ac_compile"
7284case "(($ac_try" in
7285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7286 *) ac_try_echo=$ac_try;;
7287esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007289 (eval "$ac_compile") 2>conftest.er1
7290 ac_status=$?
7291 grep -v '^ *+' conftest.er1 >conftest.err
7292 rm -f conftest.er1
7293 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007295 (exit $ac_status); } && {
7296 test -z "$ac_c_werror_flag" ||
7297 test ! -s conftest.err
7298 } && test -s conftest.$ac_objext; then
7299 :
7300else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007301 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007302sed 's/^/| /' conftest.$ac_ext >&5
7303
7304 case $ac_type in
7305 int32_t) ac_cv_c_int32_t=yes ;;
7306 *) ac_cv_c_int32_t=$ac_type ;;
7307esac
7308
7309fi
7310
7311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7312else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007313 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007314sed 's/^/| /' conftest.$ac_ext >&5
7315
7316
7317fi
7318
7319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7320 test "$ac_cv_c_int32_t" != no && break
7321 done
7322fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007323{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7324echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007325 case $ac_cv_c_int32_t in #(
7326 no|yes) ;; #(
7327 *)
7328
7329cat >>confdefs.h <<_ACEOF
7330#define int32_t $ac_cv_c_int32_t
7331_ACEOF
7332;;
7333 esac
7334
7335
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007336 { echo "$as_me:$LINENO: checking for int64_t" >&5
7337echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007338if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007339 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007340else
7341 ac_cv_c_int64_t=no
7342 for ac_type in 'int64_t' 'int' 'long int' \
7343 'long long int' 'short int' 'signed char'; do
7344 cat >conftest.$ac_ext <<_ACEOF
7345/* confdefs.h. */
7346_ACEOF
7347cat confdefs.h >>conftest.$ac_ext
7348cat >>conftest.$ac_ext <<_ACEOF
7349/* end confdefs.h. */
7350$ac_includes_default
7351int
7352main ()
7353{
7354static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7355test_array [0] = 0
7356
7357 ;
7358 return 0;
7359}
7360_ACEOF
7361rm -f conftest.$ac_objext
7362if { (ac_try="$ac_compile"
7363case "(($ac_try" in
7364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7365 *) ac_try_echo=$ac_try;;
7366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007368 (eval "$ac_compile") 2>conftest.er1
7369 ac_status=$?
7370 grep -v '^ *+' conftest.er1 >conftest.err
7371 rm -f conftest.er1
7372 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007374 (exit $ac_status); } && {
7375 test -z "$ac_c_werror_flag" ||
7376 test ! -s conftest.err
7377 } && test -s conftest.$ac_objext; then
7378 cat >conftest.$ac_ext <<_ACEOF
7379/* confdefs.h. */
7380_ACEOF
7381cat confdefs.h >>conftest.$ac_ext
7382cat >>conftest.$ac_ext <<_ACEOF
7383/* end confdefs.h. */
7384$ac_includes_default
7385int
7386main ()
7387{
7388static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007389 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007390test_array [0] = 0
7391
7392 ;
7393 return 0;
7394}
7395_ACEOF
7396rm -f conftest.$ac_objext
7397if { (ac_try="$ac_compile"
7398case "(($ac_try" in
7399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7400 *) ac_try_echo=$ac_try;;
7401esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007403 (eval "$ac_compile") 2>conftest.er1
7404 ac_status=$?
7405 grep -v '^ *+' conftest.er1 >conftest.err
7406 rm -f conftest.er1
7407 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007409 (exit $ac_status); } && {
7410 test -z "$ac_c_werror_flag" ||
7411 test ! -s conftest.err
7412 } && test -s conftest.$ac_objext; then
7413 :
7414else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007415 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007416sed 's/^/| /' conftest.$ac_ext >&5
7417
7418 case $ac_type in
7419 int64_t) ac_cv_c_int64_t=yes ;;
7420 *) ac_cv_c_int64_t=$ac_type ;;
7421esac
7422
7423fi
7424
7425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7426else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007427 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007428sed 's/^/| /' conftest.$ac_ext >&5
7429
7430
7431fi
7432
7433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7434 test "$ac_cv_c_int64_t" != no && break
7435 done
7436fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007437{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7438echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007439 case $ac_cv_c_int64_t in #(
7440 no|yes) ;; #(
7441 *)
7442
7443cat >>confdefs.h <<_ACEOF
7444#define int64_t $ac_cv_c_int64_t
7445_ACEOF
7446;;
7447 esac
7448
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007449{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7450echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007451if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007452 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007453else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007454 cat >conftest.$ac_ext <<_ACEOF
7455/* confdefs.h. */
7456_ACEOF
7457cat confdefs.h >>conftest.$ac_ext
7458cat >>conftest.$ac_ext <<_ACEOF
7459/* end confdefs.h. */
7460$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007461typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007462int
7463main ()
7464{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007465if ((ac__type_new_ *) 0)
7466 return 0;
7467if (sizeof (ac__type_new_))
7468 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007469 ;
7470 return 0;
7471}
7472_ACEOF
7473rm -f conftest.$ac_objext
7474if { (ac_try="$ac_compile"
7475case "(($ac_try" in
7476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7477 *) ac_try_echo=$ac_try;;
7478esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007480 (eval "$ac_compile") 2>conftest.er1
7481 ac_status=$?
7482 grep -v '^ *+' conftest.er1 >conftest.err
7483 rm -f conftest.er1
7484 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007486 (exit $ac_status); } && {
7487 test -z "$ac_c_werror_flag" ||
7488 test ! -s conftest.err
7489 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007490 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007491else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007492 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007493sed 's/^/| /' conftest.$ac_ext >&5
7494
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007495 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007497
7498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007500{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7501echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7502if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007503
7504cat >>confdefs.h <<\_ACEOF
7505#define HAVE_SSIZE_T 1
7506_ACEOF
7507
7508fi
7509
Jack Jansendd19cf82001-12-06 22:36:17 +00007510
Michael W. Hudson54241132001-12-07 15:38:26 +00007511# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007512# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007513{ echo "$as_me:$LINENO: checking for int" >&5
7514echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7515if test "${ac_cv_type_int+set}" = set; then
7516 echo $ECHO_N "(cached) $ECHO_C" >&6
7517else
7518 cat >conftest.$ac_ext <<_ACEOF
7519/* confdefs.h. */
7520_ACEOF
7521cat confdefs.h >>conftest.$ac_ext
7522cat >>conftest.$ac_ext <<_ACEOF
7523/* end confdefs.h. */
7524$ac_includes_default
7525typedef int ac__type_new_;
7526int
7527main ()
7528{
7529if ((ac__type_new_ *) 0)
7530 return 0;
7531if (sizeof (ac__type_new_))
7532 return 0;
7533 ;
7534 return 0;
7535}
7536_ACEOF
7537rm -f conftest.$ac_objext
7538if { (ac_try="$ac_compile"
7539case "(($ac_try" in
7540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7541 *) ac_try_echo=$ac_try;;
7542esac
7543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7544 (eval "$ac_compile") 2>conftest.er1
7545 ac_status=$?
7546 grep -v '^ *+' conftest.er1 >conftest.err
7547 rm -f conftest.er1
7548 cat conftest.err >&5
7549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550 (exit $ac_status); } && {
7551 test -z "$ac_c_werror_flag" ||
7552 test ! -s conftest.err
7553 } && test -s conftest.$ac_objext; then
7554 ac_cv_type_int=yes
7555else
7556 echo "$as_me: failed program was:" >&5
7557sed 's/^/| /' conftest.$ac_ext >&5
7558
7559 ac_cv_type_int=no
7560fi
7561
7562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7563fi
7564{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7565echo "${ECHO_T}$ac_cv_type_int" >&6; }
7566
Martin v. Löwiseba40652007-08-30 20:10:57 +00007567# The cast to long int works around a bug in the HP C Compiler
7568# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7569# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7570# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007571{ echo "$as_me:$LINENO: checking size of int" >&5
7572echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007573if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007574 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007575else
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 if test "$cross_compiling" = yes; then
7577 # Depending upon the size, compute the lo and hi bounds.
7578cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007579/* confdefs.h. */
7580_ACEOF
7581cat confdefs.h >>conftest.$ac_ext
7582cat >>conftest.$ac_ext <<_ACEOF
7583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007584$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007585 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007586int
7587main ()
7588{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007589static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007590test_array [0] = 0
7591
7592 ;
7593 return 0;
7594}
7595_ACEOF
7596rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007597if { (ac_try="$ac_compile"
7598case "(($ac_try" in
7599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7600 *) ac_try_echo=$ac_try;;
7601esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007603 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007605 grep -v '^ *+' conftest.er1 >conftest.err
7606 rm -f conftest.er1
7607 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007609 (exit $ac_status); } && {
7610 test -z "$ac_c_werror_flag" ||
7611 test ! -s conftest.err
7612 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007613 ac_lo=0 ac_mid=0
7614 while :; do
7615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007616/* confdefs.h. */
7617_ACEOF
7618cat confdefs.h >>conftest.$ac_ext
7619cat >>conftest.$ac_ext <<_ACEOF
7620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007621$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007622 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007623int
7624main ()
7625{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007626static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007627test_array [0] = 0
7628
7629 ;
7630 return 0;
7631}
7632_ACEOF
7633rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007634if { (ac_try="$ac_compile"
7635case "(($ac_try" in
7636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7637 *) ac_try_echo=$ac_try;;
7638esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007642 grep -v '^ *+' conftest.er1 >conftest.err
7643 rm -f conftest.er1
7644 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007646 (exit $ac_status); } && {
7647 test -z "$ac_c_werror_flag" ||
7648 test ! -s conftest.err
7649 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 ac_hi=$ac_mid; break
7651else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007653sed 's/^/| /' conftest.$ac_ext >&5
7654
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655 ac_lo=`expr $ac_mid + 1`
7656 if test $ac_lo -le $ac_mid; then
7657 ac_lo= ac_hi=
7658 break
7659 fi
7660 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007661fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007662
7663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007664 done
7665else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007667sed 's/^/| /' conftest.$ac_ext >&5
7668
Martin v. Löwiseba40652007-08-30 20:10:57 +00007669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007670/* confdefs.h. */
7671_ACEOF
7672cat confdefs.h >>conftest.$ac_ext
7673cat >>conftest.$ac_ext <<_ACEOF
7674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007675$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007676 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007677int
7678main ()
7679{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007681test_array [0] = 0
7682
7683 ;
7684 return 0;
7685}
7686_ACEOF
7687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007688if { (ac_try="$ac_compile"
7689case "(($ac_try" in
7690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7691 *) ac_try_echo=$ac_try;;
7692esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007696 grep -v '^ *+' conftest.er1 >conftest.err
7697 rm -f conftest.er1
7698 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007700 (exit $ac_status); } && {
7701 test -z "$ac_c_werror_flag" ||
7702 test ! -s conftest.err
7703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ac_hi=-1 ac_mid=-1
7705 while :; do
7706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007707/* confdefs.h. */
7708_ACEOF
7709cat confdefs.h >>conftest.$ac_ext
7710cat >>conftest.$ac_ext <<_ACEOF
7711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007712$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007713 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007714int
7715main ()
7716{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007718test_array [0] = 0
7719
7720 ;
7721 return 0;
7722}
7723_ACEOF
7724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007725if { (ac_try="$ac_compile"
7726case "(($ac_try" in
7727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7728 *) ac_try_echo=$ac_try;;
7729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007733 grep -v '^ *+' conftest.er1 >conftest.err
7734 rm -f conftest.er1
7735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007737 (exit $ac_status); } && {
7738 test -z "$ac_c_werror_flag" ||
7739 test ! -s conftest.err
7740 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_lo=$ac_mid; break
7742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007744sed 's/^/| /' conftest.$ac_ext >&5
7745
Martin v. Löwiseba40652007-08-30 20:10:57 +00007746 ac_hi=`expr '(' $ac_mid ')' - 1`
7747 if test $ac_mid -le $ac_hi; then
7748 ac_lo= ac_hi=
7749 break
7750 fi
7751 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007753
7754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007755 done
7756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007758sed 's/^/| /' conftest.$ac_ext >&5
7759
Martin v. Löwiseba40652007-08-30 20:10:57 +00007760 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762
7763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765
7766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007767# Binary search between lo and hi bounds.
7768while test "x$ac_lo" != "x$ac_hi"; do
7769 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007771/* confdefs.h. */
7772_ACEOF
7773cat confdefs.h >>conftest.$ac_ext
7774cat >>conftest.$ac_ext <<_ACEOF
7775/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007776$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007777 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007778int
7779main ()
7780{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007781static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007782test_array [0] = 0
7783
7784 ;
7785 return 0;
7786}
7787_ACEOF
7788rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007789if { (ac_try="$ac_compile"
7790case "(($ac_try" in
7791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7792 *) ac_try_echo=$ac_try;;
7793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007795 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007797 grep -v '^ *+' conftest.er1 >conftest.err
7798 rm -f conftest.er1
7799 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007801 (exit $ac_status); } && {
7802 test -z "$ac_c_werror_flag" ||
7803 test ! -s conftest.err
7804 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 ac_hi=$ac_mid
7806else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007808sed 's/^/| /' conftest.$ac_ext >&5
7809
Martin v. Löwiseba40652007-08-30 20:10:57 +00007810 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812
7813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007814done
7815case $ac_lo in
7816?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007817'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007818 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007819See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007820echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007821See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007822 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007823 else
7824 ac_cv_sizeof_int=0
7825 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007826esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007827else
Martin v. Löwis11437992002-04-12 09:54:03 +00007828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007829/* confdefs.h. */
7830_ACEOF
7831cat confdefs.h >>conftest.$ac_ext
7832cat >>conftest.$ac_ext <<_ACEOF
7833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007834$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007835 typedef int ac__type_sizeof_;
7836static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7837static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007838#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007839#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007840int
7841main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007842{
Martin v. Löwis11437992002-04-12 09:54:03 +00007843
7844 FILE *f = fopen ("conftest.val", "w");
7845 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007846 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007847 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007849 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007850 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007851 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007852 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 }
7854 else
7855 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007857 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007858 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007859 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007860 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007861 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007862
7863 ;
7864 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007865}
Martin v. Löwis11437992002-04-12 09:54:03 +00007866_ACEOF
7867rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007868if { (ac_try="$ac_link"
7869case "(($ac_try" in
7870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7871 *) ac_try_echo=$ac_try;;
7872esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007874 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00007878 { (case "(($ac_try" in
7879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7880 *) ac_try_echo=$ac_try;;
7881esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007883 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007884 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007886 (exit $ac_status); }; }; then
7887 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007888else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007889 echo "$as_me: program exited with status $ac_status" >&5
7890echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007891sed 's/^/| /' conftest.$ac_ext >&5
7892
Martin v. Löwis11437992002-04-12 09:54:03 +00007893( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00007894if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007895 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007896See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007897echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007898See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007899 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007900 else
7901 ac_cv_sizeof_int=0
7902 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904rm -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 +00007905fi
7906rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007907fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007908{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
7909echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910
7911
7912
Martin v. Löwis11437992002-04-12 09:54:03 +00007913cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007914#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007915_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007916
7917
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007918{ echo "$as_me:$LINENO: checking for long" >&5
7919echo $ECHO_N "checking for long... $ECHO_C" >&6; }
7920if test "${ac_cv_type_long+set}" = set; then
7921 echo $ECHO_N "(cached) $ECHO_C" >&6
7922else
7923 cat >conftest.$ac_ext <<_ACEOF
7924/* confdefs.h. */
7925_ACEOF
7926cat confdefs.h >>conftest.$ac_ext
7927cat >>conftest.$ac_ext <<_ACEOF
7928/* end confdefs.h. */
7929$ac_includes_default
7930typedef long ac__type_new_;
7931int
7932main ()
7933{
7934if ((ac__type_new_ *) 0)
7935 return 0;
7936if (sizeof (ac__type_new_))
7937 return 0;
7938 ;
7939 return 0;
7940}
7941_ACEOF
7942rm -f conftest.$ac_objext
7943if { (ac_try="$ac_compile"
7944case "(($ac_try" in
7945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7946 *) ac_try_echo=$ac_try;;
7947esac
7948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7949 (eval "$ac_compile") 2>conftest.er1
7950 ac_status=$?
7951 grep -v '^ *+' conftest.er1 >conftest.err
7952 rm -f conftest.er1
7953 cat conftest.err >&5
7954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7955 (exit $ac_status); } && {
7956 test -z "$ac_c_werror_flag" ||
7957 test ! -s conftest.err
7958 } && test -s conftest.$ac_objext; then
7959 ac_cv_type_long=yes
7960else
7961 echo "$as_me: failed program was:" >&5
7962sed 's/^/| /' conftest.$ac_ext >&5
7963
7964 ac_cv_type_long=no
7965fi
7966
7967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7968fi
7969{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
7970echo "${ECHO_T}$ac_cv_type_long" >&6; }
7971
Martin v. Löwiseba40652007-08-30 20:10:57 +00007972# The cast to long int works around a bug in the HP C Compiler
7973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7975# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007976{ echo "$as_me:$LINENO: checking size of long" >&5
7977echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007978if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007979 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007980else
Martin v. Löwis11437992002-04-12 09:54:03 +00007981 if test "$cross_compiling" = yes; then
7982 # Depending upon the size, compute the lo and hi bounds.
7983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007984/* confdefs.h. */
7985_ACEOF
7986cat confdefs.h >>conftest.$ac_ext
7987cat >>conftest.$ac_ext <<_ACEOF
7988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007989$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007990 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007991int
7992main ()
7993{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007994static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007995test_array [0] = 0
7996
7997 ;
7998 return 0;
7999}
8000_ACEOF
8001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002if { (ac_try="$ac_compile"
8003case "(($ac_try" in
8004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8005 *) ac_try_echo=$ac_try;;
8006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008010 grep -v '^ *+' conftest.er1 >conftest.err
8011 rm -f conftest.er1
8012 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008014 (exit $ac_status); } && {
8015 test -z "$ac_c_werror_flag" ||
8016 test ! -s conftest.err
8017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008018 ac_lo=0 ac_mid=0
8019 while :; do
8020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008021/* confdefs.h. */
8022_ACEOF
8023cat confdefs.h >>conftest.$ac_ext
8024cat >>conftest.$ac_ext <<_ACEOF
8025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008026$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008027 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008028int
8029main ()
8030{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008031static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008032test_array [0] = 0
8033
8034 ;
8035 return 0;
8036}
8037_ACEOF
8038rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008039if { (ac_try="$ac_compile"
8040case "(($ac_try" in
8041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8042 *) ac_try_echo=$ac_try;;
8043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008047 grep -v '^ *+' conftest.er1 >conftest.err
8048 rm -f conftest.er1
8049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008051 (exit $ac_status); } && {
8052 test -z "$ac_c_werror_flag" ||
8053 test ! -s conftest.err
8054 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 ac_hi=$ac_mid; break
8056else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008057 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008058sed 's/^/| /' conftest.$ac_ext >&5
8059
Martin v. Löwiseba40652007-08-30 20:10:57 +00008060 ac_lo=`expr $ac_mid + 1`
8061 if test $ac_lo -le $ac_mid; then
8062 ac_lo= ac_hi=
8063 break
8064 fi
8065 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008066fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008067
8068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 done
8070else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008071 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008072sed 's/^/| /' conftest.$ac_ext >&5
8073
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008075/* confdefs.h. */
8076_ACEOF
8077cat confdefs.h >>conftest.$ac_ext
8078cat >>conftest.$ac_ext <<_ACEOF
8079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008080$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008081 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008082int
8083main ()
8084{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008085static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008086test_array [0] = 0
8087
8088 ;
8089 return 0;
8090}
8091_ACEOF
8092rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008093if { (ac_try="$ac_compile"
8094case "(($ac_try" in
8095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8096 *) ac_try_echo=$ac_try;;
8097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008101 grep -v '^ *+' conftest.er1 >conftest.err
8102 rm -f conftest.er1
8103 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105 (exit $ac_status); } && {
8106 test -z "$ac_c_werror_flag" ||
8107 test ! -s conftest.err
8108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008109 ac_hi=-1 ac_mid=-1
8110 while :; do
8111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008112/* confdefs.h. */
8113_ACEOF
8114cat confdefs.h >>conftest.$ac_ext
8115cat >>conftest.$ac_ext <<_ACEOF
8116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008117$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008118 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008119int
8120main ()
8121{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008122static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008123test_array [0] = 0
8124
8125 ;
8126 return 0;
8127}
8128_ACEOF
8129rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008130if { (ac_try="$ac_compile"
8131case "(($ac_try" in
8132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8133 *) ac_try_echo=$ac_try;;
8134esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008138 grep -v '^ *+' conftest.er1 >conftest.err
8139 rm -f conftest.er1
8140 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008142 (exit $ac_status); } && {
8143 test -z "$ac_c_werror_flag" ||
8144 test ! -s conftest.err
8145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_lo=$ac_mid; break
8147else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008149sed 's/^/| /' conftest.$ac_ext >&5
8150
Martin v. Löwiseba40652007-08-30 20:10:57 +00008151 ac_hi=`expr '(' $ac_mid ')' - 1`
8152 if test $ac_mid -le $ac_hi; then
8153 ac_lo= ac_hi=
8154 break
8155 fi
8156 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008158
8159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 done
8161else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167
8168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008169fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008170
8171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008172# Binary search between lo and hi bounds.
8173while test "x$ac_lo" != "x$ac_hi"; do
8174 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008176/* confdefs.h. */
8177_ACEOF
8178cat confdefs.h >>conftest.$ac_ext
8179cat >>conftest.$ac_ext <<_ACEOF
8180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008181$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008182 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008183int
8184main ()
8185{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008186static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008187test_array [0] = 0
8188
8189 ;
8190 return 0;
8191}
8192_ACEOF
8193rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008194if { (ac_try="$ac_compile"
8195case "(($ac_try" in
8196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8197 *) ac_try_echo=$ac_try;;
8198esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008202 grep -v '^ *+' conftest.er1 >conftest.err
8203 rm -f conftest.er1
8204 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008206 (exit $ac_status); } && {
8207 test -z "$ac_c_werror_flag" ||
8208 test ! -s conftest.err
8209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008210 ac_hi=$ac_mid
8211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008213sed 's/^/| /' conftest.$ac_ext >&5
8214
Martin v. Löwiseba40652007-08-30 20:10:57 +00008215 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008217
8218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008219done
8220case $ac_lo in
8221?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008222'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008223 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008224See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008225echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008226See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008227 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008228 else
8229 ac_cv_sizeof_long=0
8230 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008231esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008232else
Martin v. Löwis11437992002-04-12 09:54:03 +00008233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* confdefs.h. */
8235_ACEOF
8236cat confdefs.h >>conftest.$ac_ext
8237cat >>conftest.$ac_ext <<_ACEOF
8238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008239$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008240 typedef long ac__type_sizeof_;
8241static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8242static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008243#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008244#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008245int
8246main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008247{
Martin v. Löwis11437992002-04-12 09:54:03 +00008248
8249 FILE *f = fopen ("conftest.val", "w");
8250 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008251 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008252 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008254 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008255 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008256 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008257 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 }
8259 else
8260 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008261 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008262 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008263 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008264 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008265 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008266 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008267
8268 ;
8269 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008270}
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
8272rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008273if { (ac_try="$ac_link"
8274case "(($ac_try" in
8275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8276 *) ac_try_echo=$ac_try;;
8277esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008279 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008282 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283 { (case "(($ac_try" in
8284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8285 *) ac_try_echo=$ac_try;;
8286esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008288 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 (exit $ac_status); }; }; then
8292 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008294 echo "$as_me: program exited with status $ac_status" >&5
8295echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008296sed 's/^/| /' conftest.$ac_ext >&5
8297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008299if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008300 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008301See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008302echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008303See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008304 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008305 else
8306 ac_cv_sizeof_long=0
8307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008309rm -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 +00008310fi
8311rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008312fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008313{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8314echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008315
8316
8317
Martin v. Löwis11437992002-04-12 09:54:03 +00008318cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008319#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008320_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008321
8322
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008323{ echo "$as_me:$LINENO: checking for void *" >&5
8324echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8325if test "${ac_cv_type_void_p+set}" = set; then
8326 echo $ECHO_N "(cached) $ECHO_C" >&6
8327else
8328 cat >conftest.$ac_ext <<_ACEOF
8329/* confdefs.h. */
8330_ACEOF
8331cat confdefs.h >>conftest.$ac_ext
8332cat >>conftest.$ac_ext <<_ACEOF
8333/* end confdefs.h. */
8334$ac_includes_default
8335typedef void * ac__type_new_;
8336int
8337main ()
8338{
8339if ((ac__type_new_ *) 0)
8340 return 0;
8341if (sizeof (ac__type_new_))
8342 return 0;
8343 ;
8344 return 0;
8345}
8346_ACEOF
8347rm -f conftest.$ac_objext
8348if { (ac_try="$ac_compile"
8349case "(($ac_try" in
8350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8351 *) ac_try_echo=$ac_try;;
8352esac
8353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8354 (eval "$ac_compile") 2>conftest.er1
8355 ac_status=$?
8356 grep -v '^ *+' conftest.er1 >conftest.err
8357 rm -f conftest.er1
8358 cat conftest.err >&5
8359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8360 (exit $ac_status); } && {
8361 test -z "$ac_c_werror_flag" ||
8362 test ! -s conftest.err
8363 } && test -s conftest.$ac_objext; then
8364 ac_cv_type_void_p=yes
8365else
8366 echo "$as_me: failed program was:" >&5
8367sed 's/^/| /' conftest.$ac_ext >&5
8368
8369 ac_cv_type_void_p=no
8370fi
8371
8372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8373fi
8374{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8375echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8376
Martin v. Löwiseba40652007-08-30 20:10:57 +00008377# The cast to long int works around a bug in the HP C Compiler
8378# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8379# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8380# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008381{ echo "$as_me:$LINENO: checking size of void *" >&5
8382echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008383if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008385else
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 if test "$cross_compiling" = yes; then
8387 # Depending upon the size, compute the lo and hi bounds.
8388cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008389/* confdefs.h. */
8390_ACEOF
8391cat confdefs.h >>conftest.$ac_ext
8392cat >>conftest.$ac_ext <<_ACEOF
8393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008394$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008395 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008396int
8397main ()
8398{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008399static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008400test_array [0] = 0
8401
8402 ;
8403 return 0;
8404}
8405_ACEOF
8406rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008407if { (ac_try="$ac_compile"
8408case "(($ac_try" in
8409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8410 *) ac_try_echo=$ac_try;;
8411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008415 grep -v '^ *+' conftest.er1 >conftest.err
8416 rm -f conftest.er1
8417 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008419 (exit $ac_status); } && {
8420 test -z "$ac_c_werror_flag" ||
8421 test ! -s conftest.err
8422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_lo=0 ac_mid=0
8424 while :; do
8425 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008426/* confdefs.h. */
8427_ACEOF
8428cat confdefs.h >>conftest.$ac_ext
8429cat >>conftest.$ac_ext <<_ACEOF
8430/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008431$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008432 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008433int
8434main ()
8435{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008436static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008437test_array [0] = 0
8438
8439 ;
8440 return 0;
8441}
8442_ACEOF
8443rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008444if { (ac_try="$ac_compile"
8445case "(($ac_try" in
8446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8447 *) ac_try_echo=$ac_try;;
8448esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008452 grep -v '^ *+' conftest.er1 >conftest.err
8453 rm -f conftest.er1
8454 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008456 (exit $ac_status); } && {
8457 test -z "$ac_c_werror_flag" ||
8458 test ! -s conftest.err
8459 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008460 ac_hi=$ac_mid; break
8461else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008463sed 's/^/| /' conftest.$ac_ext >&5
8464
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465 ac_lo=`expr $ac_mid + 1`
8466 if test $ac_lo -le $ac_mid; then
8467 ac_lo= ac_hi=
8468 break
8469 fi
8470 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008471fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472
8473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008474 done
8475else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008477sed 's/^/| /' conftest.$ac_ext >&5
8478
Martin v. Löwiseba40652007-08-30 20:10:57 +00008479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008480/* confdefs.h. */
8481_ACEOF
8482cat confdefs.h >>conftest.$ac_ext
8483cat >>conftest.$ac_ext <<_ACEOF
8484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008485$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008486 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008487int
8488main ()
8489{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008490static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008491test_array [0] = 0
8492
8493 ;
8494 return 0;
8495}
8496_ACEOF
8497rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008498if { (ac_try="$ac_compile"
8499case "(($ac_try" in
8500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8501 *) ac_try_echo=$ac_try;;
8502esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008506 grep -v '^ *+' conftest.er1 >conftest.err
8507 rm -f conftest.er1
8508 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008510 (exit $ac_status); } && {
8511 test -z "$ac_c_werror_flag" ||
8512 test ! -s conftest.err
8513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 ac_hi=-1 ac_mid=-1
8515 while :; do
8516 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008517/* confdefs.h. */
8518_ACEOF
8519cat confdefs.h >>conftest.$ac_ext
8520cat >>conftest.$ac_ext <<_ACEOF
8521/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008522$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008523 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008524int
8525main ()
8526{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008527static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008528test_array [0] = 0
8529
8530 ;
8531 return 0;
8532}
8533_ACEOF
8534rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008535if { (ac_try="$ac_compile"
8536case "(($ac_try" in
8537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8538 *) ac_try_echo=$ac_try;;
8539esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008541 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008543 grep -v '^ *+' conftest.er1 >conftest.err
8544 rm -f conftest.er1
8545 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008547 (exit $ac_status); } && {
8548 test -z "$ac_c_werror_flag" ||
8549 test ! -s conftest.err
8550 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008551 ac_lo=$ac_mid; break
8552else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008554sed 's/^/| /' conftest.$ac_ext >&5
8555
Martin v. Löwiseba40652007-08-30 20:10:57 +00008556 ac_hi=`expr '(' $ac_mid ')' - 1`
8557 if test $ac_mid -le $ac_hi; then
8558 ac_lo= ac_hi=
8559 break
8560 fi
8561 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008563
8564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008565 done
8566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008568sed 's/^/| /' conftest.$ac_ext >&5
8569
Martin v. Löwiseba40652007-08-30 20:10:57 +00008570 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008572
8573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008575
8576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008577# Binary search between lo and hi bounds.
8578while test "x$ac_lo" != "x$ac_hi"; do
8579 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8580 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008581/* confdefs.h. */
8582_ACEOF
8583cat confdefs.h >>conftest.$ac_ext
8584cat >>conftest.$ac_ext <<_ACEOF
8585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008586$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008587 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
8590{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008591static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008592test_array [0] = 0
8593
8594 ;
8595 return 0;
8596}
8597_ACEOF
8598rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008599if { (ac_try="$ac_compile"
8600case "(($ac_try" in
8601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8602 *) ac_try_echo=$ac_try;;
8603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008605 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008607 grep -v '^ *+' conftest.er1 >conftest.err
8608 rm -f conftest.er1
8609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008611 (exit $ac_status); } && {
8612 test -z "$ac_c_werror_flag" ||
8613 test ! -s conftest.err
8614 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 ac_hi=$ac_mid
8616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008617 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008618sed 's/^/| /' conftest.$ac_ext >&5
8619
Martin v. Löwiseba40652007-08-30 20:10:57 +00008620 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008622
8623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008624done
8625case $ac_lo in
8626?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008627'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008628 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008629See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008630echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008631See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008632 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008633 else
8634 ac_cv_sizeof_void_p=0
8635 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008636esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008637else
Martin v. Löwis11437992002-04-12 09:54:03 +00008638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008639/* confdefs.h. */
8640_ACEOF
8641cat confdefs.h >>conftest.$ac_ext
8642cat >>conftest.$ac_ext <<_ACEOF
8643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008644$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008645 typedef void * ac__type_sizeof_;
8646static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8647static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008648#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008649#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008650int
8651main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008652{
Martin v. Löwis11437992002-04-12 09:54:03 +00008653
8654 FILE *f = fopen ("conftest.val", "w");
8655 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008657 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008659 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008660 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008661 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008662 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 }
8664 else
8665 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008667 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008668 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008669 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008671 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008672
8673 ;
8674 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008675}
Martin v. Löwis11437992002-04-12 09:54:03 +00008676_ACEOF
8677rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008678if { (ac_try="$ac_link"
8679case "(($ac_try" in
8680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8681 *) ac_try_echo=$ac_try;;
8682esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008684 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008685 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688 { (case "(($ac_try" in
8689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8690 *) ac_try_echo=$ac_try;;
8691esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008693 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008694 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 (exit $ac_status); }; }; then
8697 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008698else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008699 echo "$as_me: program exited with status $ac_status" >&5
8700echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008701sed 's/^/| /' conftest.$ac_ext >&5
8702
Martin v. Löwis11437992002-04-12 09:54:03 +00008703( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008704if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008705 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008706See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008707echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008708See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008709 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008710 else
8711 ac_cv_sizeof_void_p=0
8712 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008714rm -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 +00008715fi
8716rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008717fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008718{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8719echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008720
8721
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008724#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008725_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008726
8727
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008728{ echo "$as_me:$LINENO: checking for short" >&5
8729echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8730if test "${ac_cv_type_short+set}" = set; then
8731 echo $ECHO_N "(cached) $ECHO_C" >&6
8732else
8733 cat >conftest.$ac_ext <<_ACEOF
8734/* confdefs.h. */
8735_ACEOF
8736cat confdefs.h >>conftest.$ac_ext
8737cat >>conftest.$ac_ext <<_ACEOF
8738/* end confdefs.h. */
8739$ac_includes_default
8740typedef short ac__type_new_;
8741int
8742main ()
8743{
8744if ((ac__type_new_ *) 0)
8745 return 0;
8746if (sizeof (ac__type_new_))
8747 return 0;
8748 ;
8749 return 0;
8750}
8751_ACEOF
8752rm -f conftest.$ac_objext
8753if { (ac_try="$ac_compile"
8754case "(($ac_try" in
8755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8756 *) ac_try_echo=$ac_try;;
8757esac
8758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8759 (eval "$ac_compile") 2>conftest.er1
8760 ac_status=$?
8761 grep -v '^ *+' conftest.er1 >conftest.err
8762 rm -f conftest.er1
8763 cat conftest.err >&5
8764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8765 (exit $ac_status); } && {
8766 test -z "$ac_c_werror_flag" ||
8767 test ! -s conftest.err
8768 } && test -s conftest.$ac_objext; then
8769 ac_cv_type_short=yes
8770else
8771 echo "$as_me: failed program was:" >&5
8772sed 's/^/| /' conftest.$ac_ext >&5
8773
8774 ac_cv_type_short=no
8775fi
8776
8777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8778fi
8779{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8780echo "${ECHO_T}$ac_cv_type_short" >&6; }
8781
Martin v. Löwiseba40652007-08-30 20:10:57 +00008782# The cast to long int works around a bug in the HP C Compiler
8783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8785# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008786{ echo "$as_me:$LINENO: checking size of short" >&5
8787echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008788if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008789 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008790else
Martin v. Löwis11437992002-04-12 09:54:03 +00008791 if test "$cross_compiling" = yes; then
8792 # Depending upon the size, compute the lo and hi bounds.
8793cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008794/* confdefs.h. */
8795_ACEOF
8796cat confdefs.h >>conftest.$ac_ext
8797cat >>conftest.$ac_ext <<_ACEOF
8798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008799$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008800 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008801int
8802main ()
8803{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008804static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008805test_array [0] = 0
8806
8807 ;
8808 return 0;
8809}
8810_ACEOF
8811rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008812if { (ac_try="$ac_compile"
8813case "(($ac_try" in
8814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8815 *) ac_try_echo=$ac_try;;
8816esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008820 grep -v '^ *+' conftest.er1 >conftest.err
8821 rm -f conftest.er1
8822 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008824 (exit $ac_status); } && {
8825 test -z "$ac_c_werror_flag" ||
8826 test ! -s conftest.err
8827 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008828 ac_lo=0 ac_mid=0
8829 while :; do
8830 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008831/* confdefs.h. */
8832_ACEOF
8833cat confdefs.h >>conftest.$ac_ext
8834cat >>conftest.$ac_ext <<_ACEOF
8835/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008836$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008837 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008838int
8839main ()
8840{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008842test_array [0] = 0
8843
8844 ;
8845 return 0;
8846}
8847_ACEOF
8848rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008849if { (ac_try="$ac_compile"
8850case "(($ac_try" in
8851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8852 *) ac_try_echo=$ac_try;;
8853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008855 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008857 grep -v '^ *+' conftest.er1 >conftest.err
8858 rm -f conftest.er1
8859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008861 (exit $ac_status); } && {
8862 test -z "$ac_c_werror_flag" ||
8863 test ! -s conftest.err
8864 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008865 ac_hi=$ac_mid; break
8866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008868sed 's/^/| /' conftest.$ac_ext >&5
8869
Martin v. Löwiseba40652007-08-30 20:10:57 +00008870 ac_lo=`expr $ac_mid + 1`
8871 if test $ac_lo -le $ac_mid; then
8872 ac_lo= ac_hi=
8873 break
8874 fi
8875 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008877
8878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 done
8880else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008881 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008882sed 's/^/| /' conftest.$ac_ext >&5
8883
Martin v. Löwiseba40652007-08-30 20:10:57 +00008884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008885/* confdefs.h. */
8886_ACEOF
8887cat confdefs.h >>conftest.$ac_ext
8888cat >>conftest.$ac_ext <<_ACEOF
8889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008890$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008891 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008892int
8893main ()
8894{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008895static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008896test_array [0] = 0
8897
8898 ;
8899 return 0;
8900}
8901_ACEOF
8902rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008903if { (ac_try="$ac_compile"
8904case "(($ac_try" in
8905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8906 *) ac_try_echo=$ac_try;;
8907esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008911 grep -v '^ *+' conftest.er1 >conftest.err
8912 rm -f conftest.er1
8913 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008915 (exit $ac_status); } && {
8916 test -z "$ac_c_werror_flag" ||
8917 test ! -s conftest.err
8918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ac_hi=-1 ac_mid=-1
8920 while :; do
8921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008922/* confdefs.h. */
8923_ACEOF
8924cat confdefs.h >>conftest.$ac_ext
8925cat >>conftest.$ac_ext <<_ACEOF
8926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008927$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008928 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008929int
8930main ()
8931{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008932static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008933test_array [0] = 0
8934
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008940if { (ac_try="$ac_compile"
8941case "(($ac_try" in
8942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8943 *) ac_try_echo=$ac_try;;
8944esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008948 grep -v '^ *+' conftest.er1 >conftest.err
8949 rm -f conftest.er1
8950 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008952 (exit $ac_status); } && {
8953 test -z "$ac_c_werror_flag" ||
8954 test ! -s conftest.err
8955 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_lo=$ac_mid; break
8957else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008958 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008959sed 's/^/| /' conftest.$ac_ext >&5
8960
Martin v. Löwiseba40652007-08-30 20:10:57 +00008961 ac_hi=`expr '(' $ac_mid ')' - 1`
8962 if test $ac_mid -le $ac_hi; then
8963 ac_lo= ac_hi=
8964 break
8965 fi
8966 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008968
8969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008970 done
8971else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008973sed 's/^/| /' conftest.$ac_ext >&5
8974
Martin v. Löwiseba40652007-08-30 20:10:57 +00008975 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008976fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008977
8978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008979fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008980
8981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008982# Binary search between lo and hi bounds.
8983while test "x$ac_lo" != "x$ac_hi"; do
8984 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008986/* confdefs.h. */
8987_ACEOF
8988cat confdefs.h >>conftest.$ac_ext
8989cat >>conftest.$ac_ext <<_ACEOF
8990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008991$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008992 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008993int
8994main ()
8995{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008996static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008997test_array [0] = 0
8998
8999 ;
9000 return 0;
9001}
9002_ACEOF
9003rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009004if { (ac_try="$ac_compile"
9005case "(($ac_try" in
9006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9007 *) ac_try_echo=$ac_try;;
9008esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009012 grep -v '^ *+' conftest.er1 >conftest.err
9013 rm -f conftest.er1
9014 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009016 (exit $ac_status); } && {
9017 test -z "$ac_c_werror_flag" ||
9018 test ! -s conftest.err
9019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009020 ac_hi=$ac_mid
9021else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009023sed 's/^/| /' conftest.$ac_ext >&5
9024
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009026fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027
9028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009029done
9030case $ac_lo in
9031?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009032'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009033 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009034See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009035echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009036See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009037 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009038 else
9039 ac_cv_sizeof_short=0
9040 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009041esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009042else
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009044/* confdefs.h. */
9045_ACEOF
9046cat confdefs.h >>conftest.$ac_ext
9047cat >>conftest.$ac_ext <<_ACEOF
9048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009049$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009050 typedef short ac__type_sizeof_;
9051static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9052static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009053#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009054#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009055int
9056main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009057{
Martin v. Löwis11437992002-04-12 09:54:03 +00009058
9059 FILE *f = fopen ("conftest.val", "w");
9060 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009061 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009062 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009064 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009065 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009066 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009067 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009068 }
9069 else
9070 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009072 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009073 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009074 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009076 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009077
9078 ;
9079 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009080}
Martin v. Löwis11437992002-04-12 09:54:03 +00009081_ACEOF
9082rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009083if { (ac_try="$ac_link"
9084case "(($ac_try" in
9085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9086 *) ac_try_echo=$ac_try;;
9087esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009089 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009090 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009092 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009093 { (case "(($ac_try" in
9094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9095 *) ac_try_echo=$ac_try;;
9096esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009098 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 (exit $ac_status); }; }; then
9102 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009103else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009104 echo "$as_me: program exited with status $ac_status" >&5
9105echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009106sed 's/^/| /' conftest.$ac_ext >&5
9107
Martin v. Löwis11437992002-04-12 09:54:03 +00009108( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009109if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009110 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009111See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009112echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009113See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009114 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009115 else
9116 ac_cv_sizeof_short=0
9117 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009119rm -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 +00009120fi
9121rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009122fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009123{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9124echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009125
9126
9127
Martin v. Löwis11437992002-04-12 09:54:03 +00009128cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009129#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009130_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009131
9132
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009133{ echo "$as_me:$LINENO: checking for float" >&5
9134echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9135if test "${ac_cv_type_float+set}" = set; then
9136 echo $ECHO_N "(cached) $ECHO_C" >&6
9137else
9138 cat >conftest.$ac_ext <<_ACEOF
9139/* confdefs.h. */
9140_ACEOF
9141cat confdefs.h >>conftest.$ac_ext
9142cat >>conftest.$ac_ext <<_ACEOF
9143/* end confdefs.h. */
9144$ac_includes_default
9145typedef float ac__type_new_;
9146int
9147main ()
9148{
9149if ((ac__type_new_ *) 0)
9150 return 0;
9151if (sizeof (ac__type_new_))
9152 return 0;
9153 ;
9154 return 0;
9155}
9156_ACEOF
9157rm -f conftest.$ac_objext
9158if { (ac_try="$ac_compile"
9159case "(($ac_try" in
9160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9161 *) ac_try_echo=$ac_try;;
9162esac
9163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9164 (eval "$ac_compile") 2>conftest.er1
9165 ac_status=$?
9166 grep -v '^ *+' conftest.er1 >conftest.err
9167 rm -f conftest.er1
9168 cat conftest.err >&5
9169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9170 (exit $ac_status); } && {
9171 test -z "$ac_c_werror_flag" ||
9172 test ! -s conftest.err
9173 } && test -s conftest.$ac_objext; then
9174 ac_cv_type_float=yes
9175else
9176 echo "$as_me: failed program was:" >&5
9177sed 's/^/| /' conftest.$ac_ext >&5
9178
9179 ac_cv_type_float=no
9180fi
9181
9182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9183fi
9184{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9185echo "${ECHO_T}$ac_cv_type_float" >&6; }
9186
Martin v. Löwiseba40652007-08-30 20:10:57 +00009187# The cast to long int works around a bug in the HP C Compiler
9188# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9189# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9190# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009191{ echo "$as_me:$LINENO: checking size of float" >&5
9192echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009193if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009194 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 if test "$cross_compiling" = yes; then
9197 # Depending upon the size, compute the lo and hi bounds.
9198cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* confdefs.h. */
9200_ACEOF
9201cat confdefs.h >>conftest.$ac_ext
9202cat >>conftest.$ac_ext <<_ACEOF
9203/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009205 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009206int
9207main ()
9208{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009209static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009210test_array [0] = 0
9211
9212 ;
9213 return 0;
9214}
9215_ACEOF
9216rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009217if { (ac_try="$ac_compile"
9218case "(($ac_try" in
9219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9220 *) ac_try_echo=$ac_try;;
9221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009223 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009225 grep -v '^ *+' conftest.er1 >conftest.err
9226 rm -f conftest.er1
9227 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009229 (exit $ac_status); } && {
9230 test -z "$ac_c_werror_flag" ||
9231 test ! -s conftest.err
9232 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 ac_lo=0 ac_mid=0
9234 while :; do
9235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009236/* confdefs.h. */
9237_ACEOF
9238cat confdefs.h >>conftest.$ac_ext
9239cat >>conftest.$ac_ext <<_ACEOF
9240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009241$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009242 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009243int
9244main ()
9245{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009246static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009247test_array [0] = 0
9248
9249 ;
9250 return 0;
9251}
9252_ACEOF
9253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009254if { (ac_try="$ac_compile"
9255case "(($ac_try" in
9256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9257 *) ac_try_echo=$ac_try;;
9258esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009261 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009262 grep -v '^ *+' conftest.er1 >conftest.err
9263 rm -f conftest.er1
9264 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009266 (exit $ac_status); } && {
9267 test -z "$ac_c_werror_flag" ||
9268 test ! -s conftest.err
9269 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 ac_hi=$ac_mid; break
9271else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009273sed 's/^/| /' conftest.$ac_ext >&5
9274
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 ac_lo=`expr $ac_mid + 1`
9276 if test $ac_lo -le $ac_mid; then
9277 ac_lo= ac_hi=
9278 break
9279 fi
9280 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009281fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009282
9283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 done
9285else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009286 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009287sed 's/^/| /' conftest.$ac_ext >&5
9288
Martin v. Löwiseba40652007-08-30 20:10:57 +00009289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009290/* confdefs.h. */
9291_ACEOF
9292cat confdefs.h >>conftest.$ac_ext
9293cat >>conftest.$ac_ext <<_ACEOF
9294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009295$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009296 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009297int
9298main ()
9299{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009300static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009301test_array [0] = 0
9302
9303 ;
9304 return 0;
9305}
9306_ACEOF
9307rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009308if { (ac_try="$ac_compile"
9309case "(($ac_try" in
9310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9311 *) ac_try_echo=$ac_try;;
9312esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009314 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009316 grep -v '^ *+' conftest.er1 >conftest.err
9317 rm -f conftest.er1
9318 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320 (exit $ac_status); } && {
9321 test -z "$ac_c_werror_flag" ||
9322 test ! -s conftest.err
9323 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009324 ac_hi=-1 ac_mid=-1
9325 while :; do
9326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* confdefs.h. */
9328_ACEOF
9329cat confdefs.h >>conftest.$ac_ext
9330cat >>conftest.$ac_ext <<_ACEOF
9331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009333 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009334int
9335main ()
9336{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009337static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009338test_array [0] = 0
9339
9340 ;
9341 return 0;
9342}
9343_ACEOF
9344rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009345if { (ac_try="$ac_compile"
9346case "(($ac_try" in
9347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9348 *) ac_try_echo=$ac_try;;
9349esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009351 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009352 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009353 grep -v '^ *+' conftest.er1 >conftest.err
9354 rm -f conftest.er1
9355 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009357 (exit $ac_status); } && {
9358 test -z "$ac_c_werror_flag" ||
9359 test ! -s conftest.err
9360 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009361 ac_lo=$ac_mid; break
9362else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009363 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009364sed 's/^/| /' conftest.$ac_ext >&5
9365
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 ac_hi=`expr '(' $ac_mid ')' - 1`
9367 if test $ac_mid -le $ac_hi; then
9368 ac_lo= ac_hi=
9369 break
9370 fi
9371 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009373
9374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 done
9376else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009378sed 's/^/| /' conftest.$ac_ext >&5
9379
Martin v. Löwiseba40652007-08-30 20:10:57 +00009380 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009382
9383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385
9386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009387# Binary search between lo and hi bounds.
9388while test "x$ac_lo" != "x$ac_hi"; do
9389 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9390 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009391/* confdefs.h. */
9392_ACEOF
9393cat confdefs.h >>conftest.$ac_ext
9394cat >>conftest.$ac_ext <<_ACEOF
9395/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009396$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009397 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009398int
9399main ()
9400{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009401static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009402test_array [0] = 0
9403
9404 ;
9405 return 0;
9406}
9407_ACEOF
9408rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009409if { (ac_try="$ac_compile"
9410case "(($ac_try" in
9411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9412 *) ac_try_echo=$ac_try;;
9413esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009417 grep -v '^ *+' conftest.er1 >conftest.err
9418 rm -f conftest.er1
9419 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009421 (exit $ac_status); } && {
9422 test -z "$ac_c_werror_flag" ||
9423 test ! -s conftest.err
9424 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009425 ac_hi=$ac_mid
9426else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009427 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009428sed 's/^/| /' conftest.$ac_ext >&5
9429
Martin v. Löwiseba40652007-08-30 20:10:57 +00009430 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009431fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009432
9433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009434done
9435case $ac_lo in
9436?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009437'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009438 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009439See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009440echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009441See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009442 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009443 else
9444 ac_cv_sizeof_float=0
9445 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009446esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009447else
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009449/* confdefs.h. */
9450_ACEOF
9451cat confdefs.h >>conftest.$ac_ext
9452cat >>conftest.$ac_ext <<_ACEOF
9453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009454$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009455 typedef float ac__type_sizeof_;
9456static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9457static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009458#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009459#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009460int
9461main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009462{
Martin v. Löwis11437992002-04-12 09:54:03 +00009463
9464 FILE *f = fopen ("conftest.val", "w");
9465 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009466 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009467 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009469 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009470 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009471 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009472 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 }
9474 else
9475 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009477 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009478 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009479 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009480 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009481 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009482
9483 ;
9484 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009485}
Martin v. Löwis11437992002-04-12 09:54:03 +00009486_ACEOF
9487rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488if { (ac_try="$ac_link"
9489case "(($ac_try" in
9490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9491 *) ac_try_echo=$ac_try;;
9492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009494 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009495 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009498 { (case "(($ac_try" in
9499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9500 *) ac_try_echo=$ac_try;;
9501esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009503 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009506 (exit $ac_status); }; }; then
9507 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009508else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009509 echo "$as_me: program exited with status $ac_status" >&5
9510echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009511sed 's/^/| /' conftest.$ac_ext >&5
9512
Martin v. Löwis11437992002-04-12 09:54:03 +00009513( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009514if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009515 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009516See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009517echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009518See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009519 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520 else
9521 ac_cv_sizeof_float=0
9522 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524rm -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 +00009525fi
9526rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009527fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009528{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9529echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009530
9531
9532
Martin v. Löwis11437992002-04-12 09:54:03 +00009533cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009534#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009535_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009536
9537
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009538{ echo "$as_me:$LINENO: checking for double" >&5
9539echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9540if test "${ac_cv_type_double+set}" = set; then
9541 echo $ECHO_N "(cached) $ECHO_C" >&6
9542else
9543 cat >conftest.$ac_ext <<_ACEOF
9544/* confdefs.h. */
9545_ACEOF
9546cat confdefs.h >>conftest.$ac_ext
9547cat >>conftest.$ac_ext <<_ACEOF
9548/* end confdefs.h. */
9549$ac_includes_default
9550typedef double ac__type_new_;
9551int
9552main ()
9553{
9554if ((ac__type_new_ *) 0)
9555 return 0;
9556if (sizeof (ac__type_new_))
9557 return 0;
9558 ;
9559 return 0;
9560}
9561_ACEOF
9562rm -f conftest.$ac_objext
9563if { (ac_try="$ac_compile"
9564case "(($ac_try" in
9565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9566 *) ac_try_echo=$ac_try;;
9567esac
9568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9569 (eval "$ac_compile") 2>conftest.er1
9570 ac_status=$?
9571 grep -v '^ *+' conftest.er1 >conftest.err
9572 rm -f conftest.er1
9573 cat conftest.err >&5
9574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9575 (exit $ac_status); } && {
9576 test -z "$ac_c_werror_flag" ||
9577 test ! -s conftest.err
9578 } && test -s conftest.$ac_objext; then
9579 ac_cv_type_double=yes
9580else
9581 echo "$as_me: failed program was:" >&5
9582sed 's/^/| /' conftest.$ac_ext >&5
9583
9584 ac_cv_type_double=no
9585fi
9586
9587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9588fi
9589{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9590echo "${ECHO_T}$ac_cv_type_double" >&6; }
9591
Martin v. Löwiseba40652007-08-30 20:10:57 +00009592# The cast to long int works around a bug in the HP C Compiler
9593# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9594# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9595# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009596{ echo "$as_me:$LINENO: checking size of double" >&5
9597echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009598if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009599 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009600else
Martin v. Löwis11437992002-04-12 09:54:03 +00009601 if test "$cross_compiling" = yes; then
9602 # Depending upon the size, compute the lo and hi bounds.
9603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009604/* confdefs.h. */
9605_ACEOF
9606cat confdefs.h >>conftest.$ac_ext
9607cat >>conftest.$ac_ext <<_ACEOF
9608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009609$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009610 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009611int
9612main ()
9613{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009614static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009615test_array [0] = 0
9616
9617 ;
9618 return 0;
9619}
9620_ACEOF
9621rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009622if { (ac_try="$ac_compile"
9623case "(($ac_try" in
9624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9625 *) ac_try_echo=$ac_try;;
9626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009630 grep -v '^ *+' conftest.er1 >conftest.err
9631 rm -f conftest.er1
9632 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009634 (exit $ac_status); } && {
9635 test -z "$ac_c_werror_flag" ||
9636 test ! -s conftest.err
9637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ac_lo=0 ac_mid=0
9639 while :; do
9640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009641/* confdefs.h. */
9642_ACEOF
9643cat confdefs.h >>conftest.$ac_ext
9644cat >>conftest.$ac_ext <<_ACEOF
9645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009646$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009647 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009648int
9649main ()
9650{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009651static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009652test_array [0] = 0
9653
9654 ;
9655 return 0;
9656}
9657_ACEOF
9658rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009659if { (ac_try="$ac_compile"
9660case "(($ac_try" in
9661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9662 *) ac_try_echo=$ac_try;;
9663esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009667 grep -v '^ *+' conftest.er1 >conftest.err
9668 rm -f conftest.er1
9669 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009671 (exit $ac_status); } && {
9672 test -z "$ac_c_werror_flag" ||
9673 test ! -s conftest.err
9674 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ac_hi=$ac_mid; break
9676else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009677 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009678sed 's/^/| /' conftest.$ac_ext >&5
9679
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 ac_lo=`expr $ac_mid + 1`
9681 if test $ac_lo -le $ac_mid; then
9682 ac_lo= ac_hi=
9683 break
9684 fi
9685 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009687
9688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 done
9690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009692sed 's/^/| /' conftest.$ac_ext >&5
9693
Martin v. Löwiseba40652007-08-30 20:10:57 +00009694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009695/* confdefs.h. */
9696_ACEOF
9697cat confdefs.h >>conftest.$ac_ext
9698cat >>conftest.$ac_ext <<_ACEOF
9699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009700$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009701 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009702int
9703main ()
9704{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009705static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009706test_array [0] = 0
9707
9708 ;
9709 return 0;
9710}
9711_ACEOF
9712rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009713if { (ac_try="$ac_compile"
9714case "(($ac_try" in
9715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9716 *) ac_try_echo=$ac_try;;
9717esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009719 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009721 grep -v '^ *+' conftest.er1 >conftest.err
9722 rm -f conftest.er1
9723 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009725 (exit $ac_status); } && {
9726 test -z "$ac_c_werror_flag" ||
9727 test ! -s conftest.err
9728 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_hi=-1 ac_mid=-1
9730 while :; do
9731 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009732/* confdefs.h. */
9733_ACEOF
9734cat confdefs.h >>conftest.$ac_ext
9735cat >>conftest.$ac_ext <<_ACEOF
9736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009738 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009739int
9740main ()
9741{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009742static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009743test_array [0] = 0
9744
9745 ;
9746 return 0;
9747}
9748_ACEOF
9749rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009750if { (ac_try="$ac_compile"
9751case "(($ac_try" in
9752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9753 *) ac_try_echo=$ac_try;;
9754esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009758 grep -v '^ *+' conftest.er1 >conftest.err
9759 rm -f conftest.er1
9760 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762 (exit $ac_status); } && {
9763 test -z "$ac_c_werror_flag" ||
9764 test ! -s conftest.err
9765 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009766 ac_lo=$ac_mid; break
9767else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009769sed 's/^/| /' conftest.$ac_ext >&5
9770
Martin v. Löwiseba40652007-08-30 20:10:57 +00009771 ac_hi=`expr '(' $ac_mid ')' - 1`
9772 if test $ac_mid -le $ac_hi; then
9773 ac_lo= ac_hi=
9774 break
9775 fi
9776 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009778
9779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 done
9781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009783sed 's/^/| /' conftest.$ac_ext >&5
9784
Martin v. Löwiseba40652007-08-30 20:10:57 +00009785 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009787
9788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009790
9791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009792# Binary search between lo and hi bounds.
9793while test "x$ac_lo" != "x$ac_hi"; do
9794 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9795 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009796/* confdefs.h. */
9797_ACEOF
9798cat confdefs.h >>conftest.$ac_ext
9799cat >>conftest.$ac_ext <<_ACEOF
9800/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009801$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009802 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009803int
9804main ()
9805{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009806static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009807test_array [0] = 0
9808
9809 ;
9810 return 0;
9811}
9812_ACEOF
9813rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009814if { (ac_try="$ac_compile"
9815case "(($ac_try" in
9816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9817 *) ac_try_echo=$ac_try;;
9818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009820 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009822 grep -v '^ *+' conftest.er1 >conftest.err
9823 rm -f conftest.er1
9824 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009826 (exit $ac_status); } && {
9827 test -z "$ac_c_werror_flag" ||
9828 test ! -s conftest.err
9829 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009830 ac_hi=$ac_mid
9831else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009832 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009833sed 's/^/| /' conftest.$ac_ext >&5
9834
Martin v. Löwiseba40652007-08-30 20:10:57 +00009835 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009836fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009837
9838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009839done
9840case $ac_lo in
9841?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009842'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009843 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009844See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009845echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009846See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009847 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009848 else
9849 ac_cv_sizeof_double=0
9850 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009851esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009852else
Martin v. Löwis11437992002-04-12 09:54:03 +00009853 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009854/* confdefs.h. */
9855_ACEOF
9856cat confdefs.h >>conftest.$ac_ext
9857cat >>conftest.$ac_ext <<_ACEOF
9858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009859$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009860 typedef double ac__type_sizeof_;
9861static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9862static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009863#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009864#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009865int
9866main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009867{
Martin v. Löwis11437992002-04-12 09:54:03 +00009868
9869 FILE *f = fopen ("conftest.val", "w");
9870 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009871 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009872 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009874 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009875 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009877 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 }
9879 else
9880 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009882 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009884 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009885 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009886 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009887
9888 ;
9889 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009890}
Martin v. Löwis11437992002-04-12 09:54:03 +00009891_ACEOF
9892rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009893if { (ac_try="$ac_link"
9894case "(($ac_try" in
9895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9896 *) ac_try_echo=$ac_try;;
9897esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009902 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903 { (case "(($ac_try" in
9904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9905 *) ac_try_echo=$ac_try;;
9906esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009911 (exit $ac_status); }; }; then
9912 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009913else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009914 echo "$as_me: program exited with status $ac_status" >&5
9915echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009916sed 's/^/| /' conftest.$ac_ext >&5
9917
Martin v. Löwis11437992002-04-12 09:54:03 +00009918( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009919if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009920 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009921See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009922echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009923See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009924 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009925 else
9926 ac_cv_sizeof_double=0
9927 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009929rm -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 +00009930fi
9931rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009933{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9934echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009935
9936
9937
Martin v. Löwis11437992002-04-12 09:54:03 +00009938cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009939#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009940_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009941
9942
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009943{ echo "$as_me:$LINENO: checking for fpos_t" >&5
9944echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
9945if test "${ac_cv_type_fpos_t+set}" = set; then
9946 echo $ECHO_N "(cached) $ECHO_C" >&6
9947else
9948 cat >conftest.$ac_ext <<_ACEOF
9949/* confdefs.h. */
9950_ACEOF
9951cat confdefs.h >>conftest.$ac_ext
9952cat >>conftest.$ac_ext <<_ACEOF
9953/* end confdefs.h. */
9954$ac_includes_default
9955typedef fpos_t ac__type_new_;
9956int
9957main ()
9958{
9959if ((ac__type_new_ *) 0)
9960 return 0;
9961if (sizeof (ac__type_new_))
9962 return 0;
9963 ;
9964 return 0;
9965}
9966_ACEOF
9967rm -f conftest.$ac_objext
9968if { (ac_try="$ac_compile"
9969case "(($ac_try" in
9970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9971 *) ac_try_echo=$ac_try;;
9972esac
9973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9974 (eval "$ac_compile") 2>conftest.er1
9975 ac_status=$?
9976 grep -v '^ *+' conftest.er1 >conftest.err
9977 rm -f conftest.er1
9978 cat conftest.err >&5
9979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9980 (exit $ac_status); } && {
9981 test -z "$ac_c_werror_flag" ||
9982 test ! -s conftest.err
9983 } && test -s conftest.$ac_objext; then
9984 ac_cv_type_fpos_t=yes
9985else
9986 echo "$as_me: failed program was:" >&5
9987sed 's/^/| /' conftest.$ac_ext >&5
9988
9989 ac_cv_type_fpos_t=no
9990fi
9991
9992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9993fi
9994{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
9995echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
9996
Martin v. Löwiseba40652007-08-30 20:10:57 +00009997# The cast to long int works around a bug in the HP C Compiler
9998# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9999# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10000# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010001{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10002echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010003if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010004 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010005else
Martin v. Löwis11437992002-04-12 09:54:03 +000010006 if test "$cross_compiling" = yes; then
10007 # Depending upon the size, compute the lo and hi bounds.
10008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010009/* confdefs.h. */
10010_ACEOF
10011cat confdefs.h >>conftest.$ac_ext
10012cat >>conftest.$ac_ext <<_ACEOF
10013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010014$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010015 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010016int
10017main ()
10018{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010019static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010020test_array [0] = 0
10021
10022 ;
10023 return 0;
10024}
10025_ACEOF
10026rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010027if { (ac_try="$ac_compile"
10028case "(($ac_try" in
10029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10030 *) ac_try_echo=$ac_try;;
10031esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010033 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010035 grep -v '^ *+' conftest.er1 >conftest.err
10036 rm -f conftest.er1
10037 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010039 (exit $ac_status); } && {
10040 test -z "$ac_c_werror_flag" ||
10041 test ! -s conftest.err
10042 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010043 ac_lo=0 ac_mid=0
10044 while :; do
10045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* confdefs.h. */
10047_ACEOF
10048cat confdefs.h >>conftest.$ac_ext
10049cat >>conftest.$ac_ext <<_ACEOF
10050/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010051$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010052 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010053int
10054main ()
10055{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010056static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010057test_array [0] = 0
10058
10059 ;
10060 return 0;
10061}
10062_ACEOF
10063rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010064if { (ac_try="$ac_compile"
10065case "(($ac_try" in
10066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10067 *) ac_try_echo=$ac_try;;
10068esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010070 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010072 grep -v '^ *+' conftest.er1 >conftest.err
10073 rm -f conftest.er1
10074 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010076 (exit $ac_status); } && {
10077 test -z "$ac_c_werror_flag" ||
10078 test ! -s conftest.err
10079 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 ac_hi=$ac_mid; break
10081else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010083sed 's/^/| /' conftest.$ac_ext >&5
10084
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085 ac_lo=`expr $ac_mid + 1`
10086 if test $ac_lo -le $ac_mid; then
10087 ac_lo= ac_hi=
10088 break
10089 fi
10090 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010092
10093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010094 done
10095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010097sed 's/^/| /' conftest.$ac_ext >&5
10098
Martin v. Löwiseba40652007-08-30 20:10:57 +000010099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010100/* confdefs.h. */
10101_ACEOF
10102cat confdefs.h >>conftest.$ac_ext
10103cat >>conftest.$ac_ext <<_ACEOF
10104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010105$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010106 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010107int
10108main ()
10109{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010110static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010111test_array [0] = 0
10112
10113 ;
10114 return 0;
10115}
10116_ACEOF
10117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010118if { (ac_try="$ac_compile"
10119case "(($ac_try" in
10120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10121 *) ac_try_echo=$ac_try;;
10122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010124 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010126 grep -v '^ *+' conftest.er1 >conftest.err
10127 rm -f conftest.er1
10128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010130 (exit $ac_status); } && {
10131 test -z "$ac_c_werror_flag" ||
10132 test ! -s conftest.err
10133 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 ac_hi=-1 ac_mid=-1
10135 while :; do
10136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010137/* confdefs.h. */
10138_ACEOF
10139cat confdefs.h >>conftest.$ac_ext
10140cat >>conftest.$ac_ext <<_ACEOF
10141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010142$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010143 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010144int
10145main ()
10146{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010147static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010148test_array [0] = 0
10149
10150 ;
10151 return 0;
10152}
10153_ACEOF
10154rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010155if { (ac_try="$ac_compile"
10156case "(($ac_try" in
10157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10158 *) ac_try_echo=$ac_try;;
10159esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010163 grep -v '^ *+' conftest.er1 >conftest.err
10164 rm -f conftest.er1
10165 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010167 (exit $ac_status); } && {
10168 test -z "$ac_c_werror_flag" ||
10169 test ! -s conftest.err
10170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_lo=$ac_mid; break
10172else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010173 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010174sed 's/^/| /' conftest.$ac_ext >&5
10175
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 ac_hi=`expr '(' $ac_mid ')' - 1`
10177 if test $ac_mid -le $ac_hi; then
10178 ac_lo= ac_hi=
10179 break
10180 fi
10181 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010183
10184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 done
10186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010188sed 's/^/| /' conftest.$ac_ext >&5
10189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192
10193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010194fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010195
10196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010197# Binary search between lo and hi bounds.
10198while test "x$ac_lo" != "x$ac_hi"; do
10199 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* confdefs.h. */
10202_ACEOF
10203cat confdefs.h >>conftest.$ac_ext
10204cat >>conftest.$ac_ext <<_ACEOF
10205/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010206$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010207 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010208int
10209main ()
10210{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010211static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010212test_array [0] = 0
10213
10214 ;
10215 return 0;
10216}
10217_ACEOF
10218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010219if { (ac_try="$ac_compile"
10220case "(($ac_try" in
10221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10222 *) ac_try_echo=$ac_try;;
10223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010227 grep -v '^ *+' conftest.er1 >conftest.err
10228 rm -f conftest.er1
10229 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010231 (exit $ac_status); } && {
10232 test -z "$ac_c_werror_flag" ||
10233 test ! -s conftest.err
10234 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 ac_hi=$ac_mid
10236else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010237 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010238sed 's/^/| /' conftest.$ac_ext >&5
10239
Martin v. Löwiseba40652007-08-30 20:10:57 +000010240 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242
10243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010244done
10245case $ac_lo in
10246?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010247'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010248 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010249See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010250echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010251See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010252 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010253 else
10254 ac_cv_sizeof_fpos_t=0
10255 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010256esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010257else
Martin v. Löwis11437992002-04-12 09:54:03 +000010258 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010259/* confdefs.h. */
10260_ACEOF
10261cat confdefs.h >>conftest.$ac_ext
10262cat >>conftest.$ac_ext <<_ACEOF
10263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010264$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010265 typedef fpos_t ac__type_sizeof_;
10266static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10267static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010268#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010269#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010270int
10271main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010272{
Martin v. Löwis11437992002-04-12 09:54:03 +000010273
10274 FILE *f = fopen ("conftest.val", "w");
10275 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010276 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010277 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010278 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010279 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010280 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010282 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 }
10284 else
10285 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010286 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010287 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010288 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010289 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010291 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010292
10293 ;
10294 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010295}
Martin v. Löwis11437992002-04-12 09:54:03 +000010296_ACEOF
10297rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010298if { (ac_try="$ac_link"
10299case "(($ac_try" in
10300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10301 *) ac_try_echo=$ac_try;;
10302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010308 { (case "(($ac_try" in
10309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10310 *) ac_try_echo=$ac_try;;
10311esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010313 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 (exit $ac_status); }; }; then
10317 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010318else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010319 echo "$as_me: program exited with status $ac_status" >&5
10320echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010321sed 's/^/| /' conftest.$ac_ext >&5
10322
Martin v. Löwis11437992002-04-12 09:54:03 +000010323( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010324if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010325 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010326See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010327echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010328See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010329 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010330 else
10331 ac_cv_sizeof_fpos_t=0
10332 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010333fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010334rm -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 +000010335fi
10336rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010337fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010338{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10339echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010340
10341
10342
Martin v. Löwis11437992002-04-12 09:54:03 +000010343cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010344#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010345_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010346
Michael W. Hudson54241132001-12-07 15:38:26 +000010347
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010348{ echo "$as_me:$LINENO: checking for size_t" >&5
10349echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10350if test "${ac_cv_type_size_t+set}" = set; then
10351 echo $ECHO_N "(cached) $ECHO_C" >&6
10352else
10353 cat >conftest.$ac_ext <<_ACEOF
10354/* confdefs.h. */
10355_ACEOF
10356cat confdefs.h >>conftest.$ac_ext
10357cat >>conftest.$ac_ext <<_ACEOF
10358/* end confdefs.h. */
10359$ac_includes_default
10360typedef size_t ac__type_new_;
10361int
10362main ()
10363{
10364if ((ac__type_new_ *) 0)
10365 return 0;
10366if (sizeof (ac__type_new_))
10367 return 0;
10368 ;
10369 return 0;
10370}
10371_ACEOF
10372rm -f conftest.$ac_objext
10373if { (ac_try="$ac_compile"
10374case "(($ac_try" in
10375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10376 *) ac_try_echo=$ac_try;;
10377esac
10378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10379 (eval "$ac_compile") 2>conftest.er1
10380 ac_status=$?
10381 grep -v '^ *+' conftest.er1 >conftest.err
10382 rm -f conftest.er1
10383 cat conftest.err >&5
10384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10385 (exit $ac_status); } && {
10386 test -z "$ac_c_werror_flag" ||
10387 test ! -s conftest.err
10388 } && test -s conftest.$ac_objext; then
10389 ac_cv_type_size_t=yes
10390else
10391 echo "$as_me: failed program was:" >&5
10392sed 's/^/| /' conftest.$ac_ext >&5
10393
10394 ac_cv_type_size_t=no
10395fi
10396
10397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10398fi
10399{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10400echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10401
Martin v. Löwiseba40652007-08-30 20:10:57 +000010402# The cast to long int works around a bug in the HP C Compiler
10403# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10404# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10405# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010406{ echo "$as_me:$LINENO: checking size of size_t" >&5
10407echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010408if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010409 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010410else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010411 if test "$cross_compiling" = yes; then
10412 # Depending upon the size, compute the lo and hi bounds.
10413cat >conftest.$ac_ext <<_ACEOF
10414/* confdefs.h. */
10415_ACEOF
10416cat confdefs.h >>conftest.$ac_ext
10417cat >>conftest.$ac_ext <<_ACEOF
10418/* end confdefs.h. */
10419$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010420 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010421int
10422main ()
10423{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010424static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425test_array [0] = 0
10426
10427 ;
10428 return 0;
10429}
10430_ACEOF
10431rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010432if { (ac_try="$ac_compile"
10433case "(($ac_try" in
10434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10435 *) ac_try_echo=$ac_try;;
10436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010438 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010439 ac_status=$?
10440 grep -v '^ *+' conftest.er1 >conftest.err
10441 rm -f conftest.er1
10442 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010444 (exit $ac_status); } && {
10445 test -z "$ac_c_werror_flag" ||
10446 test ! -s conftest.err
10447 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010448 ac_lo=0 ac_mid=0
10449 while :; do
10450 cat >conftest.$ac_ext <<_ACEOF
10451/* confdefs.h. */
10452_ACEOF
10453cat confdefs.h >>conftest.$ac_ext
10454cat >>conftest.$ac_ext <<_ACEOF
10455/* end confdefs.h. */
10456$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010457 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010458int
10459main ()
10460{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010461static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010462test_array [0] = 0
10463
10464 ;
10465 return 0;
10466}
10467_ACEOF
10468rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010469if { (ac_try="$ac_compile"
10470case "(($ac_try" in
10471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10472 *) ac_try_echo=$ac_try;;
10473esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010476 ac_status=$?
10477 grep -v '^ *+' conftest.er1 >conftest.err
10478 rm -f conftest.er1
10479 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010481 (exit $ac_status); } && {
10482 test -z "$ac_c_werror_flag" ||
10483 test ! -s conftest.err
10484 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010485 ac_hi=$ac_mid; break
10486else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010487 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010488sed 's/^/| /' conftest.$ac_ext >&5
10489
Martin v. Löwiseba40652007-08-30 20:10:57 +000010490 ac_lo=`expr $ac_mid + 1`
10491 if test $ac_lo -le $ac_mid; then
10492 ac_lo= ac_hi=
10493 break
10494 fi
10495 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010497
10498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010499 done
10500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010501 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010502sed 's/^/| /' conftest.$ac_ext >&5
10503
Martin v. Löwiseba40652007-08-30 20:10:57 +000010504 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505/* confdefs.h. */
10506_ACEOF
10507cat confdefs.h >>conftest.$ac_ext
10508cat >>conftest.$ac_ext <<_ACEOF
10509/* end confdefs.h. */
10510$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010511 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010512int
10513main ()
10514{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010515static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516test_array [0] = 0
10517
10518 ;
10519 return 0;
10520}
10521_ACEOF
10522rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010523if { (ac_try="$ac_compile"
10524case "(($ac_try" in
10525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10526 *) ac_try_echo=$ac_try;;
10527esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010529 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010530 ac_status=$?
10531 grep -v '^ *+' conftest.er1 >conftest.err
10532 rm -f conftest.er1
10533 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010535 (exit $ac_status); } && {
10536 test -z "$ac_c_werror_flag" ||
10537 test ! -s conftest.err
10538 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010539 ac_hi=-1 ac_mid=-1
10540 while :; do
10541 cat >conftest.$ac_ext <<_ACEOF
10542/* confdefs.h. */
10543_ACEOF
10544cat confdefs.h >>conftest.$ac_ext
10545cat >>conftest.$ac_ext <<_ACEOF
10546/* end confdefs.h. */
10547$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010548 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010549int
10550main ()
10551{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010552static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010553test_array [0] = 0
10554
10555 ;
10556 return 0;
10557}
10558_ACEOF
10559rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010560if { (ac_try="$ac_compile"
10561case "(($ac_try" in
10562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10563 *) ac_try_echo=$ac_try;;
10564esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010566 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010567 ac_status=$?
10568 grep -v '^ *+' conftest.er1 >conftest.err
10569 rm -f conftest.er1
10570 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572 (exit $ac_status); } && {
10573 test -z "$ac_c_werror_flag" ||
10574 test ! -s conftest.err
10575 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010576 ac_lo=$ac_mid; break
10577else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010578 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010579sed 's/^/| /' conftest.$ac_ext >&5
10580
Martin v. Löwiseba40652007-08-30 20:10:57 +000010581 ac_hi=`expr '(' $ac_mid ')' - 1`
10582 if test $ac_mid -le $ac_hi; then
10583 ac_lo= ac_hi=
10584 break
10585 fi
10586 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010588
10589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010590 done
10591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010592 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593sed 's/^/| /' conftest.$ac_ext >&5
10594
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010597
10598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010600
10601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602# Binary search between lo and hi bounds.
10603while test "x$ac_lo" != "x$ac_hi"; do
10604 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10605 cat >conftest.$ac_ext <<_ACEOF
10606/* confdefs.h. */
10607_ACEOF
10608cat confdefs.h >>conftest.$ac_ext
10609cat >>conftest.$ac_ext <<_ACEOF
10610/* end confdefs.h. */
10611$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010612 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613int
10614main ()
10615{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010616static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010617test_array [0] = 0
10618
10619 ;
10620 return 0;
10621}
10622_ACEOF
10623rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010624if { (ac_try="$ac_compile"
10625case "(($ac_try" in
10626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10627 *) ac_try_echo=$ac_try;;
10628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010630 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010631 ac_status=$?
10632 grep -v '^ *+' conftest.er1 >conftest.err
10633 rm -f conftest.er1
10634 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010636 (exit $ac_status); } && {
10637 test -z "$ac_c_werror_flag" ||
10638 test ! -s conftest.err
10639 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010640 ac_hi=$ac_mid
10641else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010642 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010643sed 's/^/| /' conftest.$ac_ext >&5
10644
Martin v. Löwiseba40652007-08-30 20:10:57 +000010645 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010646fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010647
10648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649done
10650case $ac_lo in
10651?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010652'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010653 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010654See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010655echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010656See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010657 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010658 else
10659 ac_cv_sizeof_size_t=0
10660 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010661esac
10662else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010663 cat >conftest.$ac_ext <<_ACEOF
10664/* confdefs.h. */
10665_ACEOF
10666cat confdefs.h >>conftest.$ac_ext
10667cat >>conftest.$ac_ext <<_ACEOF
10668/* end confdefs.h. */
10669$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010670 typedef size_t ac__type_sizeof_;
10671static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10672static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673#include <stdio.h>
10674#include <stdlib.h>
10675int
10676main ()
10677{
10678
10679 FILE *f = fopen ("conftest.val", "w");
10680 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010681 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010682 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010683 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010684 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010685 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010687 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010688 }
10689 else
10690 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010692 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010693 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010694 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010695 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010696 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010697
10698 ;
10699 return 0;
10700}
10701_ACEOF
10702rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010703if { (ac_try="$ac_link"
10704case "(($ac_try" in
10705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10706 *) ac_try_echo=$ac_try;;
10707esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010709 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010710 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010713 { (case "(($ac_try" in
10714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10715 *) ac_try_echo=$ac_try;;
10716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010718 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010719 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721 (exit $ac_status); }; }; then
10722 ac_cv_sizeof_size_t=`cat conftest.val`
10723else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010724 echo "$as_me: program exited with status $ac_status" >&5
10725echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010726sed 's/^/| /' conftest.$ac_ext >&5
10727
10728( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010729if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010730 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010731See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010732echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010733See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010734 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010735 else
10736 ac_cv_sizeof_size_t=0
10737 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010738fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010739rm -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 +000010740fi
10741rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010743{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10744echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010745
10746
10747
Martin v. Löwis18e16552006-02-15 17:27:45 +000010748cat >>confdefs.h <<_ACEOF
10749#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10750_ACEOF
10751
10752
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010753{ echo "$as_me:$LINENO: checking for pid_t" >&5
10754echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10755if test "${ac_cv_type_pid_t+set}" = set; then
10756 echo $ECHO_N "(cached) $ECHO_C" >&6
10757else
10758 cat >conftest.$ac_ext <<_ACEOF
10759/* confdefs.h. */
10760_ACEOF
10761cat confdefs.h >>conftest.$ac_ext
10762cat >>conftest.$ac_ext <<_ACEOF
10763/* end confdefs.h. */
10764$ac_includes_default
10765typedef pid_t ac__type_new_;
10766int
10767main ()
10768{
10769if ((ac__type_new_ *) 0)
10770 return 0;
10771if (sizeof (ac__type_new_))
10772 return 0;
10773 ;
10774 return 0;
10775}
10776_ACEOF
10777rm -f conftest.$ac_objext
10778if { (ac_try="$ac_compile"
10779case "(($ac_try" in
10780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10781 *) ac_try_echo=$ac_try;;
10782esac
10783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10784 (eval "$ac_compile") 2>conftest.er1
10785 ac_status=$?
10786 grep -v '^ *+' conftest.er1 >conftest.err
10787 rm -f conftest.er1
10788 cat conftest.err >&5
10789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10790 (exit $ac_status); } && {
10791 test -z "$ac_c_werror_flag" ||
10792 test ! -s conftest.err
10793 } && test -s conftest.$ac_objext; then
10794 ac_cv_type_pid_t=yes
10795else
10796 echo "$as_me: failed program was:" >&5
10797sed 's/^/| /' conftest.$ac_ext >&5
10798
10799 ac_cv_type_pid_t=no
10800fi
10801
10802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10803fi
10804{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10805echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10806
Christian Heimes951cc0f2008-01-31 23:08:23 +000010807# The cast to long int works around a bug in the HP C Compiler
10808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10810# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010811{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10812echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010813if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010814 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010815else
10816 if test "$cross_compiling" = yes; then
10817 # Depending upon the size, compute the lo and hi bounds.
10818cat >conftest.$ac_ext <<_ACEOF
10819/* confdefs.h. */
10820_ACEOF
10821cat confdefs.h >>conftest.$ac_ext
10822cat >>conftest.$ac_ext <<_ACEOF
10823/* end confdefs.h. */
10824$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010825 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010826int
10827main ()
10828{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010829static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010830test_array [0] = 0
10831
10832 ;
10833 return 0;
10834}
10835_ACEOF
10836rm -f conftest.$ac_objext
10837if { (ac_try="$ac_compile"
10838case "(($ac_try" in
10839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10840 *) ac_try_echo=$ac_try;;
10841esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010843 (eval "$ac_compile") 2>conftest.er1
10844 ac_status=$?
10845 grep -v '^ *+' conftest.er1 >conftest.err
10846 rm -f conftest.er1
10847 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010849 (exit $ac_status); } && {
10850 test -z "$ac_c_werror_flag" ||
10851 test ! -s conftest.err
10852 } && test -s conftest.$ac_objext; then
10853 ac_lo=0 ac_mid=0
10854 while :; do
10855 cat >conftest.$ac_ext <<_ACEOF
10856/* confdefs.h. */
10857_ACEOF
10858cat confdefs.h >>conftest.$ac_ext
10859cat >>conftest.$ac_ext <<_ACEOF
10860/* end confdefs.h. */
10861$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010862 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010863int
10864main ()
10865{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010866static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010867test_array [0] = 0
10868
10869 ;
10870 return 0;
10871}
10872_ACEOF
10873rm -f conftest.$ac_objext
10874if { (ac_try="$ac_compile"
10875case "(($ac_try" in
10876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10877 *) ac_try_echo=$ac_try;;
10878esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010880 (eval "$ac_compile") 2>conftest.er1
10881 ac_status=$?
10882 grep -v '^ *+' conftest.er1 >conftest.err
10883 rm -f conftest.er1
10884 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010886 (exit $ac_status); } && {
10887 test -z "$ac_c_werror_flag" ||
10888 test ! -s conftest.err
10889 } && test -s conftest.$ac_objext; then
10890 ac_hi=$ac_mid; break
10891else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010892 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010893sed 's/^/| /' conftest.$ac_ext >&5
10894
10895 ac_lo=`expr $ac_mid + 1`
10896 if test $ac_lo -le $ac_mid; then
10897 ac_lo= ac_hi=
10898 break
10899 fi
10900 ac_mid=`expr 2 '*' $ac_mid + 1`
10901fi
10902
10903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10904 done
10905else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010906 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010907sed 's/^/| /' conftest.$ac_ext >&5
10908
10909 cat >conftest.$ac_ext <<_ACEOF
10910/* confdefs.h. */
10911_ACEOF
10912cat confdefs.h >>conftest.$ac_ext
10913cat >>conftest.$ac_ext <<_ACEOF
10914/* end confdefs.h. */
10915$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010916 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010917int
10918main ()
10919{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010920static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010921test_array [0] = 0
10922
10923 ;
10924 return 0;
10925}
10926_ACEOF
10927rm -f conftest.$ac_objext
10928if { (ac_try="$ac_compile"
10929case "(($ac_try" in
10930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10931 *) ac_try_echo=$ac_try;;
10932esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010934 (eval "$ac_compile") 2>conftest.er1
10935 ac_status=$?
10936 grep -v '^ *+' conftest.er1 >conftest.err
10937 rm -f conftest.er1
10938 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010940 (exit $ac_status); } && {
10941 test -z "$ac_c_werror_flag" ||
10942 test ! -s conftest.err
10943 } && test -s conftest.$ac_objext; then
10944 ac_hi=-1 ac_mid=-1
10945 while :; do
10946 cat >conftest.$ac_ext <<_ACEOF
10947/* confdefs.h. */
10948_ACEOF
10949cat confdefs.h >>conftest.$ac_ext
10950cat >>conftest.$ac_ext <<_ACEOF
10951/* end confdefs.h. */
10952$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010953 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010954int
10955main ()
10956{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010957static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010958test_array [0] = 0
10959
10960 ;
10961 return 0;
10962}
10963_ACEOF
10964rm -f conftest.$ac_objext
10965if { (ac_try="$ac_compile"
10966case "(($ac_try" in
10967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10968 *) ac_try_echo=$ac_try;;
10969esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010971 (eval "$ac_compile") 2>conftest.er1
10972 ac_status=$?
10973 grep -v '^ *+' conftest.er1 >conftest.err
10974 rm -f conftest.er1
10975 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010977 (exit $ac_status); } && {
10978 test -z "$ac_c_werror_flag" ||
10979 test ! -s conftest.err
10980 } && test -s conftest.$ac_objext; then
10981 ac_lo=$ac_mid; break
10982else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010983 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010984sed 's/^/| /' conftest.$ac_ext >&5
10985
10986 ac_hi=`expr '(' $ac_mid ')' - 1`
10987 if test $ac_mid -le $ac_hi; then
10988 ac_lo= ac_hi=
10989 break
10990 fi
10991 ac_mid=`expr 2 '*' $ac_mid`
10992fi
10993
10994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10995 done
10996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010998sed 's/^/| /' conftest.$ac_ext >&5
10999
11000 ac_lo= ac_hi=
11001fi
11002
11003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11004fi
11005
11006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11007# Binary search between lo and hi bounds.
11008while test "x$ac_lo" != "x$ac_hi"; do
11009 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11010 cat >conftest.$ac_ext <<_ACEOF
11011/* confdefs.h. */
11012_ACEOF
11013cat confdefs.h >>conftest.$ac_ext
11014cat >>conftest.$ac_ext <<_ACEOF
11015/* end confdefs.h. */
11016$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011017 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011018int
11019main ()
11020{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011021static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011022test_array [0] = 0
11023
11024 ;
11025 return 0;
11026}
11027_ACEOF
11028rm -f conftest.$ac_objext
11029if { (ac_try="$ac_compile"
11030case "(($ac_try" in
11031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11032 *) ac_try_echo=$ac_try;;
11033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011035 (eval "$ac_compile") 2>conftest.er1
11036 ac_status=$?
11037 grep -v '^ *+' conftest.er1 >conftest.err
11038 rm -f conftest.er1
11039 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011041 (exit $ac_status); } && {
11042 test -z "$ac_c_werror_flag" ||
11043 test ! -s conftest.err
11044 } && test -s conftest.$ac_objext; then
11045 ac_hi=$ac_mid
11046else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011047 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011048sed 's/^/| /' conftest.$ac_ext >&5
11049
11050 ac_lo=`expr '(' $ac_mid ')' + 1`
11051fi
11052
11053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11054done
11055case $ac_lo in
11056?*) ac_cv_sizeof_pid_t=$ac_lo;;
11057'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011058 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011059See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011060echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011061See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011062 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011063 else
11064 ac_cv_sizeof_pid_t=0
11065 fi ;;
11066esac
11067else
11068 cat >conftest.$ac_ext <<_ACEOF
11069/* confdefs.h. */
11070_ACEOF
11071cat confdefs.h >>conftest.$ac_ext
11072cat >>conftest.$ac_ext <<_ACEOF
11073/* end confdefs.h. */
11074$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011075 typedef pid_t ac__type_sizeof_;
11076static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11077static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011078#include <stdio.h>
11079#include <stdlib.h>
11080int
11081main ()
11082{
11083
11084 FILE *f = fopen ("conftest.val", "w");
11085 if (! f)
11086 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011087 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011088 {
11089 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011090 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011091 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011092 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011093 }
11094 else
11095 {
11096 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011097 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011098 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011099 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011100 }
11101 return ferror (f) || fclose (f) != 0;
11102
11103 ;
11104 return 0;
11105}
11106_ACEOF
11107rm -f conftest$ac_exeext
11108if { (ac_try="$ac_link"
11109case "(($ac_try" in
11110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11111 *) ac_try_echo=$ac_try;;
11112esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011114 (eval "$ac_link") 2>&5
11115 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011117 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11118 { (case "(($ac_try" in
11119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11120 *) ac_try_echo=$ac_try;;
11121esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011122eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011123 (eval "$ac_try") 2>&5
11124 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011126 (exit $ac_status); }; }; then
11127 ac_cv_sizeof_pid_t=`cat conftest.val`
11128else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011129 echo "$as_me: program exited with status $ac_status" >&5
11130echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011131sed 's/^/| /' conftest.$ac_ext >&5
11132
11133( exit $ac_status )
11134if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011135 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011136See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011137echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011138See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011139 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140 else
11141 ac_cv_sizeof_pid_t=0
11142 fi
11143fi
11144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11145fi
11146rm -f conftest.val
11147fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011148{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11149echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011150
11151
11152
11153cat >>confdefs.h <<_ACEOF
11154#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11155_ACEOF
11156
11157
Michael W. Hudson54241132001-12-07 15:38:26 +000011158
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011159{ echo "$as_me:$LINENO: checking for long long support" >&5
11160echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011161have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011162cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011163/* confdefs.h. */
11164_ACEOF
11165cat confdefs.h >>conftest.$ac_ext
11166cat >>conftest.$ac_ext <<_ACEOF
11167/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011168
Martin v. Löwis11437992002-04-12 09:54:03 +000011169int
11170main ()
11171{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011172long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011173 ;
11174 return 0;
11175}
11176_ACEOF
11177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011178if { (ac_try="$ac_compile"
11179case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011186 grep -v '^ *+' conftest.er1 >conftest.err
11187 rm -f conftest.er1
11188 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011190 (exit $ac_status); } && {
11191 test -z "$ac_c_werror_flag" ||
11192 test ! -s conftest.err
11193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011194
11195
11196cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011197#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011198_ACEOF
11199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011200 have_long_long=yes
11201
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011202else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011203 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011204sed 's/^/| /' conftest.$ac_ext >&5
11205
Martin v. Löwiseba40652007-08-30 20:10:57 +000011206
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011207fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011208
11209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011210{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11211echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011212if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011213{ echo "$as_me:$LINENO: checking for long long" >&5
11214echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11215if test "${ac_cv_type_long_long+set}" = set; then
11216 echo $ECHO_N "(cached) $ECHO_C" >&6
11217else
11218 cat >conftest.$ac_ext <<_ACEOF
11219/* confdefs.h. */
11220_ACEOF
11221cat confdefs.h >>conftest.$ac_ext
11222cat >>conftest.$ac_ext <<_ACEOF
11223/* end confdefs.h. */
11224$ac_includes_default
11225typedef long long ac__type_new_;
11226int
11227main ()
11228{
11229if ((ac__type_new_ *) 0)
11230 return 0;
11231if (sizeof (ac__type_new_))
11232 return 0;
11233 ;
11234 return 0;
11235}
11236_ACEOF
11237rm -f conftest.$ac_objext
11238if { (ac_try="$ac_compile"
11239case "(($ac_try" in
11240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11241 *) ac_try_echo=$ac_try;;
11242esac
11243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11244 (eval "$ac_compile") 2>conftest.er1
11245 ac_status=$?
11246 grep -v '^ *+' conftest.er1 >conftest.err
11247 rm -f conftest.er1
11248 cat conftest.err >&5
11249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11250 (exit $ac_status); } && {
11251 test -z "$ac_c_werror_flag" ||
11252 test ! -s conftest.err
11253 } && test -s conftest.$ac_objext; then
11254 ac_cv_type_long_long=yes
11255else
11256 echo "$as_me: failed program was:" >&5
11257sed 's/^/| /' conftest.$ac_ext >&5
11258
11259 ac_cv_type_long_long=no
11260fi
11261
11262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11263fi
11264{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11265echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11266
Martin v. Löwiseba40652007-08-30 20:10:57 +000011267# The cast to long int works around a bug in the HP C Compiler
11268# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11269# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11270# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011271{ echo "$as_me:$LINENO: checking size of long long" >&5
11272echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011273if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011274 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011275else
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 if test "$cross_compiling" = yes; then
11277 # Depending upon the size, compute the lo and hi bounds.
11278cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011279/* confdefs.h. */
11280_ACEOF
11281cat confdefs.h >>conftest.$ac_ext
11282cat >>conftest.$ac_ext <<_ACEOF
11283/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011284$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011285 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011286int
11287main ()
11288{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011289static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011290test_array [0] = 0
11291
11292 ;
11293 return 0;
11294}
11295_ACEOF
11296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011297if { (ac_try="$ac_compile"
11298case "(($ac_try" in
11299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11300 *) ac_try_echo=$ac_try;;
11301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011305 grep -v '^ *+' conftest.er1 >conftest.err
11306 rm -f conftest.er1
11307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309 (exit $ac_status); } && {
11310 test -z "$ac_c_werror_flag" ||
11311 test ! -s conftest.err
11312 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 ac_lo=0 ac_mid=0
11314 while :; do
11315 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* confdefs.h. */
11317_ACEOF
11318cat confdefs.h >>conftest.$ac_ext
11319cat >>conftest.$ac_ext <<_ACEOF
11320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011321$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011322 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011323int
11324main ()
11325{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011326static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011327test_array [0] = 0
11328
11329 ;
11330 return 0;
11331}
11332_ACEOF
11333rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011334if { (ac_try="$ac_compile"
11335case "(($ac_try" in
11336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11337 *) ac_try_echo=$ac_try;;
11338esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011339eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011342 grep -v '^ *+' conftest.er1 >conftest.err
11343 rm -f conftest.er1
11344 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011346 (exit $ac_status); } && {
11347 test -z "$ac_c_werror_flag" ||
11348 test ! -s conftest.err
11349 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011350 ac_hi=$ac_mid; break
11351else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011353sed 's/^/| /' conftest.$ac_ext >&5
11354
Martin v. Löwiseba40652007-08-30 20:10:57 +000011355 ac_lo=`expr $ac_mid + 1`
11356 if test $ac_lo -le $ac_mid; then
11357 ac_lo= ac_hi=
11358 break
11359 fi
11360 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011362
11363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011364 done
11365else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011367sed 's/^/| /' conftest.$ac_ext >&5
11368
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011370/* confdefs.h. */
11371_ACEOF
11372cat confdefs.h >>conftest.$ac_ext
11373cat >>conftest.$ac_ext <<_ACEOF
11374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011375$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011376 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011377int
11378main ()
11379{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011380static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011381test_array [0] = 0
11382
11383 ;
11384 return 0;
11385}
11386_ACEOF
11387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011388if { (ac_try="$ac_compile"
11389case "(($ac_try" in
11390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11391 *) ac_try_echo=$ac_try;;
11392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011396 grep -v '^ *+' conftest.er1 >conftest.err
11397 rm -f conftest.er1
11398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400 (exit $ac_status); } && {
11401 test -z "$ac_c_werror_flag" ||
11402 test ! -s conftest.err
11403 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_hi=-1 ac_mid=-1
11405 while :; do
11406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011407/* confdefs.h. */
11408_ACEOF
11409cat confdefs.h >>conftest.$ac_ext
11410cat >>conftest.$ac_ext <<_ACEOF
11411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011412$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011413 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011414int
11415main ()
11416{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011417static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011418test_array [0] = 0
11419
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011425if { (ac_try="$ac_compile"
11426case "(($ac_try" in
11427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11428 *) ac_try_echo=$ac_try;;
11429esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011430eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011431 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011433 grep -v '^ *+' conftest.er1 >conftest.err
11434 rm -f conftest.er1
11435 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011437 (exit $ac_status); } && {
11438 test -z "$ac_c_werror_flag" ||
11439 test ! -s conftest.err
11440 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011441 ac_lo=$ac_mid; break
11442else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011444sed 's/^/| /' conftest.$ac_ext >&5
11445
Martin v. Löwiseba40652007-08-30 20:10:57 +000011446 ac_hi=`expr '(' $ac_mid ')' - 1`
11447 if test $ac_mid -le $ac_hi; then
11448 ac_lo= ac_hi=
11449 break
11450 fi
11451 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011453
11454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011455 done
11456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011458sed 's/^/| /' conftest.$ac_ext >&5
11459
Martin v. Löwiseba40652007-08-30 20:10:57 +000011460 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011462
11463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011465
11466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011467# Binary search between lo and hi bounds.
11468while test "x$ac_lo" != "x$ac_hi"; do
11469 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011471/* confdefs.h. */
11472_ACEOF
11473cat confdefs.h >>conftest.$ac_ext
11474cat >>conftest.$ac_ext <<_ACEOF
11475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011476$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011477 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011478int
11479main ()
11480{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011481static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011482test_array [0] = 0
11483
11484 ;
11485 return 0;
11486}
11487_ACEOF
11488rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011489if { (ac_try="$ac_compile"
11490case "(($ac_try" in
11491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11492 *) ac_try_echo=$ac_try;;
11493esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011497 grep -v '^ *+' conftest.er1 >conftest.err
11498 rm -f conftest.er1
11499 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011501 (exit $ac_status); } && {
11502 test -z "$ac_c_werror_flag" ||
11503 test ! -s conftest.err
11504 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011505 ac_hi=$ac_mid
11506else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011507 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011508sed 's/^/| /' conftest.$ac_ext >&5
11509
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011512
11513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011514done
11515case $ac_lo in
11516?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011517'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011518 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011519See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011520echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011521See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011522 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523 else
11524 ac_cv_sizeof_long_long=0
11525 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011526esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011527else
Martin v. Löwis11437992002-04-12 09:54:03 +000011528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011529/* confdefs.h. */
11530_ACEOF
11531cat confdefs.h >>conftest.$ac_ext
11532cat >>conftest.$ac_ext <<_ACEOF
11533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011534$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011535 typedef long long ac__type_sizeof_;
11536static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11537static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011538#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011539#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011540int
11541main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011542{
Martin v. Löwis11437992002-04-12 09:54:03 +000011543
11544 FILE *f = fopen ("conftest.val", "w");
11545 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011546 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011547 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011548 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011549 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011550 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011551 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011552 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011553 }
11554 else
11555 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011557 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011559 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011561 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011562
11563 ;
11564 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011565}
Martin v. Löwis11437992002-04-12 09:54:03 +000011566_ACEOF
11567rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011568if { (ac_try="$ac_link"
11569case "(($ac_try" in
11570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11571 *) ac_try_echo=$ac_try;;
11572esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011574 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011575 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011578 { (case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011584 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011586 (exit $ac_status); }; }; then
11587 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011588else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011589 echo "$as_me: program exited with status $ac_status" >&5
11590echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011591sed 's/^/| /' conftest.$ac_ext >&5
11592
Martin v. Löwis11437992002-04-12 09:54:03 +000011593( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011595 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011596See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011597echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011598See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011599 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011600 else
11601 ac_cv_sizeof_long_long=0
11602 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011603fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011604rm -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 +000011605fi
11606rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011607fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011608{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11609echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011610
11611
11612
Martin v. Löwis11437992002-04-12 09:54:03 +000011613cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011614#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011615_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011616
Michael W. Hudson54241132001-12-07 15:38:26 +000011617
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011618fi
11619
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011620{ echo "$as_me:$LINENO: checking for long double support" >&5
11621echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011622have_long_double=no
11623cat >conftest.$ac_ext <<_ACEOF
11624/* confdefs.h. */
11625_ACEOF
11626cat confdefs.h >>conftest.$ac_ext
11627cat >>conftest.$ac_ext <<_ACEOF
11628/* end confdefs.h. */
11629
11630int
11631main ()
11632{
11633long double x; x = (long double)0.;
11634 ;
11635 return 0;
11636}
11637_ACEOF
11638rm -f conftest.$ac_objext
11639if { (ac_try="$ac_compile"
11640case "(($ac_try" in
11641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11642 *) ac_try_echo=$ac_try;;
11643esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011644eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011645 (eval "$ac_compile") 2>conftest.er1
11646 ac_status=$?
11647 grep -v '^ *+' conftest.er1 >conftest.err
11648 rm -f conftest.er1
11649 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011651 (exit $ac_status); } && {
11652 test -z "$ac_c_werror_flag" ||
11653 test ! -s conftest.err
11654 } && test -s conftest.$ac_objext; then
11655
11656
11657cat >>confdefs.h <<\_ACEOF
11658#define HAVE_LONG_DOUBLE 1
11659_ACEOF
11660
11661 have_long_double=yes
11662
11663else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011664 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011665sed 's/^/| /' conftest.$ac_ext >&5
11666
11667
11668fi
11669
11670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011671{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11672echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011673if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011674{ echo "$as_me:$LINENO: checking for long double" >&5
11675echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11676if test "${ac_cv_type_long_double+set}" = set; then
11677 echo $ECHO_N "(cached) $ECHO_C" >&6
11678else
11679 cat >conftest.$ac_ext <<_ACEOF
11680/* confdefs.h. */
11681_ACEOF
11682cat confdefs.h >>conftest.$ac_ext
11683cat >>conftest.$ac_ext <<_ACEOF
11684/* end confdefs.h. */
11685$ac_includes_default
11686typedef long double ac__type_new_;
11687int
11688main ()
11689{
11690if ((ac__type_new_ *) 0)
11691 return 0;
11692if (sizeof (ac__type_new_))
11693 return 0;
11694 ;
11695 return 0;
11696}
11697_ACEOF
11698rm -f conftest.$ac_objext
11699if { (ac_try="$ac_compile"
11700case "(($ac_try" in
11701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11702 *) ac_try_echo=$ac_try;;
11703esac
11704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11705 (eval "$ac_compile") 2>conftest.er1
11706 ac_status=$?
11707 grep -v '^ *+' conftest.er1 >conftest.err
11708 rm -f conftest.er1
11709 cat conftest.err >&5
11710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11711 (exit $ac_status); } && {
11712 test -z "$ac_c_werror_flag" ||
11713 test ! -s conftest.err
11714 } && test -s conftest.$ac_objext; then
11715 ac_cv_type_long_double=yes
11716else
11717 echo "$as_me: failed program was:" >&5
11718sed 's/^/| /' conftest.$ac_ext >&5
11719
11720 ac_cv_type_long_double=no
11721fi
11722
11723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11724fi
11725{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11726echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11727
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011728# The cast to long int works around a bug in the HP C Compiler
11729# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11730# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11731# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011732{ echo "$as_me:$LINENO: checking size of long double" >&5
11733echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011734if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011735 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011736else
11737 if test "$cross_compiling" = yes; then
11738 # Depending upon the size, compute the lo and hi bounds.
11739cat >conftest.$ac_ext <<_ACEOF
11740/* confdefs.h. */
11741_ACEOF
11742cat confdefs.h >>conftest.$ac_ext
11743cat >>conftest.$ac_ext <<_ACEOF
11744/* end confdefs.h. */
11745$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011746 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011747int
11748main ()
11749{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011750static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011751test_array [0] = 0
11752
11753 ;
11754 return 0;
11755}
11756_ACEOF
11757rm -f conftest.$ac_objext
11758if { (ac_try="$ac_compile"
11759case "(($ac_try" in
11760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11761 *) ac_try_echo=$ac_try;;
11762esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011764 (eval "$ac_compile") 2>conftest.er1
11765 ac_status=$?
11766 grep -v '^ *+' conftest.er1 >conftest.err
11767 rm -f conftest.er1
11768 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011770 (exit $ac_status); } && {
11771 test -z "$ac_c_werror_flag" ||
11772 test ! -s conftest.err
11773 } && test -s conftest.$ac_objext; then
11774 ac_lo=0 ac_mid=0
11775 while :; do
11776 cat >conftest.$ac_ext <<_ACEOF
11777/* confdefs.h. */
11778_ACEOF
11779cat confdefs.h >>conftest.$ac_ext
11780cat >>conftest.$ac_ext <<_ACEOF
11781/* end confdefs.h. */
11782$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011783 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011784int
11785main ()
11786{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011787static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011788test_array [0] = 0
11789
11790 ;
11791 return 0;
11792}
11793_ACEOF
11794rm -f conftest.$ac_objext
11795if { (ac_try="$ac_compile"
11796case "(($ac_try" in
11797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11798 *) ac_try_echo=$ac_try;;
11799esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011801 (eval "$ac_compile") 2>conftest.er1
11802 ac_status=$?
11803 grep -v '^ *+' conftest.er1 >conftest.err
11804 rm -f conftest.er1
11805 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011807 (exit $ac_status); } && {
11808 test -z "$ac_c_werror_flag" ||
11809 test ! -s conftest.err
11810 } && test -s conftest.$ac_objext; then
11811 ac_hi=$ac_mid; break
11812else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011813 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011814sed 's/^/| /' conftest.$ac_ext >&5
11815
11816 ac_lo=`expr $ac_mid + 1`
11817 if test $ac_lo -le $ac_mid; then
11818 ac_lo= ac_hi=
11819 break
11820 fi
11821 ac_mid=`expr 2 '*' $ac_mid + 1`
11822fi
11823
11824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11825 done
11826else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011827 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011828sed 's/^/| /' conftest.$ac_ext >&5
11829
11830 cat >conftest.$ac_ext <<_ACEOF
11831/* confdefs.h. */
11832_ACEOF
11833cat confdefs.h >>conftest.$ac_ext
11834cat >>conftest.$ac_ext <<_ACEOF
11835/* end confdefs.h. */
11836$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011837 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011838int
11839main ()
11840{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011841static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011842test_array [0] = 0
11843
11844 ;
11845 return 0;
11846}
11847_ACEOF
11848rm -f conftest.$ac_objext
11849if { (ac_try="$ac_compile"
11850case "(($ac_try" in
11851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11852 *) ac_try_echo=$ac_try;;
11853esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011854eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011855 (eval "$ac_compile") 2>conftest.er1
11856 ac_status=$?
11857 grep -v '^ *+' conftest.er1 >conftest.err
11858 rm -f conftest.er1
11859 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011861 (exit $ac_status); } && {
11862 test -z "$ac_c_werror_flag" ||
11863 test ! -s conftest.err
11864 } && test -s conftest.$ac_objext; then
11865 ac_hi=-1 ac_mid=-1
11866 while :; do
11867 cat >conftest.$ac_ext <<_ACEOF
11868/* confdefs.h. */
11869_ACEOF
11870cat confdefs.h >>conftest.$ac_ext
11871cat >>conftest.$ac_ext <<_ACEOF
11872/* end confdefs.h. */
11873$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011874 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011875int
11876main ()
11877{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011878static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011879test_array [0] = 0
11880
11881 ;
11882 return 0;
11883}
11884_ACEOF
11885rm -f conftest.$ac_objext
11886if { (ac_try="$ac_compile"
11887case "(($ac_try" in
11888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11889 *) ac_try_echo=$ac_try;;
11890esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011892 (eval "$ac_compile") 2>conftest.er1
11893 ac_status=$?
11894 grep -v '^ *+' conftest.er1 >conftest.err
11895 rm -f conftest.er1
11896 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011898 (exit $ac_status); } && {
11899 test -z "$ac_c_werror_flag" ||
11900 test ! -s conftest.err
11901 } && test -s conftest.$ac_objext; then
11902 ac_lo=$ac_mid; break
11903else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011904 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011905sed 's/^/| /' conftest.$ac_ext >&5
11906
11907 ac_hi=`expr '(' $ac_mid ')' - 1`
11908 if test $ac_mid -le $ac_hi; then
11909 ac_lo= ac_hi=
11910 break
11911 fi
11912 ac_mid=`expr 2 '*' $ac_mid`
11913fi
11914
11915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11916 done
11917else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011918 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011919sed 's/^/| /' conftest.$ac_ext >&5
11920
11921 ac_lo= ac_hi=
11922fi
11923
11924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11925fi
11926
11927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11928# Binary search between lo and hi bounds.
11929while test "x$ac_lo" != "x$ac_hi"; do
11930 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11931 cat >conftest.$ac_ext <<_ACEOF
11932/* confdefs.h. */
11933_ACEOF
11934cat confdefs.h >>conftest.$ac_ext
11935cat >>conftest.$ac_ext <<_ACEOF
11936/* end confdefs.h. */
11937$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011938 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011939int
11940main ()
11941{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011942static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011943test_array [0] = 0
11944
11945 ;
11946 return 0;
11947}
11948_ACEOF
11949rm -f conftest.$ac_objext
11950if { (ac_try="$ac_compile"
11951case "(($ac_try" in
11952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11953 *) ac_try_echo=$ac_try;;
11954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011956 (eval "$ac_compile") 2>conftest.er1
11957 ac_status=$?
11958 grep -v '^ *+' conftest.er1 >conftest.err
11959 rm -f conftest.er1
11960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011962 (exit $ac_status); } && {
11963 test -z "$ac_c_werror_flag" ||
11964 test ! -s conftest.err
11965 } && test -s conftest.$ac_objext; then
11966 ac_hi=$ac_mid
11967else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011968 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011969sed 's/^/| /' conftest.$ac_ext >&5
11970
11971 ac_lo=`expr '(' $ac_mid ')' + 1`
11972fi
11973
11974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11975done
11976case $ac_lo in
11977?*) ac_cv_sizeof_long_double=$ac_lo;;
11978'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011979 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011980See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011981echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011982See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011983 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011984 else
11985 ac_cv_sizeof_long_double=0
11986 fi ;;
11987esac
11988else
11989 cat >conftest.$ac_ext <<_ACEOF
11990/* confdefs.h. */
11991_ACEOF
11992cat confdefs.h >>conftest.$ac_ext
11993cat >>conftest.$ac_ext <<_ACEOF
11994/* end confdefs.h. */
11995$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011996 typedef long double ac__type_sizeof_;
11997static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11998static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011999#include <stdio.h>
12000#include <stdlib.h>
12001int
12002main ()
12003{
12004
12005 FILE *f = fopen ("conftest.val", "w");
12006 if (! f)
12007 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012008 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012009 {
12010 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012011 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012012 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012013 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012014 }
12015 else
12016 {
12017 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012018 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012019 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012020 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012021 }
12022 return ferror (f) || fclose (f) != 0;
12023
12024 ;
12025 return 0;
12026}
12027_ACEOF
12028rm -f conftest$ac_exeext
12029if { (ac_try="$ac_link"
12030case "(($ac_try" in
12031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12032 *) ac_try_echo=$ac_try;;
12033esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012035 (eval "$ac_link") 2>&5
12036 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12039 { (case "(($ac_try" in
12040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12041 *) ac_try_echo=$ac_try;;
12042esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012044 (eval "$ac_try") 2>&5
12045 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012047 (exit $ac_status); }; }; then
12048 ac_cv_sizeof_long_double=`cat conftest.val`
12049else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012050 echo "$as_me: program exited with status $ac_status" >&5
12051echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012052sed 's/^/| /' conftest.$ac_ext >&5
12053
12054( exit $ac_status )
12055if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012056 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012057See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012058echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012059See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012060 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012061 else
12062 ac_cv_sizeof_long_double=0
12063 fi
12064fi
12065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12066fi
12067rm -f conftest.val
12068fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012069{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12070echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012071
12072
12073
12074cat >>confdefs.h <<_ACEOF
12075#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12076_ACEOF
12077
12078
12079fi
12080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012081{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12082echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012083have_c99_bool=no
12084cat >conftest.$ac_ext <<_ACEOF
12085/* confdefs.h. */
12086_ACEOF
12087cat confdefs.h >>conftest.$ac_ext
12088cat >>conftest.$ac_ext <<_ACEOF
12089/* end confdefs.h. */
12090
12091int
12092main ()
12093{
12094_Bool x; x = (_Bool)0;
12095 ;
12096 return 0;
12097}
12098_ACEOF
12099rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012100if { (ac_try="$ac_compile"
12101case "(($ac_try" in
12102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12103 *) ac_try_echo=$ac_try;;
12104esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012106 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012107 ac_status=$?
12108 grep -v '^ *+' conftest.er1 >conftest.err
12109 rm -f conftest.er1
12110 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012112 (exit $ac_status); } && {
12113 test -z "$ac_c_werror_flag" ||
12114 test ! -s conftest.err
12115 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012116
12117
12118cat >>confdefs.h <<\_ACEOF
12119#define HAVE_C99_BOOL 1
12120_ACEOF
12121
12122 have_c99_bool=yes
12123
12124else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012125 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012126sed 's/^/| /' conftest.$ac_ext >&5
12127
Martin v. Löwiseba40652007-08-30 20:10:57 +000012128
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012129fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012130
12131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012132{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12133echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012134if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012135{ echo "$as_me:$LINENO: checking for _Bool" >&5
12136echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12137if test "${ac_cv_type__Bool+set}" = set; then
12138 echo $ECHO_N "(cached) $ECHO_C" >&6
12139else
12140 cat >conftest.$ac_ext <<_ACEOF
12141/* confdefs.h. */
12142_ACEOF
12143cat confdefs.h >>conftest.$ac_ext
12144cat >>conftest.$ac_ext <<_ACEOF
12145/* end confdefs.h. */
12146$ac_includes_default
12147typedef _Bool ac__type_new_;
12148int
12149main ()
12150{
12151if ((ac__type_new_ *) 0)
12152 return 0;
12153if (sizeof (ac__type_new_))
12154 return 0;
12155 ;
12156 return 0;
12157}
12158_ACEOF
12159rm -f conftest.$ac_objext
12160if { (ac_try="$ac_compile"
12161case "(($ac_try" in
12162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12163 *) ac_try_echo=$ac_try;;
12164esac
12165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12166 (eval "$ac_compile") 2>conftest.er1
12167 ac_status=$?
12168 grep -v '^ *+' conftest.er1 >conftest.err
12169 rm -f conftest.er1
12170 cat conftest.err >&5
12171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12172 (exit $ac_status); } && {
12173 test -z "$ac_c_werror_flag" ||
12174 test ! -s conftest.err
12175 } && test -s conftest.$ac_objext; then
12176 ac_cv_type__Bool=yes
12177else
12178 echo "$as_me: failed program was:" >&5
12179sed 's/^/| /' conftest.$ac_ext >&5
12180
12181 ac_cv_type__Bool=no
12182fi
12183
12184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12185fi
12186{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12187echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12188
Martin v. Löwiseba40652007-08-30 20:10:57 +000012189# The cast to long int works around a bug in the HP C Compiler
12190# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12191# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12192# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012193{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12194echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012195if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012196 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012197else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012198 if test "$cross_compiling" = yes; then
12199 # Depending upon the size, compute the lo and hi bounds.
12200cat >conftest.$ac_ext <<_ACEOF
12201/* confdefs.h. */
12202_ACEOF
12203cat confdefs.h >>conftest.$ac_ext
12204cat >>conftest.$ac_ext <<_ACEOF
12205/* end confdefs.h. */
12206$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012207 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208int
12209main ()
12210{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012211static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012212test_array [0] = 0
12213
12214 ;
12215 return 0;
12216}
12217_ACEOF
12218rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012219if { (ac_try="$ac_compile"
12220case "(($ac_try" in
12221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12222 *) ac_try_echo=$ac_try;;
12223esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012224eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012225 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012226 ac_status=$?
12227 grep -v '^ *+' conftest.er1 >conftest.err
12228 rm -f conftest.er1
12229 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231 (exit $ac_status); } && {
12232 test -z "$ac_c_werror_flag" ||
12233 test ! -s conftest.err
12234 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012235 ac_lo=0 ac_mid=0
12236 while :; do
12237 cat >conftest.$ac_ext <<_ACEOF
12238/* confdefs.h. */
12239_ACEOF
12240cat confdefs.h >>conftest.$ac_ext
12241cat >>conftest.$ac_ext <<_ACEOF
12242/* end confdefs.h. */
12243$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012244 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012245int
12246main ()
12247{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012248static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012249test_array [0] = 0
12250
12251 ;
12252 return 0;
12253}
12254_ACEOF
12255rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012256if { (ac_try="$ac_compile"
12257case "(($ac_try" in
12258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12259 *) ac_try_echo=$ac_try;;
12260esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012262 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012263 ac_status=$?
12264 grep -v '^ *+' conftest.er1 >conftest.err
12265 rm -f conftest.er1
12266 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012268 (exit $ac_status); } && {
12269 test -z "$ac_c_werror_flag" ||
12270 test ! -s conftest.err
12271 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012272 ac_hi=$ac_mid; break
12273else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012274 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012275sed 's/^/| /' conftest.$ac_ext >&5
12276
Martin v. Löwiseba40652007-08-30 20:10:57 +000012277 ac_lo=`expr $ac_mid + 1`
12278 if test $ac_lo -le $ac_mid; then
12279 ac_lo= ac_hi=
12280 break
12281 fi
12282 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012283fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012284
12285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012286 done
12287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012288 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012289sed 's/^/| /' conftest.$ac_ext >&5
12290
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012292/* confdefs.h. */
12293_ACEOF
12294cat confdefs.h >>conftest.$ac_ext
12295cat >>conftest.$ac_ext <<_ACEOF
12296/* end confdefs.h. */
12297$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012298 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299int
12300main ()
12301{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012302static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012303test_array [0] = 0
12304
12305 ;
12306 return 0;
12307}
12308_ACEOF
12309rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012310if { (ac_try="$ac_compile"
12311case "(($ac_try" in
12312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12313 *) ac_try_echo=$ac_try;;
12314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012317 ac_status=$?
12318 grep -v '^ *+' conftest.er1 >conftest.err
12319 rm -f conftest.er1
12320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012322 (exit $ac_status); } && {
12323 test -z "$ac_c_werror_flag" ||
12324 test ! -s conftest.err
12325 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012326 ac_hi=-1 ac_mid=-1
12327 while :; do
12328 cat >conftest.$ac_ext <<_ACEOF
12329/* confdefs.h. */
12330_ACEOF
12331cat confdefs.h >>conftest.$ac_ext
12332cat >>conftest.$ac_ext <<_ACEOF
12333/* end confdefs.h. */
12334$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012335 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012336int
12337main ()
12338{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012339static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012340test_array [0] = 0
12341
12342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347if { (ac_try="$ac_compile"
12348case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012354 ac_status=$?
12355 grep -v '^ *+' conftest.er1 >conftest.err
12356 rm -f conftest.er1
12357 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012359 (exit $ac_status); } && {
12360 test -z "$ac_c_werror_flag" ||
12361 test ! -s conftest.err
12362 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012363 ac_lo=$ac_mid; break
12364else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012365 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012366sed 's/^/| /' conftest.$ac_ext >&5
12367
Martin v. Löwiseba40652007-08-30 20:10:57 +000012368 ac_hi=`expr '(' $ac_mid ')' - 1`
12369 if test $ac_mid -le $ac_hi; then
12370 ac_lo= ac_hi=
12371 break
12372 fi
12373 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012374fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012375
12376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377 done
12378else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012379 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012380sed 's/^/| /' conftest.$ac_ext >&5
12381
Martin v. Löwiseba40652007-08-30 20:10:57 +000012382 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012383fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012384
12385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012386fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012387
12388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012389# Binary search between lo and hi bounds.
12390while test "x$ac_lo" != "x$ac_hi"; do
12391 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12392 cat >conftest.$ac_ext <<_ACEOF
12393/* confdefs.h. */
12394_ACEOF
12395cat confdefs.h >>conftest.$ac_ext
12396cat >>conftest.$ac_ext <<_ACEOF
12397/* end confdefs.h. */
12398$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012399 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400int
12401main ()
12402{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012403static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012404test_array [0] = 0
12405
12406 ;
12407 return 0;
12408}
12409_ACEOF
12410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012411if { (ac_try="$ac_compile"
12412case "(($ac_try" in
12413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12414 *) ac_try_echo=$ac_try;;
12415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012418 ac_status=$?
12419 grep -v '^ *+' conftest.er1 >conftest.err
12420 rm -f conftest.er1
12421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012423 (exit $ac_status); } && {
12424 test -z "$ac_c_werror_flag" ||
12425 test ! -s conftest.err
12426 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427 ac_hi=$ac_mid
12428else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012429 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012430sed 's/^/| /' conftest.$ac_ext >&5
12431
Martin v. Löwiseba40652007-08-30 20:10:57 +000012432 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012434
12435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012436done
12437case $ac_lo in
12438?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012440 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012442echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012443See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012444 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445 else
12446 ac_cv_sizeof__Bool=0
12447 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012448esac
12449else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012450 cat >conftest.$ac_ext <<_ACEOF
12451/* confdefs.h. */
12452_ACEOF
12453cat confdefs.h >>conftest.$ac_ext
12454cat >>conftest.$ac_ext <<_ACEOF
12455/* end confdefs.h. */
12456$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012457 typedef _Bool ac__type_sizeof_;
12458static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12459static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012460#include <stdio.h>
12461#include <stdlib.h>
12462int
12463main ()
12464{
12465
12466 FILE *f = fopen ("conftest.val", "w");
12467 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012468 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012469 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012470 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012471 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012472 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012473 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012474 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012475 }
12476 else
12477 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012478 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012479 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012480 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012481 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012482 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012483 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012484
12485 ;
12486 return 0;
12487}
12488_ACEOF
12489rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012490if { (ac_try="$ac_link"
12491case "(($ac_try" in
12492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12493 *) ac_try_echo=$ac_try;;
12494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012496 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012497 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012500 { (case "(($ac_try" in
12501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12502 *) ac_try_echo=$ac_try;;
12503esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012505 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012506 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012508 (exit $ac_status); }; }; then
12509 ac_cv_sizeof__Bool=`cat conftest.val`
12510else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012511 echo "$as_me: program exited with status $ac_status" >&5
12512echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012513sed 's/^/| /' conftest.$ac_ext >&5
12514
12515( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012516if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012517 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012518See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012519echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012520See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012521 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012522 else
12523 ac_cv_sizeof__Bool=0
12524 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012525fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012526rm -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 +000012527fi
12528rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012529fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012530{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12531echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012532
12533
12534
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012535cat >>confdefs.h <<_ACEOF
12536#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12537_ACEOF
12538
12539
12540fi
12541
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012542{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12543echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012544if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012545 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012546else
12547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012548/* confdefs.h. */
12549_ACEOF
12550cat confdefs.h >>conftest.$ac_ext
12551cat >>conftest.$ac_ext <<_ACEOF
12552/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012553#ifdef HAVE_STDINT_H
12554 #include <stdint.h>
12555 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012556
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012557typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012558int
12559main ()
12560{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012561if ((ac__type_new_ *) 0)
12562 return 0;
12563if (sizeof (ac__type_new_))
12564 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012565 ;
12566 return 0;
12567}
12568_ACEOF
12569rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570if { (ac_try="$ac_compile"
12571case "(($ac_try" in
12572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12573 *) ac_try_echo=$ac_try;;
12574esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012576 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012577 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012578 grep -v '^ *+' conftest.er1 >conftest.err
12579 rm -f conftest.er1
12580 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012582 (exit $ac_status); } && {
12583 test -z "$ac_c_werror_flag" ||
12584 test ! -s conftest.err
12585 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012586 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012587else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012588 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012589sed 's/^/| /' conftest.$ac_ext >&5
12590
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012591 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012593
12594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012595fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012596{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12597echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12598if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012599
12600cat >>confdefs.h <<_ACEOF
12601#define HAVE_UINTPTR_T 1
12602_ACEOF
12603
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012604{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12605echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12606if test "${ac_cv_type_uintptr_t+set}" = set; then
12607 echo $ECHO_N "(cached) $ECHO_C" >&6
12608else
12609 cat >conftest.$ac_ext <<_ACEOF
12610/* confdefs.h. */
12611_ACEOF
12612cat confdefs.h >>conftest.$ac_ext
12613cat >>conftest.$ac_ext <<_ACEOF
12614/* end confdefs.h. */
12615$ac_includes_default
12616typedef uintptr_t ac__type_new_;
12617int
12618main ()
12619{
12620if ((ac__type_new_ *) 0)
12621 return 0;
12622if (sizeof (ac__type_new_))
12623 return 0;
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628rm -f conftest.$ac_objext
12629if { (ac_try="$ac_compile"
12630case "(($ac_try" in
12631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12632 *) ac_try_echo=$ac_try;;
12633esac
12634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12635 (eval "$ac_compile") 2>conftest.er1
12636 ac_status=$?
12637 grep -v '^ *+' conftest.er1 >conftest.err
12638 rm -f conftest.er1
12639 cat conftest.err >&5
12640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12641 (exit $ac_status); } && {
12642 test -z "$ac_c_werror_flag" ||
12643 test ! -s conftest.err
12644 } && test -s conftest.$ac_objext; then
12645 ac_cv_type_uintptr_t=yes
12646else
12647 echo "$as_me: failed program was:" >&5
12648sed 's/^/| /' conftest.$ac_ext >&5
12649
12650 ac_cv_type_uintptr_t=no
12651fi
12652
12653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12654fi
12655{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12656echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12657
Martin v. Löwiseba40652007-08-30 20:10:57 +000012658# The cast to long int works around a bug in the HP C Compiler
12659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12661# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012662{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12663echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012664if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012665 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012666else
Martin v. Löwis11437992002-04-12 09:54:03 +000012667 if test "$cross_compiling" = yes; then
12668 # Depending upon the size, compute the lo and hi bounds.
12669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012670/* confdefs.h. */
12671_ACEOF
12672cat confdefs.h >>conftest.$ac_ext
12673cat >>conftest.$ac_ext <<_ACEOF
12674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012675$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012676 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012677int
12678main ()
12679{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012680static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012681test_array [0] = 0
12682
12683 ;
12684 return 0;
12685}
12686_ACEOF
12687rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012688if { (ac_try="$ac_compile"
12689case "(($ac_try" in
12690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12691 *) ac_try_echo=$ac_try;;
12692esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012694 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012696 grep -v '^ *+' conftest.er1 >conftest.err
12697 rm -f conftest.er1
12698 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012700 (exit $ac_status); } && {
12701 test -z "$ac_c_werror_flag" ||
12702 test ! -s conftest.err
12703 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012704 ac_lo=0 ac_mid=0
12705 while :; do
12706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012707/* confdefs.h. */
12708_ACEOF
12709cat confdefs.h >>conftest.$ac_ext
12710cat >>conftest.$ac_ext <<_ACEOF
12711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012712$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012713 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012714int
12715main ()
12716{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012717static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012718test_array [0] = 0
12719
12720 ;
12721 return 0;
12722}
12723_ACEOF
12724rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012725if { (ac_try="$ac_compile"
12726case "(($ac_try" in
12727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12728 *) ac_try_echo=$ac_try;;
12729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012731 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012733 grep -v '^ *+' conftest.er1 >conftest.err
12734 rm -f conftest.er1
12735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012737 (exit $ac_status); } && {
12738 test -z "$ac_c_werror_flag" ||
12739 test ! -s conftest.err
12740 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012741 ac_hi=$ac_mid; break
12742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012744sed 's/^/| /' conftest.$ac_ext >&5
12745
Martin v. Löwiseba40652007-08-30 20:10:57 +000012746 ac_lo=`expr $ac_mid + 1`
12747 if test $ac_lo -le $ac_mid; then
12748 ac_lo= ac_hi=
12749 break
12750 fi
12751 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012753
12754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 done
12756else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012757 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012758sed 's/^/| /' conftest.$ac_ext >&5
12759
Martin v. Löwiseba40652007-08-30 20:10:57 +000012760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012761/* confdefs.h. */
12762_ACEOF
12763cat confdefs.h >>conftest.$ac_ext
12764cat >>conftest.$ac_ext <<_ACEOF
12765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012766$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012767 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012768int
12769main ()
12770{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012771static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012772test_array [0] = 0
12773
12774 ;
12775 return 0;
12776}
12777_ACEOF
12778rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012779if { (ac_try="$ac_compile"
12780case "(($ac_try" in
12781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12782 *) ac_try_echo=$ac_try;;
12783esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012785 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012787 grep -v '^ *+' conftest.er1 >conftest.err
12788 rm -f conftest.er1
12789 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012791 (exit $ac_status); } && {
12792 test -z "$ac_c_werror_flag" ||
12793 test ! -s conftest.err
12794 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012795 ac_hi=-1 ac_mid=-1
12796 while :; do
12797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012798/* confdefs.h. */
12799_ACEOF
12800cat confdefs.h >>conftest.$ac_ext
12801cat >>conftest.$ac_ext <<_ACEOF
12802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012803$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012804 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012805int
12806main ()
12807{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012808static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012809test_array [0] = 0
12810
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012816if { (ac_try="$ac_compile"
12817case "(($ac_try" in
12818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12819 *) ac_try_echo=$ac_try;;
12820esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012821eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012824 grep -v '^ *+' conftest.er1 >conftest.err
12825 rm -f conftest.er1
12826 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012828 (exit $ac_status); } && {
12829 test -z "$ac_c_werror_flag" ||
12830 test ! -s conftest.err
12831 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012832 ac_lo=$ac_mid; break
12833else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012835sed 's/^/| /' conftest.$ac_ext >&5
12836
Martin v. Löwiseba40652007-08-30 20:10:57 +000012837 ac_hi=`expr '(' $ac_mid ')' - 1`
12838 if test $ac_mid -le $ac_hi; then
12839 ac_lo= ac_hi=
12840 break
12841 fi
12842 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012843fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012844
12845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 done
12847else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Martin v. Löwiseba40652007-08-30 20:10:57 +000012851 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012853
12854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012855fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012856
12857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012858# Binary search between lo and hi bounds.
12859while test "x$ac_lo" != "x$ac_hi"; do
12860 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12861 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012862/* confdefs.h. */
12863_ACEOF
12864cat confdefs.h >>conftest.$ac_ext
12865cat >>conftest.$ac_ext <<_ACEOF
12866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012867$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012868 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012869int
12870main ()
12871{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012872static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012873test_array [0] = 0
12874
12875 ;
12876 return 0;
12877}
12878_ACEOF
12879rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012880if { (ac_try="$ac_compile"
12881case "(($ac_try" in
12882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12883 *) ac_try_echo=$ac_try;;
12884esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012885eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012888 grep -v '^ *+' conftest.er1 >conftest.err
12889 rm -f conftest.er1
12890 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012892 (exit $ac_status); } && {
12893 test -z "$ac_c_werror_flag" ||
12894 test ! -s conftest.err
12895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_hi=$ac_mid
12897else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012899sed 's/^/| /' conftest.$ac_ext >&5
12900
Martin v. Löwiseba40652007-08-30 20:10:57 +000012901 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012903
12904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012905done
12906case $ac_lo in
12907?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012908'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012909 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012910See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012911echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012912See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012913 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012914 else
12915 ac_cv_sizeof_uintptr_t=0
12916 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012917esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012918else
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012920/* confdefs.h. */
12921_ACEOF
12922cat confdefs.h >>conftest.$ac_ext
12923cat >>conftest.$ac_ext <<_ACEOF
12924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012925$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012926 typedef uintptr_t ac__type_sizeof_;
12927static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12928static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012929#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012930#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012931int
12932main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012933{
Martin v. Löwis11437992002-04-12 09:54:03 +000012934
12935 FILE *f = fopen ("conftest.val", "w");
12936 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012937 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012938 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012940 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012941 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012942 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012943 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 }
12945 else
12946 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012947 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012948 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012949 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012950 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012952 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012953
12954 ;
12955 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012956}
Martin v. Löwis11437992002-04-12 09:54:03 +000012957_ACEOF
12958rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012959if { (ac_try="$ac_link"
12960case "(($ac_try" in
12961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12962 *) ac_try_echo=$ac_try;;
12963esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012965 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012969 { (case "(($ac_try" in
12970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12971 *) ac_try_echo=$ac_try;;
12972esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012974 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012975 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012977 (exit $ac_status); }; }; then
12978 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012979else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012980 echo "$as_me: program exited with status $ac_status" >&5
12981echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012982sed 's/^/| /' conftest.$ac_ext >&5
12983
Martin v. Löwis11437992002-04-12 09:54:03 +000012984( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012985if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012986 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012987See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012988echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012989See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012990 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012991 else
12992 ac_cv_sizeof_uintptr_t=0
12993 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012994fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012995rm -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 +000012996fi
12997rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012998fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012999{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13000echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013001
13002
13003
Martin v. Löwis11437992002-04-12 09:54:03 +000013004cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013005#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013006_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013007
Michael W. Hudson54241132001-12-07 15:38:26 +000013008
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013009fi
13010
Martin v. Löwisebe26702006-10-02 14:55:51 +000013011
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013012{ echo "$as_me:$LINENO: checking for off_t" >&5
13013echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13014if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013016else
Martin v. Löwis11437992002-04-12 09:54:03 +000013017 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013018/* confdefs.h. */
13019_ACEOF
13020cat confdefs.h >>conftest.$ac_ext
13021cat >>conftest.$ac_ext <<_ACEOF
13022/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013023
13024#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013025#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013026#endif
13027
13028
13029typedef off_t ac__type_new_;
13030int
13031main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013032{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013033if ((ac__type_new_ *) 0)
13034 return 0;
13035if (sizeof (ac__type_new_))
13036 return 0;
13037 ;
13038 return 0;
13039}
13040_ACEOF
13041rm -f conftest.$ac_objext
13042if { (ac_try="$ac_compile"
13043case "(($ac_try" in
13044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13045 *) ac_try_echo=$ac_try;;
13046esac
13047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13048 (eval "$ac_compile") 2>conftest.er1
13049 ac_status=$?
13050 grep -v '^ *+' conftest.er1 >conftest.err
13051 rm -f conftest.er1
13052 cat conftest.err >&5
13053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13054 (exit $ac_status); } && {
13055 test -z "$ac_c_werror_flag" ||
13056 test ! -s conftest.err
13057 } && test -s conftest.$ac_objext; then
13058 ac_cv_type_off_t=yes
13059else
13060 echo "$as_me: failed program was:" >&5
13061sed 's/^/| /' conftest.$ac_ext >&5
13062
13063 ac_cv_type_off_t=no
13064fi
13065
13066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13067fi
13068{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13069echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13070
13071# The cast to long int works around a bug in the HP C Compiler
13072# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13073# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13074# This bug is HP SR number 8606223364.
13075{ echo "$as_me:$LINENO: checking size of off_t" >&5
13076echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13077if test "${ac_cv_sizeof_off_t+set}" = set; then
13078 echo $ECHO_N "(cached) $ECHO_C" >&6
13079else
13080 if test "$cross_compiling" = yes; then
13081 # Depending upon the size, compute the lo and hi bounds.
13082cat >conftest.$ac_ext <<_ACEOF
13083/* confdefs.h. */
13084_ACEOF
13085cat confdefs.h >>conftest.$ac_ext
13086cat >>conftest.$ac_ext <<_ACEOF
13087/* end confdefs.h. */
13088
13089#ifdef HAVE_SYS_TYPES_H
13090#include <sys/types.h>
13091#endif
13092
13093
13094 typedef off_t ac__type_sizeof_;
13095int
13096main ()
13097{
13098static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13099test_array [0] = 0
13100
13101 ;
13102 return 0;
13103}
13104_ACEOF
13105rm -f conftest.$ac_objext
13106if { (ac_try="$ac_compile"
13107case "(($ac_try" in
13108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13109 *) ac_try_echo=$ac_try;;
13110esac
13111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13112 (eval "$ac_compile") 2>conftest.er1
13113 ac_status=$?
13114 grep -v '^ *+' conftest.er1 >conftest.err
13115 rm -f conftest.er1
13116 cat conftest.err >&5
13117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13118 (exit $ac_status); } && {
13119 test -z "$ac_c_werror_flag" ||
13120 test ! -s conftest.err
13121 } && test -s conftest.$ac_objext; then
13122 ac_lo=0 ac_mid=0
13123 while :; do
13124 cat >conftest.$ac_ext <<_ACEOF
13125/* confdefs.h. */
13126_ACEOF
13127cat confdefs.h >>conftest.$ac_ext
13128cat >>conftest.$ac_ext <<_ACEOF
13129/* end confdefs.h. */
13130
13131#ifdef HAVE_SYS_TYPES_H
13132#include <sys/types.h>
13133#endif
13134
13135
13136 typedef off_t ac__type_sizeof_;
13137int
13138main ()
13139{
13140static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13141test_array [0] = 0
13142
13143 ;
13144 return 0;
13145}
13146_ACEOF
13147rm -f conftest.$ac_objext
13148if { (ac_try="$ac_compile"
13149case "(($ac_try" in
13150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13151 *) ac_try_echo=$ac_try;;
13152esac
13153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13154 (eval "$ac_compile") 2>conftest.er1
13155 ac_status=$?
13156 grep -v '^ *+' conftest.er1 >conftest.err
13157 rm -f conftest.er1
13158 cat conftest.err >&5
13159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13160 (exit $ac_status); } && {
13161 test -z "$ac_c_werror_flag" ||
13162 test ! -s conftest.err
13163 } && test -s conftest.$ac_objext; then
13164 ac_hi=$ac_mid; break
13165else
13166 echo "$as_me: failed program was:" >&5
13167sed 's/^/| /' conftest.$ac_ext >&5
13168
13169 ac_lo=`expr $ac_mid + 1`
13170 if test $ac_lo -le $ac_mid; then
13171 ac_lo= ac_hi=
13172 break
13173 fi
13174 ac_mid=`expr 2 '*' $ac_mid + 1`
13175fi
13176
13177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13178 done
13179else
13180 echo "$as_me: failed program was:" >&5
13181sed 's/^/| /' conftest.$ac_ext >&5
13182
13183 cat >conftest.$ac_ext <<_ACEOF
13184/* confdefs.h. */
13185_ACEOF
13186cat confdefs.h >>conftest.$ac_ext
13187cat >>conftest.$ac_ext <<_ACEOF
13188/* end confdefs.h. */
13189
13190#ifdef HAVE_SYS_TYPES_H
13191#include <sys/types.h>
13192#endif
13193
13194
13195 typedef off_t ac__type_sizeof_;
13196int
13197main ()
13198{
13199static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13200test_array [0] = 0
13201
13202 ;
13203 return 0;
13204}
13205_ACEOF
13206rm -f conftest.$ac_objext
13207if { (ac_try="$ac_compile"
13208case "(($ac_try" in
13209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13210 *) ac_try_echo=$ac_try;;
13211esac
13212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13213 (eval "$ac_compile") 2>conftest.er1
13214 ac_status=$?
13215 grep -v '^ *+' conftest.er1 >conftest.err
13216 rm -f conftest.er1
13217 cat conftest.err >&5
13218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13219 (exit $ac_status); } && {
13220 test -z "$ac_c_werror_flag" ||
13221 test ! -s conftest.err
13222 } && test -s conftest.$ac_objext; then
13223 ac_hi=-1 ac_mid=-1
13224 while :; do
13225 cat >conftest.$ac_ext <<_ACEOF
13226/* confdefs.h. */
13227_ACEOF
13228cat confdefs.h >>conftest.$ac_ext
13229cat >>conftest.$ac_ext <<_ACEOF
13230/* end confdefs.h. */
13231
13232#ifdef HAVE_SYS_TYPES_H
13233#include <sys/types.h>
13234#endif
13235
13236
13237 typedef off_t ac__type_sizeof_;
13238int
13239main ()
13240{
13241static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13242test_array [0] = 0
13243
13244 ;
13245 return 0;
13246}
13247_ACEOF
13248rm -f conftest.$ac_objext
13249if { (ac_try="$ac_compile"
13250case "(($ac_try" in
13251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13252 *) ac_try_echo=$ac_try;;
13253esac
13254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13255 (eval "$ac_compile") 2>conftest.er1
13256 ac_status=$?
13257 grep -v '^ *+' conftest.er1 >conftest.err
13258 rm -f conftest.er1
13259 cat conftest.err >&5
13260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13261 (exit $ac_status); } && {
13262 test -z "$ac_c_werror_flag" ||
13263 test ! -s conftest.err
13264 } && test -s conftest.$ac_objext; then
13265 ac_lo=$ac_mid; break
13266else
13267 echo "$as_me: failed program was:" >&5
13268sed 's/^/| /' conftest.$ac_ext >&5
13269
13270 ac_hi=`expr '(' $ac_mid ')' - 1`
13271 if test $ac_mid -le $ac_hi; then
13272 ac_lo= ac_hi=
13273 break
13274 fi
13275 ac_mid=`expr 2 '*' $ac_mid`
13276fi
13277
13278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13279 done
13280else
13281 echo "$as_me: failed program was:" >&5
13282sed 's/^/| /' conftest.$ac_ext >&5
13283
13284 ac_lo= ac_hi=
13285fi
13286
13287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13288fi
13289
13290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13291# Binary search between lo and hi bounds.
13292while test "x$ac_lo" != "x$ac_hi"; do
13293 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13294 cat >conftest.$ac_ext <<_ACEOF
13295/* confdefs.h. */
13296_ACEOF
13297cat confdefs.h >>conftest.$ac_ext
13298cat >>conftest.$ac_ext <<_ACEOF
13299/* end confdefs.h. */
13300
13301#ifdef HAVE_SYS_TYPES_H
13302#include <sys/types.h>
13303#endif
13304
13305
13306 typedef off_t ac__type_sizeof_;
13307int
13308main ()
13309{
13310static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13311test_array [0] = 0
13312
13313 ;
13314 return 0;
13315}
13316_ACEOF
13317rm -f conftest.$ac_objext
13318if { (ac_try="$ac_compile"
13319case "(($ac_try" in
13320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13321 *) ac_try_echo=$ac_try;;
13322esac
13323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13324 (eval "$ac_compile") 2>conftest.er1
13325 ac_status=$?
13326 grep -v '^ *+' conftest.er1 >conftest.err
13327 rm -f conftest.er1
13328 cat conftest.err >&5
13329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13330 (exit $ac_status); } && {
13331 test -z "$ac_c_werror_flag" ||
13332 test ! -s conftest.err
13333 } && test -s conftest.$ac_objext; then
13334 ac_hi=$ac_mid
13335else
13336 echo "$as_me: failed program was:" >&5
13337sed 's/^/| /' conftest.$ac_ext >&5
13338
13339 ac_lo=`expr '(' $ac_mid ')' + 1`
13340fi
13341
13342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13343done
13344case $ac_lo in
13345?*) ac_cv_sizeof_off_t=$ac_lo;;
13346'') if test "$ac_cv_type_off_t" = yes; then
13347 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13348See \`config.log' for more details." >&5
13349echo "$as_me: error: cannot compute sizeof (off_t)
13350See \`config.log' for more details." >&2;}
13351 { (exit 77); exit 77; }; }
13352 else
13353 ac_cv_sizeof_off_t=0
13354 fi ;;
13355esac
13356else
13357 cat >conftest.$ac_ext <<_ACEOF
13358/* confdefs.h. */
13359_ACEOF
13360cat confdefs.h >>conftest.$ac_ext
13361cat >>conftest.$ac_ext <<_ACEOF
13362/* end confdefs.h. */
13363
13364#ifdef HAVE_SYS_TYPES_H
13365#include <sys/types.h>
13366#endif
13367
13368
13369 typedef off_t ac__type_sizeof_;
13370static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13371static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13372#include <stdio.h>
13373#include <stdlib.h>
13374int
13375main ()
13376{
13377
13378 FILE *f = fopen ("conftest.val", "w");
13379 if (! f)
13380 return 1;
13381 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13382 {
13383 long int i = longval ();
13384 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13385 return 1;
13386 fprintf (f, "%ld\n", i);
13387 }
13388 else
13389 {
13390 unsigned long int i = ulongval ();
13391 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13392 return 1;
13393 fprintf (f, "%lu\n", i);
13394 }
13395 return ferror (f) || fclose (f) != 0;
13396
13397 ;
13398 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013399}
Martin v. Löwis11437992002-04-12 09:54:03 +000013400_ACEOF
13401rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013402if { (ac_try="$ac_link"
13403case "(($ac_try" in
13404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13405 *) ac_try_echo=$ac_try;;
13406esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013408 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013411 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013412 { (case "(($ac_try" in
13413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13414 *) ac_try_echo=$ac_try;;
13415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013417 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013421 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013422else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013423 echo "$as_me: program exited with status $ac_status" >&5
13424echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013425sed 's/^/| /' conftest.$ac_ext >&5
13426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013428if test "$ac_cv_type_off_t" = yes; then
13429 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13430See \`config.log' for more details." >&5
13431echo "$as_me: error: cannot compute sizeof (off_t)
13432See \`config.log' for more details." >&2;}
13433 { (exit 77); exit 77; }; }
13434 else
13435 ac_cv_sizeof_off_t=0
13436 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013438rm -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 +000013439fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013440rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013441fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013442{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13443echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013445
13446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013448#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013449_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013450
Michael W. Hudson54241132001-12-07 15:38:26 +000013451
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013453{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13454echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013455if test "$have_long_long" = yes -a \
13456 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13457 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459cat >>confdefs.h <<\_ACEOF
13460#define HAVE_LARGEFILE_SUPPORT 1
13461_ACEOF
13462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013463 { echo "$as_me:$LINENO: result: yes" >&5
13464echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013465else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013466 { echo "$as_me:$LINENO: result: no" >&5
13467echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013468fi
13469
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013470{ echo "$as_me:$LINENO: checking for time_t" >&5
13471echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13472if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013474else
Martin v. Löwis11437992002-04-12 09:54:03 +000013475 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013476/* confdefs.h. */
13477_ACEOF
13478cat confdefs.h >>conftest.$ac_ext
13479cat >>conftest.$ac_ext <<_ACEOF
13480/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013481
13482#ifdef HAVE_SYS_TYPES_H
13483#include <sys/types.h>
13484#endif
13485#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013486#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013487#endif
13488
13489
13490typedef time_t ac__type_new_;
13491int
13492main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013493{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013494if ((ac__type_new_ *) 0)
13495 return 0;
13496if (sizeof (ac__type_new_))
13497 return 0;
13498 ;
13499 return 0;
13500}
13501_ACEOF
13502rm -f conftest.$ac_objext
13503if { (ac_try="$ac_compile"
13504case "(($ac_try" in
13505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13506 *) ac_try_echo=$ac_try;;
13507esac
13508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13509 (eval "$ac_compile") 2>conftest.er1
13510 ac_status=$?
13511 grep -v '^ *+' conftest.er1 >conftest.err
13512 rm -f conftest.er1
13513 cat conftest.err >&5
13514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13515 (exit $ac_status); } && {
13516 test -z "$ac_c_werror_flag" ||
13517 test ! -s conftest.err
13518 } && test -s conftest.$ac_objext; then
13519 ac_cv_type_time_t=yes
13520else
13521 echo "$as_me: failed program was:" >&5
13522sed 's/^/| /' conftest.$ac_ext >&5
13523
13524 ac_cv_type_time_t=no
13525fi
13526
13527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13528fi
13529{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13530echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13531
13532# The cast to long int works around a bug in the HP C Compiler
13533# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13534# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13535# This bug is HP SR number 8606223364.
13536{ echo "$as_me:$LINENO: checking size of time_t" >&5
13537echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13538if test "${ac_cv_sizeof_time_t+set}" = set; then
13539 echo $ECHO_N "(cached) $ECHO_C" >&6
13540else
13541 if test "$cross_compiling" = yes; then
13542 # Depending upon the size, compute the lo and hi bounds.
13543cat >conftest.$ac_ext <<_ACEOF
13544/* confdefs.h. */
13545_ACEOF
13546cat confdefs.h >>conftest.$ac_ext
13547cat >>conftest.$ac_ext <<_ACEOF
13548/* end confdefs.h. */
13549
13550#ifdef HAVE_SYS_TYPES_H
13551#include <sys/types.h>
13552#endif
13553#ifdef HAVE_TIME_H
13554#include <time.h>
13555#endif
13556
13557
13558 typedef time_t ac__type_sizeof_;
13559int
13560main ()
13561{
13562static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13563test_array [0] = 0
13564
13565 ;
13566 return 0;
13567}
13568_ACEOF
13569rm -f conftest.$ac_objext
13570if { (ac_try="$ac_compile"
13571case "(($ac_try" in
13572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13573 *) ac_try_echo=$ac_try;;
13574esac
13575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13576 (eval "$ac_compile") 2>conftest.er1
13577 ac_status=$?
13578 grep -v '^ *+' conftest.er1 >conftest.err
13579 rm -f conftest.er1
13580 cat conftest.err >&5
13581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13582 (exit $ac_status); } && {
13583 test -z "$ac_c_werror_flag" ||
13584 test ! -s conftest.err
13585 } && test -s conftest.$ac_objext; then
13586 ac_lo=0 ac_mid=0
13587 while :; do
13588 cat >conftest.$ac_ext <<_ACEOF
13589/* confdefs.h. */
13590_ACEOF
13591cat confdefs.h >>conftest.$ac_ext
13592cat >>conftest.$ac_ext <<_ACEOF
13593/* end confdefs.h. */
13594
13595#ifdef HAVE_SYS_TYPES_H
13596#include <sys/types.h>
13597#endif
13598#ifdef HAVE_TIME_H
13599#include <time.h>
13600#endif
13601
13602
13603 typedef time_t ac__type_sizeof_;
13604int
13605main ()
13606{
13607static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13608test_array [0] = 0
13609
13610 ;
13611 return 0;
13612}
13613_ACEOF
13614rm -f conftest.$ac_objext
13615if { (ac_try="$ac_compile"
13616case "(($ac_try" in
13617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13618 *) ac_try_echo=$ac_try;;
13619esac
13620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13621 (eval "$ac_compile") 2>conftest.er1
13622 ac_status=$?
13623 grep -v '^ *+' conftest.er1 >conftest.err
13624 rm -f conftest.er1
13625 cat conftest.err >&5
13626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13627 (exit $ac_status); } && {
13628 test -z "$ac_c_werror_flag" ||
13629 test ! -s conftest.err
13630 } && test -s conftest.$ac_objext; then
13631 ac_hi=$ac_mid; break
13632else
13633 echo "$as_me: failed program was:" >&5
13634sed 's/^/| /' conftest.$ac_ext >&5
13635
13636 ac_lo=`expr $ac_mid + 1`
13637 if test $ac_lo -le $ac_mid; then
13638 ac_lo= ac_hi=
13639 break
13640 fi
13641 ac_mid=`expr 2 '*' $ac_mid + 1`
13642fi
13643
13644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13645 done
13646else
13647 echo "$as_me: failed program was:" >&5
13648sed 's/^/| /' conftest.$ac_ext >&5
13649
13650 cat >conftest.$ac_ext <<_ACEOF
13651/* confdefs.h. */
13652_ACEOF
13653cat confdefs.h >>conftest.$ac_ext
13654cat >>conftest.$ac_ext <<_ACEOF
13655/* end confdefs.h. */
13656
13657#ifdef HAVE_SYS_TYPES_H
13658#include <sys/types.h>
13659#endif
13660#ifdef HAVE_TIME_H
13661#include <time.h>
13662#endif
13663
13664
13665 typedef time_t ac__type_sizeof_;
13666int
13667main ()
13668{
13669static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13670test_array [0] = 0
13671
13672 ;
13673 return 0;
13674}
13675_ACEOF
13676rm -f conftest.$ac_objext
13677if { (ac_try="$ac_compile"
13678case "(($ac_try" in
13679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13680 *) ac_try_echo=$ac_try;;
13681esac
13682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13683 (eval "$ac_compile") 2>conftest.er1
13684 ac_status=$?
13685 grep -v '^ *+' conftest.er1 >conftest.err
13686 rm -f conftest.er1
13687 cat conftest.err >&5
13688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13689 (exit $ac_status); } && {
13690 test -z "$ac_c_werror_flag" ||
13691 test ! -s conftest.err
13692 } && test -s conftest.$ac_objext; then
13693 ac_hi=-1 ac_mid=-1
13694 while :; do
13695 cat >conftest.$ac_ext <<_ACEOF
13696/* confdefs.h. */
13697_ACEOF
13698cat confdefs.h >>conftest.$ac_ext
13699cat >>conftest.$ac_ext <<_ACEOF
13700/* end confdefs.h. */
13701
13702#ifdef HAVE_SYS_TYPES_H
13703#include <sys/types.h>
13704#endif
13705#ifdef HAVE_TIME_H
13706#include <time.h>
13707#endif
13708
13709
13710 typedef time_t ac__type_sizeof_;
13711int
13712main ()
13713{
13714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13715test_array [0] = 0
13716
13717 ;
13718 return 0;
13719}
13720_ACEOF
13721rm -f conftest.$ac_objext
13722if { (ac_try="$ac_compile"
13723case "(($ac_try" in
13724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13725 *) ac_try_echo=$ac_try;;
13726esac
13727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13728 (eval "$ac_compile") 2>conftest.er1
13729 ac_status=$?
13730 grep -v '^ *+' conftest.er1 >conftest.err
13731 rm -f conftest.er1
13732 cat conftest.err >&5
13733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); } && {
13735 test -z "$ac_c_werror_flag" ||
13736 test ! -s conftest.err
13737 } && test -s conftest.$ac_objext; then
13738 ac_lo=$ac_mid; break
13739else
13740 echo "$as_me: failed program was:" >&5
13741sed 's/^/| /' conftest.$ac_ext >&5
13742
13743 ac_hi=`expr '(' $ac_mid ')' - 1`
13744 if test $ac_mid -le $ac_hi; then
13745 ac_lo= ac_hi=
13746 break
13747 fi
13748 ac_mid=`expr 2 '*' $ac_mid`
13749fi
13750
13751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13752 done
13753else
13754 echo "$as_me: failed program was:" >&5
13755sed 's/^/| /' conftest.$ac_ext >&5
13756
13757 ac_lo= ac_hi=
13758fi
13759
13760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13761fi
13762
13763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13764# Binary search between lo and hi bounds.
13765while test "x$ac_lo" != "x$ac_hi"; do
13766 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13767 cat >conftest.$ac_ext <<_ACEOF
13768/* confdefs.h. */
13769_ACEOF
13770cat confdefs.h >>conftest.$ac_ext
13771cat >>conftest.$ac_ext <<_ACEOF
13772/* end confdefs.h. */
13773
13774#ifdef HAVE_SYS_TYPES_H
13775#include <sys/types.h>
13776#endif
13777#ifdef HAVE_TIME_H
13778#include <time.h>
13779#endif
13780
13781
13782 typedef time_t ac__type_sizeof_;
13783int
13784main ()
13785{
13786static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13787test_array [0] = 0
13788
13789 ;
13790 return 0;
13791}
13792_ACEOF
13793rm -f conftest.$ac_objext
13794if { (ac_try="$ac_compile"
13795case "(($ac_try" in
13796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13797 *) ac_try_echo=$ac_try;;
13798esac
13799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13800 (eval "$ac_compile") 2>conftest.er1
13801 ac_status=$?
13802 grep -v '^ *+' conftest.er1 >conftest.err
13803 rm -f conftest.er1
13804 cat conftest.err >&5
13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13806 (exit $ac_status); } && {
13807 test -z "$ac_c_werror_flag" ||
13808 test ! -s conftest.err
13809 } && test -s conftest.$ac_objext; then
13810 ac_hi=$ac_mid
13811else
13812 echo "$as_me: failed program was:" >&5
13813sed 's/^/| /' conftest.$ac_ext >&5
13814
13815 ac_lo=`expr '(' $ac_mid ')' + 1`
13816fi
13817
13818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13819done
13820case $ac_lo in
13821?*) ac_cv_sizeof_time_t=$ac_lo;;
13822'') if test "$ac_cv_type_time_t" = yes; then
13823 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13824See \`config.log' for more details." >&5
13825echo "$as_me: error: cannot compute sizeof (time_t)
13826See \`config.log' for more details." >&2;}
13827 { (exit 77); exit 77; }; }
13828 else
13829 ac_cv_sizeof_time_t=0
13830 fi ;;
13831esac
13832else
13833 cat >conftest.$ac_ext <<_ACEOF
13834/* confdefs.h. */
13835_ACEOF
13836cat confdefs.h >>conftest.$ac_ext
13837cat >>conftest.$ac_ext <<_ACEOF
13838/* end confdefs.h. */
13839
13840#ifdef HAVE_SYS_TYPES_H
13841#include <sys/types.h>
13842#endif
13843#ifdef HAVE_TIME_H
13844#include <time.h>
13845#endif
13846
13847
13848 typedef time_t ac__type_sizeof_;
13849static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13850static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13851#include <stdio.h>
13852#include <stdlib.h>
13853int
13854main ()
13855{
13856
13857 FILE *f = fopen ("conftest.val", "w");
13858 if (! f)
13859 return 1;
13860 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13861 {
13862 long int i = longval ();
13863 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13864 return 1;
13865 fprintf (f, "%ld\n", i);
13866 }
13867 else
13868 {
13869 unsigned long int i = ulongval ();
13870 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13871 return 1;
13872 fprintf (f, "%lu\n", i);
13873 }
13874 return ferror (f) || fclose (f) != 0;
13875
13876 ;
13877 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013878}
Martin v. Löwis11437992002-04-12 09:54:03 +000013879_ACEOF
13880rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013881if { (ac_try="$ac_link"
13882case "(($ac_try" in
13883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13884 *) ac_try_echo=$ac_try;;
13885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013887 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013888 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013891 { (case "(($ac_try" in
13892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13893 *) ac_try_echo=$ac_try;;
13894esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013896 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013897 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013900 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013901else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013902 echo "$as_me: program exited with status $ac_status" >&5
13903echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013904sed 's/^/| /' conftest.$ac_ext >&5
13905
Martin v. Löwis11437992002-04-12 09:54:03 +000013906( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013907if test "$ac_cv_type_time_t" = yes; then
13908 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13909See \`config.log' for more details." >&5
13910echo "$as_me: error: cannot compute sizeof (time_t)
13911See \`config.log' for more details." >&2;}
13912 { (exit 77); exit 77; }; }
13913 else
13914 ac_cv_sizeof_time_t=0
13915 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013916fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013917rm -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 +000013918fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013919rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013920fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013921{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13922echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013923
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013924
13925
Martin v. Löwis11437992002-04-12 09:54:03 +000013926cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013927#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013928_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013929
Michael W. Hudson54241132001-12-07 15:38:26 +000013930
13931
Trent Mick635f6fb2000-08-23 21:33:05 +000013932# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013933ac_save_cc="$CC"
13934if test "$ac_cv_kpthread" = "yes"
13935then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013936elif test "$ac_cv_kthread" = "yes"
13937then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013938elif test "$ac_cv_pthread" = "yes"
13939then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013940fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013941{ echo "$as_me:$LINENO: checking for pthread_t" >&5
13942echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013943have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013945/* confdefs.h. */
13946_ACEOF
13947cat confdefs.h >>conftest.$ac_ext
13948cat >>conftest.$ac_ext <<_ACEOF
13949/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013950#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013951int
13952main ()
13953{
Guido van Rossum12580492000-09-24 16:47:19 +000013954pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013955 ;
13956 return 0;
13957}
13958_ACEOF
13959rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013960if { (ac_try="$ac_compile"
13961case "(($ac_try" in
13962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13963 *) ac_try_echo=$ac_try;;
13964esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013966 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013968 grep -v '^ *+' conftest.er1 >conftest.err
13969 rm -f conftest.er1
13970 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013972 (exit $ac_status); } && {
13973 test -z "$ac_c_werror_flag" ||
13974 test ! -s conftest.err
13975 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013976 have_pthread_t=yes
13977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013979sed 's/^/| /' conftest.$ac_ext >&5
13980
Martin v. Löwiseba40652007-08-30 20:10:57 +000013981
Trent Mick635f6fb2000-08-23 21:33:05 +000013982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013983
13984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013985{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13986echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013987if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013988 { echo "$as_me:$LINENO: checking for pthread_t" >&5
13989echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
13990if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013991 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013992else
Martin v. Löwis11437992002-04-12 09:54:03 +000013993 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013994/* confdefs.h. */
13995_ACEOF
13996cat confdefs.h >>conftest.$ac_ext
13997cat >>conftest.$ac_ext <<_ACEOF
13998/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013999
14000#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014001#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014002#endif
14003
14004
14005typedef pthread_t ac__type_new_;
14006int
14007main ()
14008{
14009if ((ac__type_new_ *) 0)
14010 return 0;
14011if (sizeof (ac__type_new_))
14012 return 0;
14013 ;
14014 return 0;
14015}
14016_ACEOF
14017rm -f conftest.$ac_objext
14018if { (ac_try="$ac_compile"
14019case "(($ac_try" in
14020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14021 *) ac_try_echo=$ac_try;;
14022esac
14023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14024 (eval "$ac_compile") 2>conftest.er1
14025 ac_status=$?
14026 grep -v '^ *+' conftest.er1 >conftest.err
14027 rm -f conftest.er1
14028 cat conftest.err >&5
14029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14030 (exit $ac_status); } && {
14031 test -z "$ac_c_werror_flag" ||
14032 test ! -s conftest.err
14033 } && test -s conftest.$ac_objext; then
14034 ac_cv_type_pthread_t=yes
14035else
14036 echo "$as_me: failed program was:" >&5
14037sed 's/^/| /' conftest.$ac_ext >&5
14038
14039 ac_cv_type_pthread_t=no
14040fi
14041
14042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14043fi
14044{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14045echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14046
14047# The cast to long int works around a bug in the HP C Compiler
14048# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14049# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14050# This bug is HP SR number 8606223364.
14051{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14052echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14053if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14054 echo $ECHO_N "(cached) $ECHO_C" >&6
14055else
14056 if test "$cross_compiling" = yes; then
14057 # Depending upon the size, compute the lo and hi bounds.
14058cat >conftest.$ac_ext <<_ACEOF
14059/* confdefs.h. */
14060_ACEOF
14061cat confdefs.h >>conftest.$ac_ext
14062cat >>conftest.$ac_ext <<_ACEOF
14063/* end confdefs.h. */
14064
14065#ifdef HAVE_PTHREAD_H
14066#include <pthread.h>
14067#endif
14068
14069
14070 typedef pthread_t ac__type_sizeof_;
14071int
14072main ()
14073{
14074static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14075test_array [0] = 0
14076
14077 ;
14078 return 0;
14079}
14080_ACEOF
14081rm -f conftest.$ac_objext
14082if { (ac_try="$ac_compile"
14083case "(($ac_try" in
14084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14085 *) ac_try_echo=$ac_try;;
14086esac
14087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14088 (eval "$ac_compile") 2>conftest.er1
14089 ac_status=$?
14090 grep -v '^ *+' conftest.er1 >conftest.err
14091 rm -f conftest.er1
14092 cat conftest.err >&5
14093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14094 (exit $ac_status); } && {
14095 test -z "$ac_c_werror_flag" ||
14096 test ! -s conftest.err
14097 } && test -s conftest.$ac_objext; then
14098 ac_lo=0 ac_mid=0
14099 while :; do
14100 cat >conftest.$ac_ext <<_ACEOF
14101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
14106
14107#ifdef HAVE_PTHREAD_H
14108#include <pthread.h>
14109#endif
14110
14111
14112 typedef pthread_t ac__type_sizeof_;
14113int
14114main ()
14115{
14116static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14117test_array [0] = 0
14118
14119 ;
14120 return 0;
14121}
14122_ACEOF
14123rm -f conftest.$ac_objext
14124if { (ac_try="$ac_compile"
14125case "(($ac_try" in
14126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14127 *) ac_try_echo=$ac_try;;
14128esac
14129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14130 (eval "$ac_compile") 2>conftest.er1
14131 ac_status=$?
14132 grep -v '^ *+' conftest.er1 >conftest.err
14133 rm -f conftest.er1
14134 cat conftest.err >&5
14135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14136 (exit $ac_status); } && {
14137 test -z "$ac_c_werror_flag" ||
14138 test ! -s conftest.err
14139 } && test -s conftest.$ac_objext; then
14140 ac_hi=$ac_mid; break
14141else
14142 echo "$as_me: failed program was:" >&5
14143sed 's/^/| /' conftest.$ac_ext >&5
14144
14145 ac_lo=`expr $ac_mid + 1`
14146 if test $ac_lo -le $ac_mid; then
14147 ac_lo= ac_hi=
14148 break
14149 fi
14150 ac_mid=`expr 2 '*' $ac_mid + 1`
14151fi
14152
14153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14154 done
14155else
14156 echo "$as_me: failed program was:" >&5
14157sed 's/^/| /' conftest.$ac_ext >&5
14158
14159 cat >conftest.$ac_ext <<_ACEOF
14160/* confdefs.h. */
14161_ACEOF
14162cat confdefs.h >>conftest.$ac_ext
14163cat >>conftest.$ac_ext <<_ACEOF
14164/* end confdefs.h. */
14165
14166#ifdef HAVE_PTHREAD_H
14167#include <pthread.h>
14168#endif
14169
14170
14171 typedef pthread_t ac__type_sizeof_;
14172int
14173main ()
14174{
14175static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14176test_array [0] = 0
14177
14178 ;
14179 return 0;
14180}
14181_ACEOF
14182rm -f conftest.$ac_objext
14183if { (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
14190 ac_status=$?
14191 grep -v '^ *+' conftest.er1 >conftest.err
14192 rm -f conftest.er1
14193 cat conftest.err >&5
14194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14195 (exit $ac_status); } && {
14196 test -z "$ac_c_werror_flag" ||
14197 test ! -s conftest.err
14198 } && test -s conftest.$ac_objext; then
14199 ac_hi=-1 ac_mid=-1
14200 while :; do
14201 cat >conftest.$ac_ext <<_ACEOF
14202/* confdefs.h. */
14203_ACEOF
14204cat confdefs.h >>conftest.$ac_ext
14205cat >>conftest.$ac_ext <<_ACEOF
14206/* end confdefs.h. */
14207
14208#ifdef HAVE_PTHREAD_H
14209#include <pthread.h>
14210#endif
14211
14212
14213 typedef pthread_t ac__type_sizeof_;
14214int
14215main ()
14216{
14217static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14218test_array [0] = 0
14219
14220 ;
14221 return 0;
14222}
14223_ACEOF
14224rm -f conftest.$ac_objext
14225if { (ac_try="$ac_compile"
14226case "(($ac_try" in
14227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14228 *) ac_try_echo=$ac_try;;
14229esac
14230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14231 (eval "$ac_compile") 2>conftest.er1
14232 ac_status=$?
14233 grep -v '^ *+' conftest.er1 >conftest.err
14234 rm -f conftest.er1
14235 cat conftest.err >&5
14236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14237 (exit $ac_status); } && {
14238 test -z "$ac_c_werror_flag" ||
14239 test ! -s conftest.err
14240 } && test -s conftest.$ac_objext; then
14241 ac_lo=$ac_mid; break
14242else
14243 echo "$as_me: failed program was:" >&5
14244sed 's/^/| /' conftest.$ac_ext >&5
14245
14246 ac_hi=`expr '(' $ac_mid ')' - 1`
14247 if test $ac_mid -le $ac_hi; then
14248 ac_lo= ac_hi=
14249 break
14250 fi
14251 ac_mid=`expr 2 '*' $ac_mid`
14252fi
14253
14254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14255 done
14256else
14257 echo "$as_me: failed program was:" >&5
14258sed 's/^/| /' conftest.$ac_ext >&5
14259
14260 ac_lo= ac_hi=
14261fi
14262
14263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14264fi
14265
14266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267# Binary search between lo and hi bounds.
14268while test "x$ac_lo" != "x$ac_hi"; do
14269 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14270 cat >conftest.$ac_ext <<_ACEOF
14271/* confdefs.h. */
14272_ACEOF
14273cat confdefs.h >>conftest.$ac_ext
14274cat >>conftest.$ac_ext <<_ACEOF
14275/* end confdefs.h. */
14276
14277#ifdef HAVE_PTHREAD_H
14278#include <pthread.h>
14279#endif
14280
14281
14282 typedef pthread_t ac__type_sizeof_;
14283int
14284main ()
14285{
14286static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14287test_array [0] = 0
14288
14289 ;
14290 return 0;
14291}
14292_ACEOF
14293rm -f conftest.$ac_objext
14294if { (ac_try="$ac_compile"
14295case "(($ac_try" in
14296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14297 *) ac_try_echo=$ac_try;;
14298esac
14299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14300 (eval "$ac_compile") 2>conftest.er1
14301 ac_status=$?
14302 grep -v '^ *+' conftest.er1 >conftest.err
14303 rm -f conftest.er1
14304 cat conftest.err >&5
14305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14306 (exit $ac_status); } && {
14307 test -z "$ac_c_werror_flag" ||
14308 test ! -s conftest.err
14309 } && test -s conftest.$ac_objext; then
14310 ac_hi=$ac_mid
14311else
14312 echo "$as_me: failed program was:" >&5
14313sed 's/^/| /' conftest.$ac_ext >&5
14314
14315 ac_lo=`expr '(' $ac_mid ')' + 1`
14316fi
14317
14318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14319done
14320case $ac_lo in
14321?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14322'') if test "$ac_cv_type_pthread_t" = yes; then
14323 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14324See \`config.log' for more details." >&5
14325echo "$as_me: error: cannot compute sizeof (pthread_t)
14326See \`config.log' for more details." >&2;}
14327 { (exit 77); exit 77; }; }
14328 else
14329 ac_cv_sizeof_pthread_t=0
14330 fi ;;
14331esac
14332else
14333 cat >conftest.$ac_ext <<_ACEOF
14334/* confdefs.h. */
14335_ACEOF
14336cat confdefs.h >>conftest.$ac_ext
14337cat >>conftest.$ac_ext <<_ACEOF
14338/* end confdefs.h. */
14339
14340#ifdef HAVE_PTHREAD_H
14341#include <pthread.h>
14342#endif
14343
14344
14345 typedef pthread_t ac__type_sizeof_;
14346static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14347static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14348#include <stdio.h>
14349#include <stdlib.h>
14350int
14351main ()
14352{
14353
14354 FILE *f = fopen ("conftest.val", "w");
14355 if (! f)
14356 return 1;
14357 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14358 {
14359 long int i = longval ();
14360 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14361 return 1;
14362 fprintf (f, "%ld\n", i);
14363 }
14364 else
14365 {
14366 unsigned long int i = ulongval ();
14367 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14368 return 1;
14369 fprintf (f, "%lu\n", i);
14370 }
14371 return ferror (f) || fclose (f) != 0;
14372
14373 ;
14374 return 0;
14375}
Martin v. Löwis11437992002-04-12 09:54:03 +000014376_ACEOF
14377rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014378if { (ac_try="$ac_link"
14379case "(($ac_try" in
14380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14381 *) ac_try_echo=$ac_try;;
14382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014384 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014385 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014388 { (case "(($ac_try" in
14389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14390 *) ac_try_echo=$ac_try;;
14391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014394 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014396 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014397 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014399 echo "$as_me: program exited with status $ac_status" >&5
14400echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014401sed 's/^/| /' conftest.$ac_ext >&5
14402
Martin v. Löwis11437992002-04-12 09:54:03 +000014403( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014404if test "$ac_cv_type_pthread_t" = yes; then
14405 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14406See \`config.log' for more details." >&5
14407echo "$as_me: error: cannot compute sizeof (pthread_t)
14408See \`config.log' for more details." >&2;}
14409 { (exit 77); exit 77; }; }
14410 else
14411 ac_cv_sizeof_pthread_t=0
14412 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014413fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014414rm -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 +000014415fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014416rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014417fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014418{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014419echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014420
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014421
14422
Martin v. Löwis11437992002-04-12 09:54:03 +000014423cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014424#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014425_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014426
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014427
Trent Mick635f6fb2000-08-23 21:33:05 +000014428fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014429CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014430
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014431{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14432echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014433# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014434if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014435 enableval=$enable_toolbox_glue;
14436fi
Jack Jansene578a632001-08-15 01:27:14 +000014437
14438
14439if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014440then
Jack Jansene578a632001-08-15 01:27:14 +000014441 case $ac_sys_system/$ac_sys_release in
14442 Darwin/*)
14443 enable_toolbox_glue="yes";;
14444 *)
14445 enable_toolbox_glue="no";;
14446 esac
14447fi
14448case "$enable_toolbox_glue" in
14449yes)
Jack Jansene578a632001-08-15 01:27:14 +000014450 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014451 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
14453cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014454#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014455_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014456
14457 ;;
14458*)
Jack Jansene578a632001-08-15 01:27:14 +000014459 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014460 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014461 ;;
14462esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014463{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14464echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014465
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014466
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014467
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014468case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014469 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014470 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14471 ;;
14472 Darwin/*)
14473 OTHER_LIBTOOL_OPT=""
14474 ;;
14475esac
14476
14477
14478case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014479 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014480 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14481 if test "${enable_universalsdk}"; then
14482 :
14483 else
14484 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
14485 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014486 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014487 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014488 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014489 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14490 if test ${gcc_version} '<' 4.0
14491 then
14492 LIBTOOL_CRUFT="-lcc_dynamic"
14493 else
14494 LIBTOOL_CRUFT=""
14495 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000014496 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000014497 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014499esac
14500
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014501{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14502echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014503if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014504then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014505 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014507 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014508
Martin v. Löwis11437992002-04-12 09:54:03 +000014509cat >>confdefs.h <<\_ACEOF
14510#define WITH_NEXT_FRAMEWORK 1
14511_ACEOF
14512
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014513 { echo "$as_me:$LINENO: result: yes" >&5
14514echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014515 if test $enable_shared = "yes"
14516 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014517 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14518echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren450d5612009-06-08 21:12:41 +000014519 { (exit 1); exit 1; }; }
14520 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014521else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014522 { echo "$as_me:$LINENO: result: no" >&5
14523echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014524fi
14525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014526{ echo "$as_me:$LINENO: checking for dyld" >&5
14527echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014528case $ac_sys_system/$ac_sys_release in
14529 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531cat >>confdefs.h <<\_ACEOF
14532#define WITH_DYLD 1
14533_ACEOF
14534
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014535 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14536echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014537 ;;
14538 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014539 { echo "$as_me:$LINENO: result: no" >&5
14540echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014541 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014542esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014543
Guido van Rossum0a516c91994-09-12 10:58:40 +000014544# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014545
Michael W. Hudson54241132001-12-07 15:38:26 +000014546
14547
14548
14549
Guido van Rossum0a516c91994-09-12 10:58:40 +000014550# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014551# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014552{ echo "$as_me:$LINENO: checking SO" >&5
14553echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014554if test -z "$SO"
14555then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014556 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014557 hp*|HP*)
14558 case `uname -m` in
14559 ia64) SO=.so;;
14560 *) SO=.sl;;
14561 esac
14562 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014563 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014564 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014565 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014566else
14567 # this might also be a termcap variable, see #610332
14568 echo
14569 echo '====================================================================='
14570 echo '+ +'
14571 echo '+ WARNING: You have set SO in your environment. +'
14572 echo '+ Do you really mean to change the extension for shared libraries? +'
14573 echo '+ Continuing in 10 seconds to let you to ponder. +'
14574 echo '+ +'
14575 echo '====================================================================='
14576 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014577fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014578{ echo "$as_me:$LINENO: result: $SO" >&5
14579echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014580
Ronald Oussoren79f90492009-01-02 10:44:46 +000014581
Neal Norwitz58e28882006-05-19 07:00:58 +000014582cat >>confdefs.h <<_ACEOF
14583#define SHLIB_EXT "$SO"
14584_ACEOF
14585
Guido van Rossum0a516c91994-09-12 10:58:40 +000014586# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014587# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014588# (Shared libraries in this instance are shared modules to be loaded into
14589# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014590{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14591echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014592if test -z "$LDSHARED"
14593then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014594 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014595 AIX*)
14596 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014597 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014598 ;;
14599 BeOS*)
14600 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014601 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014602 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014603 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014604 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014605 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000014606 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014607 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014608 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000014609 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014610 hp*|HP*)
14611 if test "$GCC" = "yes"
14612 then LDSHARED='$(CC) -shared'
14613 else LDSHARED='ld -b';
14614 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014615 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014616 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014617 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14618 if test "$enable_framework" ; then
14619 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014620 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14621 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014622 else
14623 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014624 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014625 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014626 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014627 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14628 if test "$enable_framework" ; then
14629 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014630 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14631 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014632 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014633 # No framework, use the Python app as bundle-loader
14634 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014635 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014636 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014637 Darwin/*)
14638 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14639 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014640
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014641 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014642 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014643 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014644 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014645 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014646 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14647 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014648 else
14649 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14650 if test "$enable_framework" ; then
14651 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014652 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14653 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014654 else
14655 # No framework, use the Python app as bundle-loader
14656 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14657 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14658 fi
14659 fi
14660 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014661 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014662 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014663 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014664 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014665 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014666 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014667 else
14668 LDSHARED="ld -Bshareable ${LDFLAGS}"
14669 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014670 OpenBSD*)
14671 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14672 then
14673 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14674 else
14675 case `uname -r` in
14676 [01].* | 2.[0-7] | 2.[0-7].*)
14677 LDSHARED="ld -Bshareable ${LDFLAGS}"
14678 ;;
14679 *)
14680 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14681 ;;
14682 esac
14683 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014684 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014685 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014686 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014687 then LDSHARED='$(CC) -shared'
14688 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014689 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014690 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000014691 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014692 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014693 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014694 *) LDSHARED="ld";;
14695 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014696fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014697{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14698echo "${ECHO_T}$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014699BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014700# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014701# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014702{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14703echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014704if test -z "$CCSHARED"
14705then
Guido van Rossum07397971997-04-29 21:49:50 +000014706 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014707 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014708 then CCSHARED="-fPIC";
14709 elif test `uname -p` = sparc;
14710 then CCSHARED="-xcode=pic32";
14711 else CCSHARED="-Kpic";
14712 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014713 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014714 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014715 else CCSHARED="+z";
14716 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014717 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014718 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014719 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014720 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014721 if test "$GCC" = "yes"
14722 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014723 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014724 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014725 SCO_SV*)
14726 if test "$GCC" = "yes"
14727 then CCSHARED="-fPIC"
14728 else CCSHARED="-Kpic -belf"
14729 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000014730 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014731 IRIX*/6*) case $CC in
14732 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014733 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014734 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014735 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014736 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014737fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014738{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14739echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014740# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014741# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014742{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14743echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014744if test -z "$LINKFORSHARED"
14745then
Guido van Rossum07397971997-04-29 21:49:50 +000014746 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014747 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014748 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014749 LINKFORSHARED="-Wl,-E -Wl,+s";;
14750# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014751 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014752 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014753 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014755 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
14756 # which is
Jack Jansene578a632001-08-15 01:27:14 +000014757 # not used by the core itself but which needs to be in the core so
14758 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000014759 # -prebind is no longer used, because it actually seems to give a
14760 # slowdown in stead of a speedup, maybe due to the large number of
14761 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014762
14763 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000014764 if test "$enable_framework"
14765 then
Jack Jansenda49e192005-01-07 13:08:22 +000014766 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014767 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014768 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014769 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014770 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014771 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014772 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014773 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14774 then
14775 LINKFORSHARED="-Wl,--export-dynamic"
14776 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014777 SunOS/5*) case $CC in
14778 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014779 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014780 then
14781 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014782 fi;;
14783 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014784 CYGWIN*)
14785 if test $enable_shared = "no"
14786 then
14787 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14788 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000014789 QNX*)
14790 # -Wl,-E causes the symbols to be added to the dynamic
14791 # symbol table so that they can be found when a module
14792 # is loaded. -N 2048K causes the stack size to be set
14793 # to 2048 kilobytes so that the stack doesn't overflow
14794 # when running test_compile.py.
14795 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014796 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014798{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14799echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014800
Michael W. Hudson54241132001-12-07 15:38:26 +000014801
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014803{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14804echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014805if test ! "$LIBRARY" = "$LDLIBRARY"
14806then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014807 case $ac_sys_system in
14808 CYGWIN*)
14809 # Cygwin needs CCSHARED when building extension DLLs
14810 # but not when building the interpreter DLL.
14811 CFLAGSFORSHARED='';;
14812 *)
14813 CFLAGSFORSHARED='$(CCSHARED)'
14814 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014815fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014816{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14817echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014818
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014819# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14820# library (with --enable-shared).
14821# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014822# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14823# if it is not required, since it creates a dependency of the shared library
14824# to LIBS. This, in turn, means that applications linking the shared libpython
14825# don't need to link LIBS explicitly. The default should be only changed
14826# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014827
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014828{ echo "$as_me:$LINENO: checking SHLIBS" >&5
14829echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014830case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014831 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014832 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014833esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014834{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
14835echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014836
14837
Guido van Rossum627b2d71993-12-24 10:39:16 +000014838# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014839
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014840{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14841echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014842if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014843 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014844else
Martin v. Löwis11437992002-04-12 09:54:03 +000014845 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014846LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014848/* confdefs.h. */
14849_ACEOF
14850cat confdefs.h >>conftest.$ac_ext
14851cat >>conftest.$ac_ext <<_ACEOF
14852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014853
Martin v. Löwiseba40652007-08-30 20:10:57 +000014854/* Override any GCC internal prototype to avoid an error.
14855 Use char because int might match the return type of a GCC
14856 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014857#ifdef __cplusplus
14858extern "C"
14859#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014860char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014861int
14862main ()
14863{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014864return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014865 ;
14866 return 0;
14867}
14868_ACEOF
14869rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014870if { (ac_try="$ac_link"
14871case "(($ac_try" in
14872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14873 *) ac_try_echo=$ac_try;;
14874esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014876 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014878 grep -v '^ *+' conftest.er1 >conftest.err
14879 rm -f conftest.er1
14880 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014882 (exit $ac_status); } && {
14883 test -z "$ac_c_werror_flag" ||
14884 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014885 } && test -s conftest$ac_exeext &&
14886 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014888else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014890sed 's/^/| /' conftest.$ac_ext >&5
14891
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014894
14895rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014896 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014897LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014898fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014899{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14900echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
14901if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 cat >>confdefs.h <<_ACEOF
14903#define HAVE_LIBDL 1
14904_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014905
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014906 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014907
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014908fi
14909 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014910
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014911{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14912echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014913if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014914 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014915else
Martin v. Löwis11437992002-04-12 09:54:03 +000014916 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014917LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014919/* confdefs.h. */
14920_ACEOF
14921cat confdefs.h >>conftest.$ac_ext
14922cat >>conftest.$ac_ext <<_ACEOF
14923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014924
Martin v. Löwiseba40652007-08-30 20:10:57 +000014925/* Override any GCC internal prototype to avoid an error.
14926 Use char because int might match the return type of a GCC
14927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014928#ifdef __cplusplus
14929extern "C"
14930#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014931char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014932int
14933main ()
14934{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014935return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 ;
14937 return 0;
14938}
14939_ACEOF
14940rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014941if { (ac_try="$ac_link"
14942case "(($ac_try" in
14943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14944 *) ac_try_echo=$ac_try;;
14945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014947 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014949 grep -v '^ *+' conftest.er1 >conftest.err
14950 rm -f conftest.er1
14951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014953 (exit $ac_status); } && {
14954 test -z "$ac_c_werror_flag" ||
14955 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014956 } && test -s conftest$ac_exeext &&
14957 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014961sed 's/^/| /' conftest.$ac_ext >&5
14962
Martin v. Löwiseba40652007-08-30 20:10:57 +000014963 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965
14966rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014968LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014969fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014970{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14971echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
14972if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 cat >>confdefs.h <<_ACEOF
14974#define HAVE_LIBDLD 1
14975_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014976
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014977 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014978
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014979fi
14980 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014981
Ronald Oussoren79f90492009-01-02 10:44:46 +000014982# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014983if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014984 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14985echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014986if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014987 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014988else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014989 ac_func_search_save_LIBS=$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 sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015004int
15005main ()
15006{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ;
15009 return 0;
15010}
15011_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012for ac_lib in '' pthread rt posix4; do
15013 if test -z "$ac_lib"; then
15014 ac_res="none required"
15015 else
15016 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015018 fi
15019 rm -f conftest.$ac_objext conftest$ac_exeext
15020if { (ac_try="$ac_link"
15021case "(($ac_try" in
15022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15023 *) ac_try_echo=$ac_try;;
15024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015027 ac_status=$?
15028 grep -v '^ *+' conftest.er1 >conftest.err
15029 rm -f conftest.er1
15030 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015032 (exit $ac_status); } && {
15033 test -z "$ac_c_werror_flag" ||
15034 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015035 } && test -s conftest$ac_exeext &&
15036 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015038else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015039 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015040sed 's/^/| /' conftest.$ac_ext >&5
15041
Martin v. Löwiseba40652007-08-30 20:10:57 +000015042
Brett Cannon19fab762007-06-02 03:02:29 +000015043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044
15045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15046 conftest$ac_exeext
15047 if test "${ac_cv_search_sem_init+set}" = set; then
15048 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015049fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015050done
15051if test "${ac_cv_search_sem_init+set}" = set; then
15052 :
15053else
15054 ac_cv_search_sem_init=no
15055fi
15056rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015057LIBS=$ac_func_search_save_LIBS
15058fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015059{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15060echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015061ac_res=$ac_cv_search_sem_init
15062if test "$ac_res" != no; then
15063 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015064
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015065fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015066 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015067 # posix4 on Solaris 2.6
15068 # pthread (first!) on Linux
15069fi
15070
Martin v. Löwis19d17342003-06-14 21:03:05 +000015071# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015072{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15073echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015074if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015075 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015076else
15077 ac_check_lib_save_LIBS=$LIBS
15078LIBS="-lintl $LIBS"
15079cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015080/* confdefs.h. */
15081_ACEOF
15082cat confdefs.h >>conftest.$ac_ext
15083cat >>conftest.$ac_ext <<_ACEOF
15084/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015085
Martin v. Löwiseba40652007-08-30 20:10:57 +000015086/* Override any GCC internal prototype to avoid an error.
15087 Use char because int might match the return type of a GCC
15088 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015089#ifdef __cplusplus
15090extern "C"
15091#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015092char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015093int
15094main ()
15095{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015096return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015097 ;
15098 return 0;
15099}
15100_ACEOF
15101rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015102if { (ac_try="$ac_link"
15103case "(($ac_try" in
15104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15105 *) ac_try_echo=$ac_try;;
15106esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015108 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015110 grep -v '^ *+' conftest.er1 >conftest.err
15111 rm -f conftest.er1
15112 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015114 (exit $ac_status); } && {
15115 test -z "$ac_c_werror_flag" ||
15116 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015117 } && test -s conftest$ac_exeext &&
15118 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015119 ac_cv_lib_intl_textdomain=yes
15120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015121 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015122sed 's/^/| /' conftest.$ac_ext >&5
15123
Martin v. Löwiseba40652007-08-30 20:10:57 +000015124 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126
15127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015129LIBS=$ac_check_lib_save_LIBS
15130fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015131{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15132echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15133if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015134
15135cat >>confdefs.h <<\_ACEOF
15136#define WITH_LIBINTL 1
15137_ACEOF
15138
15139fi
15140
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015141
15142# checks for system dependent C++ extensions support
15143case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015144 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15145echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015147/* confdefs.h. */
15148_ACEOF
15149cat confdefs.h >>conftest.$ac_ext
15150cat >>conftest.$ac_ext <<_ACEOF
15151/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015152#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015153int
15154main ()
15155{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015156loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015157 ;
15158 return 0;
15159}
15160_ACEOF
15161rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015162if { (ac_try="$ac_link"
15163case "(($ac_try" in
15164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15165 *) ac_try_echo=$ac_try;;
15166esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015168 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015170 grep -v '^ *+' conftest.er1 >conftest.err
15171 rm -f conftest.er1
15172 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015174 (exit $ac_status); } && {
15175 test -z "$ac_c_werror_flag" ||
15176 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015177 } && test -s conftest$ac_exeext &&
15178 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015179
Martin v. Löwis11437992002-04-12 09:54:03 +000015180cat >>confdefs.h <<\_ACEOF
15181#define AIX_GENUINE_CPLUSPLUS 1
15182_ACEOF
15183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015184 { echo "$as_me:$LINENO: result: yes" >&5
15185echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015188sed 's/^/| /' conftest.$ac_ext >&5
15189
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015190 { echo "$as_me:$LINENO: result: no" >&5
15191echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015192fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015193
15194rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015195 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015196 *) ;;
15197esac
15198
Guido van Rossum70c7f481998-03-26 18:44:10 +000015199# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015200# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015201{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15202echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015203if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015204 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015205else
Martin v. Löwis11437992002-04-12 09:54:03 +000015206 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015207LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015209/* confdefs.h. */
15210_ACEOF
15211cat confdefs.h >>conftest.$ac_ext
15212cat >>conftest.$ac_ext <<_ACEOF
15213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015214
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215/* Override any GCC internal prototype to avoid an error.
15216 Use char because int might match the return type of a GCC
15217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015218#ifdef __cplusplus
15219extern "C"
15220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015221char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015222int
15223main ()
15224{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015225return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ;
15227 return 0;
15228}
15229_ACEOF
15230rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231if { (ac_try="$ac_link"
15232case "(($ac_try" in
15233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15234 *) ac_try_echo=$ac_try;;
15235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015237 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015239 grep -v '^ *+' conftest.er1 >conftest.err
15240 rm -f conftest.er1
15241 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015243 (exit $ac_status); } && {
15244 test -z "$ac_c_werror_flag" ||
15245 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015246 } && test -s conftest$ac_exeext &&
15247 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015249else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015250 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015251sed 's/^/| /' conftest.$ac_ext >&5
15252
Martin v. Löwiseba40652007-08-30 20:10:57 +000015253 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015255
15256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015257 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015258LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015259fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015260{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15261echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15262if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015263 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015264fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015265 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015266{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15267echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015268if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015270else
Martin v. Löwis11437992002-04-12 09:54:03 +000015271 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015272LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015274/* confdefs.h. */
15275_ACEOF
15276cat confdefs.h >>conftest.$ac_ext
15277cat >>conftest.$ac_ext <<_ACEOF
15278/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015279
Martin v. Löwiseba40652007-08-30 20:10:57 +000015280/* Override any GCC internal prototype to avoid an error.
15281 Use char because int might match the return type of a GCC
15282 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015283#ifdef __cplusplus
15284extern "C"
15285#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015286char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015287int
15288main ()
15289{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015290return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015291 ;
15292 return 0;
15293}
15294_ACEOF
15295rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296if { (ac_try="$ac_link"
15297case "(($ac_try" in
15298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15299 *) ac_try_echo=$ac_try;;
15300esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015304 grep -v '^ *+' conftest.er1 >conftest.err
15305 rm -f conftest.er1
15306 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015308 (exit $ac_status); } && {
15309 test -z "$ac_c_werror_flag" ||
15310 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015311 } && test -s conftest$ac_exeext &&
15312 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015313 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015314else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015315 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015316sed 's/^/| /' conftest.$ac_ext >&5
15317
Martin v. Löwiseba40652007-08-30 20:10:57 +000015318 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015320
15321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015322 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015323LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015325{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15326echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15327if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015328 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015329fi
15330 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015331
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015332case "$ac_sys_system" in
15333BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015334{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15335echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015336if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015337 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015338else
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015340LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015341cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015342/* confdefs.h. */
15343_ACEOF
15344cat confdefs.h >>conftest.$ac_ext
15345cat >>conftest.$ac_ext <<_ACEOF
15346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015347
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348/* Override any GCC internal prototype to avoid an error.
15349 Use char because int might match the return type of a GCC
15350 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015351#ifdef __cplusplus
15352extern "C"
15353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015354char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015355int
15356main ()
15357{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015358return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ;
15360 return 0;
15361}
15362_ACEOF
15363rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015364if { (ac_try="$ac_link"
15365case "(($ac_try" in
15366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15367 *) ac_try_echo=$ac_try;;
15368esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015370 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015372 grep -v '^ *+' conftest.er1 >conftest.err
15373 rm -f conftest.er1
15374 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376 (exit $ac_status); } && {
15377 test -z "$ac_c_werror_flag" ||
15378 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015379 } && test -s conftest$ac_exeext &&
15380 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015381 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015382else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015383 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015384sed 's/^/| /' conftest.$ac_ext >&5
15385
Martin v. Löwiseba40652007-08-30 20:10:57 +000015386 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015387fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015388
15389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015391LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015392fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015393{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15394echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15395if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015396 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015397fi
15398 # BeOS
15399;;
15400esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015401
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015402{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15403echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015404
Martin v. Löwiseba40652007-08-30 20:10:57 +000015405# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015406if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015408{ echo "$as_me:$LINENO: result: $withval" >&5
15409echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015410LIBS="$withval $LIBS"
15411
15412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015413 { echo "$as_me:$LINENO: result: no" >&5
15414echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015415fi
15416
Guido van Rossum7f43da71994-08-01 12:15:30 +000015417
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015418# Check for use of the system libffi library
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015419{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15420echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015421
Martin v. Löwiseba40652007-08-30 20:10:57 +000015422# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015423if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015424 withval=$with_system_ffi;
15425fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015426
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015427
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015428{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15429echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015430
Benjamin Peterson867475c2009-04-29 20:36:25 +000015431# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015432{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15433echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015434
15435# Check whether --with-dbmliborder was given.
15436if test "${with_dbmliborder+set}" = set; then
15437 withval=$with_dbmliborder;
15438if test x$with_dbmliborder = xyes
15439then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015440{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15441echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015442 { (exit 1); exit 1; }; }
15443else
15444 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15445 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15446 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015447 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15448echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015449 { (exit 1); exit 1; }; }
15450 fi
15451 done
15452fi
15453fi
15454
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015455{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15456echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015457
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015458# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015459
15460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015461{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15462echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015463
Martin v. Löwiseba40652007-08-30 20:10:57 +000015464# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015465if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015466 withval=$with_signal_module;
15467fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015468
15469
15470if test -z "$with_signal_module"
15471then with_signal_module="yes"
15472fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015473{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15474echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015475
15476if test "${with_signal_module}" = "yes"; then
15477 USE_SIGNAL_MODULE=""
15478 SIGNAL_OBJS=""
15479else
15480 USE_SIGNAL_MODULE="#"
15481 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15482fi
15483
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015484# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015485
Barry Warsawc0d24d82000-06-29 16:12:00 +000015486USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015488{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15489echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015490
Guido van Rossumec2f0731997-01-22 20:54:01 +000015491
Martin v. Löwiseba40652007-08-30 20:10:57 +000015492# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015493if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015494 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015495{ echo "$as_me:$LINENO: result: $withval" >&5
15496echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015497LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015498if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015499 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015500fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015502 { echo "$as_me:$LINENO: result: no" >&5
15503echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015504fi
15505
Martin v. Löwis11437992002-04-12 09:54:03 +000015506
15507# Templates for things AC_DEFINEd more than once.
15508# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015509
15510
Martin v. Löwis11437992002-04-12 09:54:03 +000015511
15512
15513
15514
15515
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015516{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15517echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015518
Martin v. Löwiseba40652007-08-30 20:10:57 +000015519# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015520if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015521 withval=$with_threads;
15522fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015523
15524
Barry Warsawc0d24d82000-06-29 16:12:00 +000015525# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015526
Martin v. Löwiseba40652007-08-30 20:10:57 +000015527# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015528if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015529 withval=$with_thread; with_threads=$with_thread
15530fi
15531
Barry Warsawc0d24d82000-06-29 16:12:00 +000015532
15533if test -z "$with_threads"
15534then with_threads="yes"
15535fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015536{ echo "$as_me:$LINENO: result: $with_threads" >&5
15537echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015538
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015539
Barry Warsawc0d24d82000-06-29 16:12:00 +000015540if test "$with_threads" = "no"
15541then
15542 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015543elif test "$ac_cv_pthread_is_default" = yes
15544then
Martin v. Löwis11437992002-04-12 09:54:03 +000015545 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015546#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015547_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015548
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015549 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015551#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015552_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015553
15554 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015556elif test "$ac_cv_kpthread" = "yes"
15557then
15558 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015559 if test "$ac_cv_cxx_thread" = "yes"; then
15560 CXX="$CXX -Kpthread"
15561 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015563#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015564_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015565
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015566 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015567 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015568elif test "$ac_cv_kthread" = "yes"
15569then
15570 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015571 if test "$ac_cv_cxx_thread" = "yes"; then
15572 CXX="$CXX -Kthread"
15573 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015574 cat >>confdefs.h <<\_ACEOF
15575#define WITH_THREAD 1
15576_ACEOF
15577
15578 posix_threads=yes
15579 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015580elif test "$ac_cv_pthread" = "yes"
15581then
15582 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015583 if test "$ac_cv_cxx_thread" = "yes"; then
15584 CXX="$CXX -pthread"
15585 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015586 cat >>confdefs.h <<\_ACEOF
15587#define WITH_THREAD 1
15588_ACEOF
15589
15590 posix_threads=yes
15591 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015592else
15593 if test ! -z "$with_threads" -a -d "$with_threads"
15594 then LDFLAGS="$LDFLAGS -L$with_threads"
15595 fi
15596 if test ! -z "$withval" -a -d "$withval"
15597 then LDFLAGS="$LDFLAGS -L$withval"
15598 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015599
15600 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015601 # define _POSIX_THREADS in unistd.h. Some apparently don't
15602 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015603 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15604echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015606/* confdefs.h. */
15607_ACEOF
15608cat confdefs.h >>conftest.$ac_ext
15609cat >>conftest.$ac_ext <<_ACEOF
15610/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015611
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015612#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015613#ifdef _POSIX_THREADS
15614yes
15615#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015616
15617_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015619 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015620 unistd_defines_pthreads=yes
15621else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015622 unistd_defines_pthreads=no
15623fi
15624rm -f conftest*
15625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015626 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15627echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015630#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015631_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015632
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015634 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
15635echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015636if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015637 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015638fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015639{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15640echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015641else
Martin v. Löwis11437992002-04-12 09:54:03 +000015642 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015643{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15644echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015645cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015646/* confdefs.h. */
15647_ACEOF
15648cat confdefs.h >>conftest.$ac_ext
15649cat >>conftest.$ac_ext <<_ACEOF
15650/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015651$ac_includes_default
15652#include <cthreads.h>
15653_ACEOF
15654rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015655if { (ac_try="$ac_compile"
15656case "(($ac_try" in
15657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15658 *) ac_try_echo=$ac_try;;
15659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015663 grep -v '^ *+' conftest.er1 >conftest.err
15664 rm -f conftest.er1
15665 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667 (exit $ac_status); } && {
15668 test -z "$ac_c_werror_flag" ||
15669 test ! -s conftest.err
15670 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015671 ac_header_compiler=yes
15672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015673 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015674sed 's/^/| /' conftest.$ac_ext >&5
15675
Martin v. Löwiseba40652007-08-30 20:10:57 +000015676 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015677fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015678
15679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015680{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15681echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015682
15683# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015684{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15685echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015686cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015687/* confdefs.h. */
15688_ACEOF
15689cat confdefs.h >>conftest.$ac_ext
15690cat >>conftest.$ac_ext <<_ACEOF
15691/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015692#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015693_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015694if { (ac_try="$ac_cpp conftest.$ac_ext"
15695case "(($ac_try" in
15696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15697 *) ac_try_echo=$ac_try;;
15698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015701 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015702 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015703 rm -f conftest.er1
15704 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706 (exit $ac_status); } >/dev/null && {
15707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15708 test ! -s conftest.err
15709 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015710 ac_header_preproc=yes
15711else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015713sed 's/^/| /' conftest.$ac_ext >&5
15714
Martin v. Löwis11437992002-04-12 09:54:03 +000015715 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015716fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015717
Martin v. Löwis11437992002-04-12 09:54:03 +000015718rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015719{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15720echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015721
15722# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015723case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15724 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015725 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15726echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15727 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15728echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015729 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015730 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015731 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015732 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15733echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15734 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15735echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15736 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15737echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15738 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15739echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15740 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15741echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15742 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15743echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015744 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015745## -------------------------------------- ##
15746## Report this to http://bugs.python.org/ ##
15747## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015748_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015749 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015750 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015751esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015752{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
15753echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015754if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015755 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015756else
15757 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015758fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015759{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15760echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015761
15762fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015763if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015765#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015766_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015767
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015769#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015770_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015771
Martin v. Löwis11437992002-04-12 09:54:03 +000015772
15773cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015774#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015775_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015776
15777 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015778 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015779else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015780
Martin v. Löwis11437992002-04-12 09:54:03 +000015781 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015782 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15783echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015784if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015785 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015786fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015787{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15788echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015789else
Martin v. Löwis11437992002-04-12 09:54:03 +000015790 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015791{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15792echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015793cat >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öwis11437992002-04-12 09:54:03 +000015799$ac_includes_default
15800#include <mach/cthreads.h>
15801_ACEOF
15802rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015803if { (ac_try="$ac_compile"
15804case "(($ac_try" in
15805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15806 *) ac_try_echo=$ac_try;;
15807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015811 grep -v '^ *+' conftest.er1 >conftest.err
15812 rm -f conftest.er1
15813 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015815 (exit $ac_status); } && {
15816 test -z "$ac_c_werror_flag" ||
15817 test ! -s conftest.err
15818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015819 ac_header_compiler=yes
15820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015822sed 's/^/| /' conftest.$ac_ext >&5
15823
Martin v. Löwiseba40652007-08-30 20:10:57 +000015824 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015826
15827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015828{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15829echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
15831# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015832{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15833echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015835/* confdefs.h. */
15836_ACEOF
15837cat confdefs.h >>conftest.$ac_ext
15838cat >>conftest.$ac_ext <<_ACEOF
15839/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015840#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015842if { (ac_try="$ac_cpp conftest.$ac_ext"
15843case "(($ac_try" in
15844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15845 *) ac_try_echo=$ac_try;;
15846esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015848 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015849 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015850 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015851 rm -f conftest.er1
15852 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854 (exit $ac_status); } >/dev/null && {
15855 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15856 test ! -s conftest.err
15857 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 ac_header_preproc=yes
15859else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015861sed 's/^/| /' conftest.$ac_ext >&5
15862
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015865
Martin v. Löwis11437992002-04-12 09:54:03 +000015866rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015867{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15868echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015869
15870# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015871case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15872 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015873 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15874echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15875 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15876echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015877 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015878 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015879 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015880 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15881echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15882 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15883echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15884 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15885echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15886 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15887echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15888 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15889echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15890 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15891echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015892 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000015893## -------------------------------------- ##
15894## Report this to http://bugs.python.org/ ##
15895## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015896_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015898 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015899esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015900{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15901echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015902if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015903 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015904else
15905 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015906fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015907{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15908echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015909
15910fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015911if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015912 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015913#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015914_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015915
Martin v. Löwis11437992002-04-12 09:54:03 +000015916 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015917#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015918_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015919
Martin v. Löwis11437992002-04-12 09:54:03 +000015920
15921cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015922#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015923_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015924
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015925 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015926else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015927
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015928 { echo "$as_me:$LINENO: checking for --with-pth" >&5
15929echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015930
Martin v. Löwiseba40652007-08-30 20:10:57 +000015931# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015932if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015933 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
15934echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015935 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015936#define WITH_THREAD 1
15937_ACEOF
15938
15939
15940cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015941#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015942_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015943
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015944 LIBS="-lpth $LIBS"
15945 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015946else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015947 { echo "$as_me:$LINENO: result: no" >&5
15948echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015949
15950 # Just looking for pthread_create in libpthread is not enough:
15951 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15952 # So we really have to include pthread.h, and then link.
15953 _libs=$LIBS
15954 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015955 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15956echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015958/* confdefs.h. */
15959_ACEOF
15960cat confdefs.h >>conftest.$ac_ext
15961cat >>conftest.$ac_ext <<_ACEOF
15962/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015963#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015964
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015965void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015966int
15967main ()
15968{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015969
15970pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015971 ;
15972 return 0;
15973}
15974_ACEOF
15975rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015976if { (ac_try="$ac_link"
15977case "(($ac_try" in
15978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15979 *) ac_try_echo=$ac_try;;
15980esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015982 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015984 grep -v '^ *+' conftest.er1 >conftest.err
15985 rm -f conftest.er1
15986 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015988 (exit $ac_status); } && {
15989 test -z "$ac_c_werror_flag" ||
15990 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015991 } && test -s conftest$ac_exeext &&
15992 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015993
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015994 { echo "$as_me:$LINENO: result: yes" >&5
15995echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015996 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015997#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015998_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015999
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016000 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016001 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016002else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016004sed 's/^/| /' conftest.$ac_ext >&5
16005
Martin v. Löwis11437992002-04-12 09:54:03 +000016006
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016007 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016008 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16009echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016010if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016011 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016012else
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016014/* confdefs.h. */
16015_ACEOF
16016cat confdefs.h >>conftest.$ac_ext
16017cat >>conftest.$ac_ext <<_ACEOF
16018/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016019/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16020 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16021#define pthread_detach innocuous_pthread_detach
16022
Guido van Rossumad678af1998-10-02 14:42:15 +000016023/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016024 which can conflict with char pthread_detach (); below.
16025 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016026 <limits.h> exists even on freestanding compilers. */
16027
16028#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016029# include <limits.h>
16030#else
16031# include <assert.h>
16032#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016033
16034#undef pthread_detach
16035
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036/* Override any GCC internal prototype to avoid an error.
16037 Use char because int might match the return type of a GCC
16038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016039#ifdef __cplusplus
16040extern "C"
16041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016042char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016043/* The GNU C library defines this for functions which it implements
16044 to always fail with ENOSYS. Some functions are actually named
16045 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016046#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016047choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016048#endif
16049
Skip Montanaro6dead952003-09-25 14:50:04 +000016050int
16051main ()
16052{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016053return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016054 ;
16055 return 0;
16056}
16057_ACEOF
16058rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016059if { (ac_try="$ac_link"
16060case "(($ac_try" in
16061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16062 *) ac_try_echo=$ac_try;;
16063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016065 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016067 grep -v '^ *+' conftest.er1 >conftest.err
16068 rm -f conftest.er1
16069 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016071 (exit $ac_status); } && {
16072 test -z "$ac_c_werror_flag" ||
16073 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016074 } && test -s conftest$ac_exeext &&
16075 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016076 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016077else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016078 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016079sed 's/^/| /' conftest.$ac_ext >&5
16080
Martin v. Löwiseba40652007-08-30 20:10:57 +000016081 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016082fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016083
16084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016085 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016086fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016087{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16088echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16089if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016091#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016092_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016093
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016094 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016095 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016096else
Guido van Rossumad678af1998-10-02 14:42:15 +000016097
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016098 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016099 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16100echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016101if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016102 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016103fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016104{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16105echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016106else
16107 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016108{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16109echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016111/* confdefs.h. */
16112_ACEOF
16113cat confdefs.h >>conftest.$ac_ext
16114cat >>conftest.$ac_ext <<_ACEOF
16115/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016116$ac_includes_default
16117#include <atheos/threads.h>
16118_ACEOF
16119rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016120if { (ac_try="$ac_compile"
16121case "(($ac_try" in
16122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16123 *) ac_try_echo=$ac_try;;
16124esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016126 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016128 grep -v '^ *+' conftest.er1 >conftest.err
16129 rm -f conftest.er1
16130 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016132 (exit $ac_status); } && {
16133 test -z "$ac_c_werror_flag" ||
16134 test ! -s conftest.err
16135 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016136 ac_header_compiler=yes
16137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016139sed 's/^/| /' conftest.$ac_ext >&5
16140
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143
16144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016145{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16146echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016147
16148# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016149{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16150echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016152/* confdefs.h. */
16153_ACEOF
16154cat confdefs.h >>conftest.$ac_ext
16155cat >>conftest.$ac_ext <<_ACEOF
16156/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016157#include <atheos/threads.h>
16158_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159if { (ac_try="$ac_cpp conftest.$ac_ext"
16160case "(($ac_try" in
16161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16162 *) ac_try_echo=$ac_try;;
16163esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016165 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016166 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016167 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016168 rm -f conftest.er1
16169 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171 (exit $ac_status); } >/dev/null && {
16172 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16173 test ! -s conftest.err
16174 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016175 ac_header_preproc=yes
16176else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016178sed 's/^/| /' conftest.$ac_ext >&5
16179
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016180 ac_header_preproc=no
16181fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016183rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016184{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16185echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016186
16187# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016188case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16189 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016190 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16191echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16192 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16193echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016194 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016195 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016196 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016197 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16198echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16199 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16200echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16201 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16202echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16203 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16204echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16205 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16206echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16207 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16208echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016209 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016210## -------------------------------------- ##
16211## Report this to http://bugs.python.org/ ##
16212## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016213_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016214 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016215 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016216esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016217{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16218echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016219if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016220 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016221else
16222 ac_cv_header_atheos_threads_h=$ac_header_preproc
16223fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016224{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16225echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016226
16227fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016228if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016229 cat >>confdefs.h <<\_ACEOF
16230#define WITH_THREAD 1
16231_ACEOF
16232
16233
16234cat >>confdefs.h <<\_ACEOF
16235#define ATHEOS_THREADS 1
16236_ACEOF
16237
16238 THREADOBJ="Python/thread.o"
16239else
16240
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016242 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16243echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016244if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016245 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016246fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016247{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16248echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016249else
Martin v. Löwis11437992002-04-12 09:54:03 +000016250 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016251{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16252echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016253cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016254/* confdefs.h. */
16255_ACEOF
16256cat confdefs.h >>conftest.$ac_ext
16257cat >>conftest.$ac_ext <<_ACEOF
16258/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016259$ac_includes_default
16260#include <kernel/OS.h>
16261_ACEOF
16262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016263if { (ac_try="$ac_compile"
16264case "(($ac_try" in
16265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16266 *) ac_try_echo=$ac_try;;
16267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016271 grep -v '^ *+' conftest.er1 >conftest.err
16272 rm -f conftest.er1
16273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016275 (exit $ac_status); } && {
16276 test -z "$ac_c_werror_flag" ||
16277 test ! -s conftest.err
16278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016279 ac_header_compiler=yes
16280else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016282sed 's/^/| /' conftest.$ac_ext >&5
16283
Martin v. Löwiseba40652007-08-30 20:10:57 +000016284 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016286
16287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016288{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16289echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016290
16291# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016292{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16293echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016295/* confdefs.h. */
16296_ACEOF
16297cat confdefs.h >>conftest.$ac_ext
16298cat >>conftest.$ac_ext <<_ACEOF
16299/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016300#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016301_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016302if { (ac_try="$ac_cpp conftest.$ac_ext"
16303case "(($ac_try" in
16304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16305 *) ac_try_echo=$ac_try;;
16306esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016308 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016309 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016310 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016311 rm -f conftest.er1
16312 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016314 (exit $ac_status); } >/dev/null && {
16315 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16316 test ! -s conftest.err
16317 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016318 ac_header_preproc=yes
16319else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016321sed 's/^/| /' conftest.$ac_ext >&5
16322
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016325
Martin v. Löwis11437992002-04-12 09:54:03 +000016326rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016327{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16328echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016329
Martin v. Löwis11437992002-04-12 09:54:03 +000016330# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016331case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16332 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016333 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16334echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16335 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16336echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016337 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016338 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016339 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016340 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16341echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16342 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16343echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16344 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16345echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16346 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16347echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16348 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16349echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16350 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16351echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016352 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016353## -------------------------------------- ##
16354## Report this to http://bugs.python.org/ ##
16355## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016356_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016357 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016358 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016359esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016360{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16361echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016362if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016363 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016364else
16365 ac_cv_header_kernel_OS_h=$ac_header_preproc
16366fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016367{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16368echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016369
16370fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016371if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016372 cat >>confdefs.h <<\_ACEOF
16373#define WITH_THREAD 1
16374_ACEOF
16375
16376
16377cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016378#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016379_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016380
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016381 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016382else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016383
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016384 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16385echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016386if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016388else
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016390LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016392/* confdefs.h. */
16393_ACEOF
16394cat confdefs.h >>conftest.$ac_ext
16395cat >>conftest.$ac_ext <<_ACEOF
16396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016397
Martin v. Löwiseba40652007-08-30 20:10:57 +000016398/* Override any GCC internal prototype to avoid an error.
16399 Use char because int might match the return type of a GCC
16400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016401#ifdef __cplusplus
16402extern "C"
16403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016404char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016405int
16406main ()
16407{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016408return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016409 ;
16410 return 0;
16411}
16412_ACEOF
16413rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016414if { (ac_try="$ac_link"
16415case "(($ac_try" in
16416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16417 *) ac_try_echo=$ac_try;;
16418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016420 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016422 grep -v '^ *+' conftest.er1 >conftest.err
16423 rm -f conftest.er1
16424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016426 (exit $ac_status); } && {
16427 test -z "$ac_c_werror_flag" ||
16428 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016429 } && test -s conftest$ac_exeext &&
16430 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016434sed 's/^/| /' conftest.$ac_ext >&5
16435
Martin v. Löwiseba40652007-08-30 20:10:57 +000016436 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016438
16439rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016440 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016441LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016442fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016443{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16444echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16445if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016446 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016447#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016448_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016449
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016450 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016451 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016452 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016453else
Greg Steinadf63d62000-07-05 10:38:09 +000016454
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016455 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16456echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016457if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016458 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016459else
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016461LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016462cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016463/* confdefs.h. */
16464_ACEOF
16465cat confdefs.h >>conftest.$ac_ext
16466cat >>conftest.$ac_ext <<_ACEOF
16467/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016468
Martin v. Löwiseba40652007-08-30 20:10:57 +000016469/* Override any GCC internal prototype to avoid an error.
16470 Use char because int might match the return type of a GCC
16471 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016472#ifdef __cplusplus
16473extern "C"
16474#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016475char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016476int
16477main ()
16478{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016479return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016480 ;
16481 return 0;
16482}
16483_ACEOF
16484rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016485if { (ac_try="$ac_link"
16486case "(($ac_try" in
16487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16488 *) ac_try_echo=$ac_try;;
16489esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016491 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016493 grep -v '^ *+' conftest.er1 >conftest.err
16494 rm -f conftest.er1
16495 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016497 (exit $ac_status); } && {
16498 test -z "$ac_c_werror_flag" ||
16499 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016500 } && test -s conftest$ac_exeext &&
16501 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016502 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016505sed 's/^/| /' conftest.$ac_ext >&5
16506
Martin v. Löwiseba40652007-08-30 20:10:57 +000016507 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016509
16510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016511 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016512LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016513fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016514{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16515echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16516if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016517 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016518#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016519_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016520
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016521 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016522 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016523 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016524else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016525
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016526 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16527echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016528if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016529 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016530else
Martin v. Löwis11437992002-04-12 09:54:03 +000016531 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016532LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016533cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016534/* confdefs.h. */
16535_ACEOF
16536cat confdefs.h >>conftest.$ac_ext
16537cat >>conftest.$ac_ext <<_ACEOF
16538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016539
Martin v. Löwiseba40652007-08-30 20:10:57 +000016540/* Override any GCC internal prototype to avoid an error.
16541 Use char because int might match the return type of a GCC
16542 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016543#ifdef __cplusplus
16544extern "C"
16545#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016546char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016547int
16548main ()
16549{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016550return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016551 ;
16552 return 0;
16553}
16554_ACEOF
16555rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016556if { (ac_try="$ac_link"
16557case "(($ac_try" in
16558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16559 *) ac_try_echo=$ac_try;;
16560esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016564 grep -v '^ *+' conftest.er1 >conftest.err
16565 rm -f conftest.er1
16566 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016568 (exit $ac_status); } && {
16569 test -z "$ac_c_werror_flag" ||
16570 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016571 } && test -s conftest$ac_exeext &&
16572 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016574else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016576sed 's/^/| /' conftest.$ac_ext >&5
16577
Martin v. Löwiseba40652007-08-30 20:10:57 +000016578 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016580
16581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016582 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016583LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016584fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016585{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16586echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16587if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016588 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016589#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016590_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016591
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016592 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016593 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016594 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016595else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016596
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016597 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16598echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016599if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016600 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016601else
Martin v. Löwis11437992002-04-12 09:54:03 +000016602 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016603LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016604cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016605/* confdefs.h. */
16606_ACEOF
16607cat confdefs.h >>conftest.$ac_ext
16608cat >>conftest.$ac_ext <<_ACEOF
16609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016610
Martin v. Löwiseba40652007-08-30 20:10:57 +000016611/* Override any GCC internal prototype to avoid an error.
16612 Use char because int might match the return type of a GCC
16613 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016614#ifdef __cplusplus
16615extern "C"
16616#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016617char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016618int
16619main ()
16620{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016621return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016622 ;
16623 return 0;
16624}
16625_ACEOF
16626rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016627if { (ac_try="$ac_link"
16628case "(($ac_try" in
16629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16630 *) ac_try_echo=$ac_try;;
16631esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016633 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016635 grep -v '^ *+' conftest.er1 >conftest.err
16636 rm -f conftest.er1
16637 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016639 (exit $ac_status); } && {
16640 test -z "$ac_c_werror_flag" ||
16641 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016642 } && test -s conftest$ac_exeext &&
16643 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016645else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016647sed 's/^/| /' conftest.$ac_ext >&5
16648
Martin v. Löwiseba40652007-08-30 20:10:57 +000016649 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016651
16652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016653 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016654LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016655fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016656{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16657echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
16658if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016659 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016660#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016661_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016662
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016663 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016664 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016665 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016666else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016667
Martin v. Löwis130fb172001-07-19 11:00:41 +000016668 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016669fi
16670
Guido van Rossum627b2d71993-12-24 10:39:16 +000016671
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016672fi
16673
Guido van Rossum0be3e491997-05-22 20:33:33 +000016674fi
16675
Guido van Rossum49545951997-12-02 19:28:29 +000016676fi
16677
Guido van Rossumb93a8621998-05-07 13:27:32 +000016678fi
16679
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016680
Michael W. Hudson54241132001-12-07 15:38:26 +000016681fi
16682
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016683
16684fi
16685
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016687
16688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016690fi
16691
Martin v. Löwis11437992002-04-12 09:54:03 +000016692fi
16693
16694
16695fi
16696
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016697
Michael W. Hudson54241132001-12-07 15:38:26 +000016698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016699 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16700echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016701if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016702 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016703else
Martin v. Löwis11437992002-04-12 09:54:03 +000016704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016705LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016706cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016707/* confdefs.h. */
16708_ACEOF
16709cat confdefs.h >>conftest.$ac_ext
16710cat >>conftest.$ac_ext <<_ACEOF
16711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016712
Martin v. Löwiseba40652007-08-30 20:10:57 +000016713/* Override any GCC internal prototype to avoid an error.
16714 Use char because int might match the return type of a GCC
16715 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016716#ifdef __cplusplus
16717extern "C"
16718#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016719char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016720int
16721main ()
16722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016723return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016724 ;
16725 return 0;
16726}
16727_ACEOF
16728rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016729if { (ac_try="$ac_link"
16730case "(($ac_try" in
16731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16732 *) ac_try_echo=$ac_try;;
16733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016735 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016737 grep -v '^ *+' conftest.er1 >conftest.err
16738 rm -f conftest.er1
16739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016741 (exit $ac_status); } && {
16742 test -z "$ac_c_werror_flag" ||
16743 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016744 } && test -s conftest$ac_exeext &&
16745 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016746 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016747else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016749sed 's/^/| /' conftest.$ac_ext >&5
16750
Martin v. Löwiseba40652007-08-30 20:10:57 +000016751 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016752fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016753
16754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016755 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016756LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016757fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016758{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16759echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
16760if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016761 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016762#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016763_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016764
Martin v. Löwis130fb172001-07-19 11:00:41 +000016765 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016766 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016767 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016768fi
16769
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016770
Neal Norwitza978ab02002-11-02 16:58:05 +000016771 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016772 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16773echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016774if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016775 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016776else
Martin v. Löwis11437992002-04-12 09:54:03 +000016777 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016778LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016780/* confdefs.h. */
16781_ACEOF
16782cat confdefs.h >>conftest.$ac_ext
16783cat >>conftest.$ac_ext <<_ACEOF
16784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
Martin v. Löwiseba40652007-08-30 20:10:57 +000016786/* Override any GCC internal prototype to avoid an error.
16787 Use char because int might match the return type of a GCC
16788 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016789#ifdef __cplusplus
16790extern "C"
16791#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016792char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016793int
16794main ()
16795{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016796return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016797 ;
16798 return 0;
16799}
16800_ACEOF
16801rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016802if { (ac_try="$ac_link"
16803case "(($ac_try" in
16804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16805 *) ac_try_echo=$ac_try;;
16806esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016808 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016810 grep -v '^ *+' conftest.er1 >conftest.err
16811 rm -f conftest.er1
16812 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016814 (exit $ac_status); } && {
16815 test -z "$ac_c_werror_flag" ||
16816 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016817 } && test -s conftest$ac_exeext &&
16818 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016819 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016820else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016822sed 's/^/| /' conftest.$ac_ext >&5
16823
Martin v. Löwiseba40652007-08-30 20:10:57 +000016824 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016826
16827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016829LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016830fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016831{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16832echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
16833if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016835#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016836_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016837
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016838 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016839 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016840 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016841fi
16842
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016843 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016844
Martin v. Löwis130fb172001-07-19 11:00:41 +000016845 if test "$USE_THREAD_MODULE" != "#"
16846 then
16847 # If the above checks didn't disable threads, (at least) OSF1
16848 # needs this '-threads' argument during linking.
16849 case $ac_sys_system in
16850 OSF1) LDLAST=-threads;;
16851 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016852 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016853fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016854
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016855if test "$posix_threads" = "yes"; then
16856 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016857
16858cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016859#define _POSIX_THREADS 1
16860_ACEOF
16861
16862 fi
16863
16864 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16865 case $ac_sys_system/$ac_sys_release in
16866 SunOS/5.6)
16867cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016868#define HAVE_PTHREAD_DESTRUCTOR 1
16869_ACEOF
16870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016871 ;;
16872 SunOS/5.8)
16873cat >>confdefs.h <<\_ACEOF
16874#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16875_ACEOF
16876
16877 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000016878 AIX/5)
16879cat >>confdefs.h <<\_ACEOF
16880#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16881_ACEOF
16882
16883 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016884 esac
16885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016886 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16887echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016888 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016889 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016890else
16891 if test "$cross_compiling" = yes; then
16892 ac_cv_pthread_system_supported=no
16893else
16894 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016895/* confdefs.h. */
16896_ACEOF
16897cat confdefs.h >>conftest.$ac_ext
16898cat >>conftest.$ac_ext <<_ACEOF
16899/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016900#include <pthread.h>
16901 void *foo(void *parm) {
16902 return NULL;
16903 }
16904 main() {
16905 pthread_attr_t attr;
16906 pthread_t id;
16907 if (pthread_attr_init(&attr)) exit(-1);
16908 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16909 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16910 exit(0);
16911 }
16912_ACEOF
16913rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016914if { (ac_try="$ac_link"
16915case "(($ac_try" in
16916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16917 *) ac_try_echo=$ac_try;;
16918esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016920 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016921 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016923 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016924 { (case "(($ac_try" in
16925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16926 *) ac_try_echo=$ac_try;;
16927esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016929 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016930 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016932 (exit $ac_status); }; }; then
16933 ac_cv_pthread_system_supported=yes
16934else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016935 echo "$as_me: program exited with status $ac_status" >&5
16936echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016937sed 's/^/| /' conftest.$ac_ext >&5
16938
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016939( exit $ac_status )
16940ac_cv_pthread_system_supported=no
16941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016942rm -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 +000016943fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016944
Martin v. Löwiseba40652007-08-30 20:10:57 +000016945
16946
Guido van Rossum627b2d71993-12-24 10:39:16 +000016947fi
16948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016949 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16950echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016951 if test "$ac_cv_pthread_system_supported" = "yes"; then
16952
16953cat >>confdefs.h <<\_ACEOF
16954#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16955_ACEOF
16956
16957 fi
16958
16959for ac_func in pthread_sigmask
16960do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016961as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16962{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16963echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000016964if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016966else
16967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016968/* confdefs.h. */
16969_ACEOF
16970cat confdefs.h >>conftest.$ac_ext
16971cat >>conftest.$ac_ext <<_ACEOF
16972/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016973/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16974 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16975#define $ac_func innocuous_$ac_func
16976
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016977/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016978 which can conflict with char $ac_func (); below.
16979 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016980 <limits.h> exists even on freestanding compilers. */
16981
16982#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016983# include <limits.h>
16984#else
16985# include <assert.h>
16986#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016987
16988#undef $ac_func
16989
Martin v. Löwiseba40652007-08-30 20:10:57 +000016990/* Override any GCC internal prototype to avoid an error.
16991 Use char because int might match the return type of a GCC
16992 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016993#ifdef __cplusplus
16994extern "C"
16995#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016996char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016997/* The GNU C library defines this for functions which it implements
16998 to always fail with ENOSYS. Some functions are actually named
16999 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017000#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017001choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017002#endif
17003
Skip Montanaro6dead952003-09-25 14:50:04 +000017004int
17005main ()
17006{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017007return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017008 ;
17009 return 0;
17010}
17011_ACEOF
17012rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017013if { (ac_try="$ac_link"
17014case "(($ac_try" in
17015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17016 *) ac_try_echo=$ac_try;;
17017esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017019 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017021 grep -v '^ *+' conftest.er1 >conftest.err
17022 rm -f conftest.er1
17023 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017025 (exit $ac_status); } && {
17026 test -z "$ac_c_werror_flag" ||
17027 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017028 } && test -s conftest$ac_exeext &&
17029 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017030 eval "$as_ac_var=yes"
17031else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017033sed 's/^/| /' conftest.$ac_ext >&5
17034
Martin v. Löwiseba40652007-08-30 20:10:57 +000017035 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017037
17038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017039 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017040fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017041ac_res=`eval echo '${'$as_ac_var'}'`
17042 { echo "$as_me:$LINENO: result: $ac_res" >&5
17043echo "${ECHO_T}$ac_res" >&6; }
17044if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017045 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017046#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017047_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017048 case $ac_sys_system in
17049 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017050
Jason Tishlerfac083d2003-07-22 15:20:49 +000017051cat >>confdefs.h <<\_ACEOF
17052#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17053_ACEOF
17054
17055 ;;
17056 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017057fi
17058done
17059
17060fi
17061
17062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017063# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017064
17065
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017066{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17067echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017068# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017069if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017070 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017071 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017072 { echo "$as_me:$LINENO: result: no" >&5
17073echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017074 ipv6=no
17075 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017076 *) { echo "$as_me:$LINENO: result: yes" >&5
17077echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017079#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017080_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017081
17082 ipv6=yes
17083 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017084 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017085else
Martin v. Löwis11437992002-04-12 09:54:03 +000017086
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017087 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017088 { echo "$as_me:$LINENO: result: no" >&5
17089echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017090 ipv6=no
17091
17092else
Martin v. Löwis11437992002-04-12 09:54:03 +000017093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017094/* confdefs.h. */
17095_ACEOF
17096cat confdefs.h >>conftest.$ac_ext
17097cat >>conftest.$ac_ext <<_ACEOF
17098/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017099 /* AF_INET6 available check */
17100#include <sys/types.h>
17101#include <sys/socket.h>
17102main()
17103{
17104 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17105 exit(1);
17106 else
17107 exit(0);
17108}
17109
Martin v. Löwis11437992002-04-12 09:54:03 +000017110_ACEOF
17111rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017112if { (ac_try="$ac_link"
17113case "(($ac_try" in
17114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17115 *) ac_try_echo=$ac_try;;
17116esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017118 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017119 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017122 { (case "(($ac_try" in
17123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17124 *) ac_try_echo=$ac_try;;
17125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017127 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017130 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017131 { echo "$as_me:$LINENO: result: yes" >&5
17132echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017133 ipv6=yes
17134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017135 echo "$as_me: program exited with status $ac_status" >&5
17136echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017137sed 's/^/| /' conftest.$ac_ext >&5
17138
Martin v. Löwis11437992002-04-12 09:54:03 +000017139( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017140{ echo "$as_me:$LINENO: result: no" >&5
17141echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017142 ipv6=no
17143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017144rm -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 +000017145fi
17146
Martin v. Löwiseba40652007-08-30 20:10:57 +000017147
17148
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017149if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017150 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17151echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017153/* confdefs.h. */
17154_ACEOF
17155cat confdefs.h >>conftest.$ac_ext
17156cat >>conftest.$ac_ext <<_ACEOF
17157/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017158#include <sys/types.h>
17159#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017160int
17161main ()
17162{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017163struct sockaddr_in6 x;
17164x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017165 ;
17166 return 0;
17167}
17168_ACEOF
17169rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017170if { (ac_try="$ac_compile"
17171case "(($ac_try" in
17172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17173 *) ac_try_echo=$ac_try;;
17174esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017178 grep -v '^ *+' conftest.er1 >conftest.err
17179 rm -f conftest.er1
17180 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017182 (exit $ac_status); } && {
17183 test -z "$ac_c_werror_flag" ||
17184 test ! -s conftest.err
17185 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017186 { echo "$as_me:$LINENO: result: yes" >&5
17187echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017188 ipv6=yes
17189else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017191sed 's/^/| /' conftest.$ac_ext >&5
17192
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017193 { echo "$as_me:$LINENO: result: no" >&5
17194echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017195 ipv6=no
17196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017197
17198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017199fi
17200
17201if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017202 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017203#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017204_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017205
17206fi
17207
Martin v. Löwiseba40652007-08-30 20:10:57 +000017208fi
17209
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017210
17211ipv6type=unknown
17212ipv6lib=none
17213ipv6trylibc=no
17214
17215if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017216 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17217echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017218 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17219 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017220 case $i in
17221 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017223/* confdefs.h. */
17224_ACEOF
17225cat confdefs.h >>conftest.$ac_ext
17226cat >>conftest.$ac_ext <<_ACEOF
17227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017229#include <netinet/in.h>
17230#ifdef IPV6_INRIA_VERSION
17231yes
17232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017235 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017236 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017237fi
17238rm -f conftest*
17239
17240 ;;
17241 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017243/* confdefs.h. */
17244_ACEOF
17245cat confdefs.h >>conftest.$ac_ext
17246cat >>conftest.$ac_ext <<_ACEOF
17247/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017249#include <netinet/in.h>
17250#ifdef __KAME__
17251yes
17252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017253_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017255 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017256 ipv6type=$i;
17257 ipv6lib=inet6
17258 ipv6libdir=/usr/local/v6/lib
17259 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017260fi
17261rm -f conftest*
17262
17263 ;;
17264 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017266/* confdefs.h. */
17267_ACEOF
17268cat confdefs.h >>conftest.$ac_ext
17269cat >>conftest.$ac_ext <<_ACEOF
17270/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017271
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017272#include <features.h>
17273#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17274yes
17275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017276_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017278 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017279 ipv6type=$i;
17280 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017281fi
17282rm -f conftest*
17283
17284 ;;
17285 linux-inet6)
17286 if test -d /usr/inet6; then
17287 ipv6type=$i
17288 ipv6lib=inet6
17289 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017290 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017291 fi
17292 ;;
17293 solaris)
17294 if test -f /etc/netconfig; then
17295 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17296 ipv6type=$i
17297 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017298 fi
17299 fi
17300 ;;
17301 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017303/* confdefs.h. */
17304_ACEOF
17305cat confdefs.h >>conftest.$ac_ext
17306cat >>conftest.$ac_ext <<_ACEOF
17307/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017308
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017309#include <sys/param.h>
17310#ifdef _TOSHIBA_INET6
17311yes
17312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017313_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017315 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017316 ipv6type=$i;
17317 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017318 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017319fi
17320rm -f conftest*
17321
17322 ;;
17323 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017325/* confdefs.h. */
17326_ACEOF
17327cat confdefs.h >>conftest.$ac_ext
17328cat >>conftest.$ac_ext <<_ACEOF
17329/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017330
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017331#include </usr/local/v6/include/sys/v6config.h>
17332#ifdef __V6D__
17333yes
17334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017335_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017337 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017338 ipv6type=$i;
17339 ipv6lib=v6;
17340 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017341 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017342fi
17343rm -f conftest*
17344
17345 ;;
17346 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017348/* confdefs.h. */
17349_ACEOF
17350cat confdefs.h >>conftest.$ac_ext
17351cat >>conftest.$ac_ext <<_ACEOF
17352/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017353
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017354#include <sys/param.h>
17355#ifdef _ZETA_MINAMI_INET6
17356yes
17357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017358_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017360 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017361 ipv6type=$i;
17362 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017363 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017364fi
17365rm -f conftest*
17366
17367 ;;
17368 esac
17369 if test "$ipv6type" != "unknown"; then
17370 break
17371 fi
17372 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017373 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17374echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017375fi
17376
17377if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17378 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17379 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17380 echo "using lib$ipv6lib"
17381 else
17382 if test $ipv6trylibc = "yes"; then
17383 echo "using libc"
17384 else
17385 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17386 echo "You need to fetch lib$ipv6lib.a from appropriate"
17387 echo 'ipv6 kit and compile beforehand.'
17388 exit 1
17389 fi
17390 fi
17391fi
17392
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017393{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17394echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017395cat >conftest.$ac_ext <<_ACEOF
17396/* confdefs.h. */
17397_ACEOF
17398cat confdefs.h >>conftest.$ac_ext
17399cat >>conftest.$ac_ext <<_ACEOF
17400/* end confdefs.h. */
17401#include <Carbon/Carbon.h>
17402int
17403main ()
17404{
17405FSIORefNum fRef = 0
17406 ;
17407 return 0;
17408}
17409_ACEOF
17410rm -f conftest.$ac_objext
17411if { (ac_try="$ac_compile"
17412case "(($ac_try" in
17413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17414 *) ac_try_echo=$ac_try;;
17415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017417 (eval "$ac_compile") 2>conftest.er1
17418 ac_status=$?
17419 grep -v '^ *+' conftest.er1 >conftest.err
17420 rm -f conftest.er1
17421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017423 (exit $ac_status); } && {
17424 test -z "$ac_c_werror_flag" ||
17425 test ! -s conftest.err
17426 } && test -s conftest.$ac_objext; then
17427
17428cat >>confdefs.h <<\_ACEOF
17429#define HAVE_OSX105_SDK 1
17430_ACEOF
17431
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017432 { echo "$as_me:$LINENO: result: yes" >&5
17433echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017434else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017435 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017436sed 's/^/| /' conftest.$ac_ext >&5
17437
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017438 { echo "$as_me:$LINENO: result: no" >&5
17439echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017440
17441fi
17442
17443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17444
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017445# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017446{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17447echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017448
Martin v. Löwiseba40652007-08-30 20:10:57 +000017449# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017450if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017451 withval=$with_doc_strings;
17452fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017453
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017454
17455if test -z "$with_doc_strings"
17456then with_doc_strings="yes"
17457fi
17458if test "$with_doc_strings" != "no"
17459then
17460
17461cat >>confdefs.h <<\_ACEOF
17462#define WITH_DOC_STRINGS 1
17463_ACEOF
17464
17465fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017466{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17467echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017468
Neil Schemenauera35c6882001-02-27 04:45:05 +000017469# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017470{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17471echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017472
Martin v. Löwiseba40652007-08-30 20:10:57 +000017473# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017474if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017475 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017476if test "$withval" != no
17477then
17478
17479cat >>confdefs.h <<\_ACEOF
17480#define WITH_TSC 1
17481_ACEOF
17482
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017483 { echo "$as_me:$LINENO: result: yes" >&5
17484echo "${ECHO_T}yes" >&6; }
17485else { echo "$as_me:$LINENO: result: no" >&5
17486echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017487fi
17488else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017489 { echo "$as_me:$LINENO: result: no" >&5
17490echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017491fi
17492
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017493
17494# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017495{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17496echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017497
Martin v. Löwiseba40652007-08-30 20:10:57 +000017498# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017499if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017500 withval=$with_pymalloc;
17501fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017502
Neil Schemenauera35c6882001-02-27 04:45:05 +000017503
Neil Schemenauer16c22972002-03-22 15:34:49 +000017504if test -z "$with_pymalloc"
17505then with_pymalloc="yes"
17506fi
17507if test "$with_pymalloc" != "no"
17508then
Martin v. Löwis11437992002-04-12 09:54:03 +000017509
17510cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017511#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017512_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017513
17514fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017515{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17516echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017517
Barry Warsawef82cd72000-06-30 16:21:01 +000017518# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017519{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17520echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017521
Martin v. Löwiseba40652007-08-30 20:10:57 +000017522# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017523if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017524 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017525if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017526then
17527
17528cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017529#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017530_ACEOF
17531
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017532 { echo "$as_me:$LINENO: result: yes" >&5
17533echo "${ECHO_T}yes" >&6; }
17534else { echo "$as_me:$LINENO: result: no" >&5
17535echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017536fi
17537else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017538 { echo "$as_me:$LINENO: result: no" >&5
17539echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017540fi
17541
Barry Warsawef82cd72000-06-30 16:21:01 +000017542
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017543# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017544
Guido van Rossum98935bf2001-09-05 19:13:16 +000017545DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017546
Guido van Rossume97ee181999-12-20 21:27:22 +000017547# the dlopen() function means we might want to use dynload_shlib.o. some
17548# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017549
Thomas Wouters3a584202000-08-05 23:28:51 +000017550for ac_func in dlopen
17551do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017552as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17553{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17554echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017555if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017556 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017557else
Martin v. Löwis11437992002-04-12 09:54:03 +000017558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017559/* confdefs.h. */
17560_ACEOF
17561cat confdefs.h >>conftest.$ac_ext
17562cat >>conftest.$ac_ext <<_ACEOF
17563/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017564/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17565 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17566#define $ac_func innocuous_$ac_func
17567
Guido van Rossume97ee181999-12-20 21:27:22 +000017568/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017569 which can conflict with char $ac_func (); below.
17570 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017571 <limits.h> exists even on freestanding compilers. */
17572
17573#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017574# include <limits.h>
17575#else
17576# include <assert.h>
17577#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017578
17579#undef $ac_func
17580
Martin v. Löwiseba40652007-08-30 20:10:57 +000017581/* Override any GCC internal prototype to avoid an error.
17582 Use char because int might match the return type of a GCC
17583 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017584#ifdef __cplusplus
17585extern "C"
17586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017587char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017588/* The GNU C library defines this for functions which it implements
17589 to always fail with ENOSYS. Some functions are actually named
17590 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017591#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017592choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017593#endif
17594
Skip Montanaro6dead952003-09-25 14:50:04 +000017595int
17596main ()
17597{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017598return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017599 ;
17600 return 0;
17601}
17602_ACEOF
17603rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017604if { (ac_try="$ac_link"
17605case "(($ac_try" in
17606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17607 *) ac_try_echo=$ac_try;;
17608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017610 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +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
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017619 } && test -s conftest$ac_exeext &&
17620 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017622else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017624sed 's/^/| /' conftest.$ac_ext >&5
17625
Martin v. Löwiseba40652007-08-30 20:10:57 +000017626 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017627fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017628
17629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017630 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017631fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017632ac_res=`eval echo '${'$as_ac_var'}'`
17633 { echo "$as_me:$LINENO: result: $ac_res" >&5
17634echo "${ECHO_T}$ac_res" >&6; }
17635if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017636 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017637#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017638_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017639
Guido van Rossume97ee181999-12-20 21:27:22 +000017640fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017641done
Guido van Rossume97ee181999-12-20 21:27:22 +000017642
Michael W. Hudson54241132001-12-07 15:38:26 +000017643
Guido van Rossume97ee181999-12-20 21:27:22 +000017644# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17645# loading of modules.
17646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017647{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17648echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017649if test -z "$DYNLOADFILE"
17650then
17651 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017652 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17653 if test "$ac_cv_func_dlopen" = yes
17654 then DYNLOADFILE="dynload_shlib.o"
17655 else DYNLOADFILE="dynload_aix.o"
17656 fi
17657 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017658 BeOS*) DYNLOADFILE="dynload_beos.o";;
17659 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000017660 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17661 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017662 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017663 *)
17664 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17665 # out any dynamic loading
17666 if test "$ac_cv_func_dlopen" = yes
17667 then DYNLOADFILE="dynload_shlib.o"
17668 else DYNLOADFILE="dynload_stub.o"
17669 fi
17670 ;;
17671 esac
17672fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017673{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17674echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017675if test "$DYNLOADFILE" != "dynload_stub.o"
17676then
Martin v. Löwis11437992002-04-12 09:54:03 +000017677
17678cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017679#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017680_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017681
17682fi
17683
Neil Schemenauer4e425612001-06-19 15:44:15 +000017684# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17685
Michael W. Hudson54241132001-12-07 15:38:26 +000017686
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017687{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17688echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017689if test -z "$MACHDEP_OBJS"
17690then
Jack Jansene578a632001-08-15 01:27:14 +000017691 MACHDEP_OBJS=$extra_machdep_objs
17692else
17693 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017694fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017695{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17696echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017697
Guido van Rossum627b2d71993-12-24 10:39:16 +000017698# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
Martin v. Löwisd6320502004-08-12 13:45:08 +000017770
Martin v. Löwisc3001752005-01-23 09:27:24 +000017771
17772
Neal Norwitz05a45592006-03-20 06:30:08 +000017773
17774
Martin v. Löwis382abef2007-02-19 10:55:19 +000017775
17776
Christian Heimes36281872007-11-30 21:11:28 +000017777
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017778
17779
Jesse Noller355b1262009-04-02 00:03:28 +000017780
17781
17782
17783
Martin v. Löwisaef18b12008-03-24 13:31:16 +000017784for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17785 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017786 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017787 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017788 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017789 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017790 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000017791 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17792 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017793 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000017794 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017795 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000017796 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017797do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017798as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17799{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17800echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017801if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017802 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017803else
Martin v. Löwis11437992002-04-12 09:54:03 +000017804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017805/* confdefs.h. */
17806_ACEOF
17807cat confdefs.h >>conftest.$ac_ext
17808cat >>conftest.$ac_ext <<_ACEOF
17809/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017810/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17811 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17812#define $ac_func innocuous_$ac_func
17813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017814/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017815 which can conflict with char $ac_func (); below.
17816 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017817 <limits.h> exists even on freestanding compilers. */
17818
17819#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017820# include <limits.h>
17821#else
17822# include <assert.h>
17823#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017824
17825#undef $ac_func
17826
Martin v. Löwiseba40652007-08-30 20:10:57 +000017827/* Override any GCC internal prototype to avoid an error.
17828 Use char because int might match the return type of a GCC
17829 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017830#ifdef __cplusplus
17831extern "C"
17832#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017833char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017834/* The GNU C library defines this for functions which it implements
17835 to always fail with ENOSYS. Some functions are actually named
17836 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017837#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017838choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017839#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017840
Skip Montanaro6dead952003-09-25 14:50:04 +000017841int
17842main ()
17843{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017844return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017845 ;
17846 return 0;
17847}
17848_ACEOF
17849rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017850if { (ac_try="$ac_link"
17851case "(($ac_try" in
17852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17853 *) ac_try_echo=$ac_try;;
17854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017856 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017858 grep -v '^ *+' conftest.er1 >conftest.err
17859 rm -f conftest.er1
17860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017862 (exit $ac_status); } && {
17863 test -z "$ac_c_werror_flag" ||
17864 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017865 } && test -s conftest$ac_exeext &&
17866 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017867 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017868else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017870sed 's/^/| /' conftest.$ac_ext >&5
17871
Martin v. Löwiseba40652007-08-30 20:10:57 +000017872 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017874
17875rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017876 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017877fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017878ac_res=`eval echo '${'$as_ac_var'}'`
17879 { echo "$as_me:$LINENO: result: $ac_res" >&5
17880echo "${ECHO_T}$ac_res" >&6; }
17881if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017882 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017883#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017884_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017885
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017886fi
17887done
17888
Michael W. Hudson54241132001-12-07 15:38:26 +000017889
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017890# For some functions, having a definition is not sufficient, since
17891# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017892{ echo "$as_me:$LINENO: checking for chroot" >&5
17893echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017895/* confdefs.h. */
17896_ACEOF
17897cat confdefs.h >>conftest.$ac_ext
17898cat >>conftest.$ac_ext <<_ACEOF
17899/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017900#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017901int
17902main ()
17903{
17904void *x=chroot
17905 ;
17906 return 0;
17907}
17908_ACEOF
17909rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017910if { (ac_try="$ac_compile"
17911case "(($ac_try" in
17912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17913 *) ac_try_echo=$ac_try;;
17914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017918 grep -v '^ *+' conftest.er1 >conftest.err
17919 rm -f conftest.er1
17920 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017922 (exit $ac_status); } && {
17923 test -z "$ac_c_werror_flag" ||
17924 test ! -s conftest.err
17925 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017926
17927cat >>confdefs.h <<\_ACEOF
17928#define HAVE_CHROOT 1
17929_ACEOF
17930
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017931 { echo "$as_me:$LINENO: result: yes" >&5
17932echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017935sed 's/^/| /' conftest.$ac_ext >&5
17936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017937 { echo "$as_me:$LINENO: result: no" >&5
17938echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017939
17940fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017941
17942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017943{ echo "$as_me:$LINENO: checking for link" >&5
17944echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017945cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017946/* confdefs.h. */
17947_ACEOF
17948cat confdefs.h >>conftest.$ac_ext
17949cat >>conftest.$ac_ext <<_ACEOF
17950/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017951#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017952int
17953main ()
17954{
17955void *x=link
17956 ;
17957 return 0;
17958}
17959_ACEOF
17960rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017961if { (ac_try="$ac_compile"
17962case "(($ac_try" in
17963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17964 *) ac_try_echo=$ac_try;;
17965esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017967 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017968 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017969 grep -v '^ *+' conftest.er1 >conftest.err
17970 rm -f conftest.er1
17971 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017973 (exit $ac_status); } && {
17974 test -z "$ac_c_werror_flag" ||
17975 test ! -s conftest.err
17976 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017977
17978cat >>confdefs.h <<\_ACEOF
17979#define HAVE_LINK 1
17980_ACEOF
17981
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017982 { echo "$as_me:$LINENO: result: yes" >&5
17983echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017984else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017985 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017986sed 's/^/| /' conftest.$ac_ext >&5
17987
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017988 { echo "$as_me:$LINENO: result: no" >&5
17989echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017990
17991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017992
17993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017994{ echo "$as_me:$LINENO: checking for symlink" >&5
17995echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017996cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017997/* confdefs.h. */
17998_ACEOF
17999cat confdefs.h >>conftest.$ac_ext
18000cat >>conftest.$ac_ext <<_ACEOF
18001/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018002#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018003int
18004main ()
18005{
18006void *x=symlink
18007 ;
18008 return 0;
18009}
18010_ACEOF
18011rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018012if { (ac_try="$ac_compile"
18013case "(($ac_try" in
18014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18015 *) ac_try_echo=$ac_try;;
18016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018018 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018020 grep -v '^ *+' conftest.er1 >conftest.err
18021 rm -f conftest.er1
18022 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018024 (exit $ac_status); } && {
18025 test -z "$ac_c_werror_flag" ||
18026 test ! -s conftest.err
18027 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018028
18029cat >>confdefs.h <<\_ACEOF
18030#define HAVE_SYMLINK 1
18031_ACEOF
18032
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018033 { echo "$as_me:$LINENO: result: yes" >&5
18034echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018035else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018037sed 's/^/| /' conftest.$ac_ext >&5
18038
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018039 { echo "$as_me:$LINENO: result: no" >&5
18040echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018041
18042fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018043
18044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018045{ echo "$as_me:$LINENO: checking for fchdir" >&5
18046echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018047cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018048/* confdefs.h. */
18049_ACEOF
18050cat confdefs.h >>conftest.$ac_ext
18051cat >>conftest.$ac_ext <<_ACEOF
18052/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018053#include <unistd.h>
18054int
18055main ()
18056{
18057void *x=fchdir
18058 ;
18059 return 0;
18060}
18061_ACEOF
18062rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018063if { (ac_try="$ac_compile"
18064case "(($ac_try" in
18065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18066 *) ac_try_echo=$ac_try;;
18067esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018071 grep -v '^ *+' conftest.er1 >conftest.err
18072 rm -f conftest.er1
18073 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018074 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_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018079
18080cat >>confdefs.h <<\_ACEOF
18081#define HAVE_FCHDIR 1
18082_ACEOF
18083
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018084 { echo "$as_me:$LINENO: result: yes" >&5
18085echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018086else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018088sed 's/^/| /' conftest.$ac_ext >&5
18089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018090 { echo "$as_me:$LINENO: result: no" >&5
18091echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018092
18093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018094
18095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018096{ echo "$as_me:$LINENO: checking for fsync" >&5
18097echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018098cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018099/* confdefs.h. */
18100_ACEOF
18101cat confdefs.h >>conftest.$ac_ext
18102cat >>conftest.$ac_ext <<_ACEOF
18103/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018104#include <unistd.h>
18105int
18106main ()
18107{
18108void *x=fsync
18109 ;
18110 return 0;
18111}
18112_ACEOF
18113rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018114if { (ac_try="$ac_compile"
18115case "(($ac_try" in
18116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18117 *) ac_try_echo=$ac_try;;
18118esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018120 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018122 grep -v '^ *+' conftest.er1 >conftest.err
18123 rm -f conftest.er1
18124 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018126 (exit $ac_status); } && {
18127 test -z "$ac_c_werror_flag" ||
18128 test ! -s conftest.err
18129 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018130
18131cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018132#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018133_ACEOF
18134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018135 { echo "$as_me:$LINENO: result: yes" >&5
18136echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018139sed 's/^/| /' conftest.$ac_ext >&5
18140
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018141 { echo "$as_me:$LINENO: result: no" >&5
18142echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018143
18144fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018145
18146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018147{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18148echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018150/* confdefs.h. */
18151_ACEOF
18152cat confdefs.h >>conftest.$ac_ext
18153cat >>conftest.$ac_ext <<_ACEOF
18154/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018155#include <unistd.h>
18156int
18157main ()
18158{
18159void *x=fdatasync
18160 ;
18161 return 0;
18162}
18163_ACEOF
18164rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018165if { (ac_try="$ac_compile"
18166case "(($ac_try" in
18167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18168 *) ac_try_echo=$ac_try;;
18169esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018173 grep -v '^ *+' conftest.er1 >conftest.err
18174 rm -f conftest.er1
18175 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018177 (exit $ac_status); } && {
18178 test -z "$ac_c_werror_flag" ||
18179 test ! -s conftest.err
18180 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018181
18182cat >>confdefs.h <<\_ACEOF
18183#define HAVE_FDATASYNC 1
18184_ACEOF
18185
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018186 { echo "$as_me:$LINENO: result: yes" >&5
18187echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018188else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018190sed 's/^/| /' conftest.$ac_ext >&5
18191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018192 { echo "$as_me:$LINENO: result: no" >&5
18193echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018194
18195fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018196
18197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018198{ echo "$as_me:$LINENO: checking for epoll" >&5
18199echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018200cat >conftest.$ac_ext <<_ACEOF
18201/* confdefs.h. */
18202_ACEOF
18203cat confdefs.h >>conftest.$ac_ext
18204cat >>conftest.$ac_ext <<_ACEOF
18205/* end confdefs.h. */
18206#include <sys/epoll.h>
18207int
18208main ()
18209{
18210void *x=epoll_create
18211 ;
18212 return 0;
18213}
18214_ACEOF
18215rm -f conftest.$ac_objext
18216if { (ac_try="$ac_compile"
18217case "(($ac_try" in
18218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18219 *) ac_try_echo=$ac_try;;
18220esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018222 (eval "$ac_compile") 2>conftest.er1
18223 ac_status=$?
18224 grep -v '^ *+' conftest.er1 >conftest.err
18225 rm -f conftest.er1
18226 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018228 (exit $ac_status); } && {
18229 test -z "$ac_c_werror_flag" ||
18230 test ! -s conftest.err
18231 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018232
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018233cat >>confdefs.h <<\_ACEOF
18234#define HAVE_EPOLL 1
18235_ACEOF
18236
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018237 { echo "$as_me:$LINENO: result: yes" >&5
18238echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018239else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018240 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018241sed 's/^/| /' conftest.$ac_ext >&5
18242
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018243 { echo "$as_me:$LINENO: result: no" >&5
18244echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018245
18246fi
18247
18248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018249{ echo "$as_me:$LINENO: checking for kqueue" >&5
18250echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018251cat >conftest.$ac_ext <<_ACEOF
18252/* confdefs.h. */
18253_ACEOF
18254cat confdefs.h >>conftest.$ac_ext
18255cat >>conftest.$ac_ext <<_ACEOF
18256/* end confdefs.h. */
18257
18258#include <sys/types.h>
18259#include <sys/event.h>
18260
18261int
18262main ()
18263{
18264int x=kqueue()
18265 ;
18266 return 0;
18267}
18268_ACEOF
18269rm -f conftest.$ac_objext
18270if { (ac_try="$ac_compile"
18271case "(($ac_try" in
18272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18273 *) ac_try_echo=$ac_try;;
18274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018276 (eval "$ac_compile") 2>conftest.er1
18277 ac_status=$?
18278 grep -v '^ *+' conftest.er1 >conftest.err
18279 rm -f conftest.er1
18280 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018282 (exit $ac_status); } && {
18283 test -z "$ac_c_werror_flag" ||
18284 test ! -s conftest.err
18285 } && test -s conftest.$ac_objext; then
18286
18287cat >>confdefs.h <<\_ACEOF
18288#define HAVE_KQUEUE 1
18289_ACEOF
18290
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018291 { echo "$as_me:$LINENO: result: yes" >&5
18292echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018293else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018294 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018295sed 's/^/| /' conftest.$ac_ext >&5
18296
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018297 { echo "$as_me:$LINENO: result: no" >&5
18298echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018299
18300fi
18301
18302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018303# On some systems (eg. FreeBSD 5), we would find a definition of the
18304# functions ctermid_r, setgroups in the library, but no prototype
18305# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18306# address to avoid compiler warnings and potential miscompilations
18307# because of the missing prototypes.
18308
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018309{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18310echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018311cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018312/* confdefs.h. */
18313_ACEOF
18314cat confdefs.h >>conftest.$ac_ext
18315cat >>conftest.$ac_ext <<_ACEOF
18316/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018317
18318#include "confdefs.h"
18319#include <stdio.h>
18320
Martin v. Löwisd5843682002-11-21 20:41:28 +000018321int
18322main ()
18323{
18324void* p = ctermid_r
18325 ;
18326 return 0;
18327}
18328_ACEOF
18329rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018330if { (ac_try="$ac_compile"
18331case "(($ac_try" in
18332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18333 *) ac_try_echo=$ac_try;;
18334esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018338 grep -v '^ *+' conftest.er1 >conftest.err
18339 rm -f conftest.er1
18340 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018342 (exit $ac_status); } && {
18343 test -z "$ac_c_werror_flag" ||
18344 test ! -s conftest.err
18345 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018346
18347cat >>confdefs.h <<\_ACEOF
18348#define HAVE_CTERMID_R 1
18349_ACEOF
18350
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018351 { echo "$as_me:$LINENO: result: yes" >&5
18352echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018353else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018354 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018355sed 's/^/| /' conftest.$ac_ext >&5
18356
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018357 { echo "$as_me:$LINENO: result: no" >&5
18358echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018359
18360fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018361
Martin v. Löwiseba40652007-08-30 20:10:57 +000018362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18363
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018364{ echo "$as_me:$LINENO: checking for flock" >&5
18365echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018366cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018367/* confdefs.h. */
18368_ACEOF
18369cat confdefs.h >>conftest.$ac_ext
18370cat >>conftest.$ac_ext <<_ACEOF
18371/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018372
18373#include "confdefs.h"
18374#include <sys/file.h>
18375
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018376int
18377main ()
18378{
18379void* p = flock
18380 ;
18381 return 0;
18382}
18383_ACEOF
18384rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018385if { (ac_try="$ac_compile"
18386case "(($ac_try" in
18387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18388 *) ac_try_echo=$ac_try;;
18389esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018391 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018392 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018393 grep -v '^ *+' conftest.er1 >conftest.err
18394 rm -f conftest.er1
18395 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018397 (exit $ac_status); } && {
18398 test -z "$ac_c_werror_flag" ||
18399 test ! -s conftest.err
18400 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018401
18402cat >>confdefs.h <<\_ACEOF
18403#define HAVE_FLOCK 1
18404_ACEOF
18405
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018406 { echo "$as_me:$LINENO: result: yes" >&5
18407echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018408else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018410sed 's/^/| /' conftest.$ac_ext >&5
18411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018412 { echo "$as_me:$LINENO: result: no" >&5
18413echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018414
18415fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018416
Martin v. Löwiseba40652007-08-30 20:10:57 +000018417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18418
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018419{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18420echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018421cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018422/* confdefs.h. */
18423_ACEOF
18424cat confdefs.h >>conftest.$ac_ext
18425cat >>conftest.$ac_ext <<_ACEOF
18426/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018427
18428#include "confdefs.h"
18429#include <unistd.h>
18430
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018431int
18432main ()
18433{
18434void* p = getpagesize
18435 ;
18436 return 0;
18437}
18438_ACEOF
18439rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018440if { (ac_try="$ac_compile"
18441case "(($ac_try" in
18442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18443 *) ac_try_echo=$ac_try;;
18444esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018446 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018448 grep -v '^ *+' conftest.er1 >conftest.err
18449 rm -f conftest.er1
18450 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018452 (exit $ac_status); } && {
18453 test -z "$ac_c_werror_flag" ||
18454 test ! -s conftest.err
18455 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018456
18457cat >>confdefs.h <<\_ACEOF
18458#define HAVE_GETPAGESIZE 1
18459_ACEOF
18460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018461 { echo "$as_me:$LINENO: result: yes" >&5
18462echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018463else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018465sed 's/^/| /' conftest.$ac_ext >&5
18466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018467 { echo "$as_me:$LINENO: result: no" >&5
18468echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018469
18470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018471
18472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018473
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018474for ac_prog in true
18475do
18476 # Extract the first word of "$ac_prog", so it can be a program name with args.
18477set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018478{ echo "$as_me:$LINENO: checking for $ac_word" >&5
18479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018480if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018481 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018482else
18483 if test -n "$TRUE"; then
18484 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18485else
18486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18487for as_dir in $PATH
18488do
18489 IFS=$as_save_IFS
18490 test -z "$as_dir" && as_dir=.
18491 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492 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 +000018493 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018494 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018495 break 2
18496 fi
18497done
18498done
Martin v. Löwiseba40652007-08-30 20:10:57 +000018499IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018500
18501fi
18502fi
18503TRUE=$ac_cv_prog_TRUE
18504if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018505 { echo "$as_me:$LINENO: result: $TRUE" >&5
18506echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018508 { echo "$as_me:$LINENO: result: no" >&5
18509echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018510fi
18511
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018513 test -n "$TRUE" && break
18514done
18515test -n "$TRUE" || TRUE="/bin/true"
18516
18517
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018518{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18519echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018520if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018522else
18523 ac_check_lib_save_LIBS=$LIBS
18524LIBS="-lc $LIBS"
18525cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018526/* confdefs.h. */
18527_ACEOF
18528cat confdefs.h >>conftest.$ac_ext
18529cat >>conftest.$ac_ext <<_ACEOF
18530/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018531
Martin v. Löwiseba40652007-08-30 20:10:57 +000018532/* Override any GCC internal prototype to avoid an error.
18533 Use char because int might match the return type of a GCC
18534 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018535#ifdef __cplusplus
18536extern "C"
18537#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018538char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018539int
18540main ()
18541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018542return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018543 ;
18544 return 0;
18545}
18546_ACEOF
18547rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018548if { (ac_try="$ac_link"
18549case "(($ac_try" in
18550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18551 *) ac_try_echo=$ac_try;;
18552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018556 grep -v '^ *+' conftest.er1 >conftest.err
18557 rm -f conftest.er1
18558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018560 (exit $ac_status); } && {
18561 test -z "$ac_c_werror_flag" ||
18562 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018563 } && test -s conftest$ac_exeext &&
18564 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018565 ac_cv_lib_c_inet_aton=yes
18566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018568sed 's/^/| /' conftest.$ac_ext >&5
18569
Martin v. Löwiseba40652007-08-30 20:10:57 +000018570 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018572
18573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018575LIBS=$ac_check_lib_save_LIBS
18576fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018577{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18578echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
18579if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018580 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018581else
18582
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018583{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18584echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018585if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018586 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018587else
18588 ac_check_lib_save_LIBS=$LIBS
18589LIBS="-lresolv $LIBS"
18590cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018591/* confdefs.h. */
18592_ACEOF
18593cat confdefs.h >>conftest.$ac_ext
18594cat >>conftest.$ac_ext <<_ACEOF
18595/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018596
Martin v. Löwiseba40652007-08-30 20:10:57 +000018597/* Override any GCC internal prototype to avoid an error.
18598 Use char because int might match the return type of a GCC
18599 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018600#ifdef __cplusplus
18601extern "C"
18602#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018603char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018604int
18605main ()
18606{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018607return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018608 ;
18609 return 0;
18610}
18611_ACEOF
18612rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613if { (ac_try="$ac_link"
18614case "(($ac_try" in
18615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18616 *) ac_try_echo=$ac_try;;
18617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018619 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018621 grep -v '^ *+' conftest.er1 >conftest.err
18622 rm -f conftest.er1
18623 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018625 (exit $ac_status); } && {
18626 test -z "$ac_c_werror_flag" ||
18627 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018628 } && test -s conftest$ac_exeext &&
18629 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018630 ac_cv_lib_resolv_inet_aton=yes
18631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018633sed 's/^/| /' conftest.$ac_ext >&5
18634
Martin v. Löwiseba40652007-08-30 20:10:57 +000018635 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018637
18638rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018640LIBS=$ac_check_lib_save_LIBS
18641fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018642{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18643echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
18644if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018645 cat >>confdefs.h <<_ACEOF
18646#define HAVE_LIBRESOLV 1
18647_ACEOF
18648
18649 LIBS="-lresolv $LIBS"
18650
18651fi
18652
18653
18654fi
18655
18656
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018657# On Tru64, chflags seems to be present, but calling it will
18658# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018659{ echo "$as_me:$LINENO: checking for chflags" >&5
18660echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018661if test "${ac_cv_have_chflags+set}" = set; then
18662 echo $ECHO_N "(cached) $ECHO_C" >&6
18663else
18664 if test "$cross_compiling" = yes; then
18665 ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018666else
18667 cat >conftest.$ac_ext <<_ACEOF
18668/* confdefs.h. */
18669_ACEOF
18670cat confdefs.h >>conftest.$ac_ext
18671cat >>conftest.$ac_ext <<_ACEOF
18672/* end confdefs.h. */
18673
18674#include <sys/stat.h>
18675#include <unistd.h>
18676int main(int argc, char*argv[])
18677{
18678 if(chflags(argv[0], 0) != 0)
18679 return 1;
18680 return 0;
18681}
18682
18683_ACEOF
18684rm -f conftest$ac_exeext
18685if { (ac_try="$ac_link"
18686case "(($ac_try" in
18687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18688 *) ac_try_echo=$ac_try;;
18689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018691 (eval "$ac_link") 2>&5
18692 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018694 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18695 { (case "(($ac_try" in
18696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18697 *) ac_try_echo=$ac_try;;
18698esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018700 (eval "$ac_try") 2>&5
18701 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018703 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018704 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018705else
18706 echo "$as_me: program exited with status $ac_status" >&5
18707echo "$as_me: failed program was:" >&5
18708sed 's/^/| /' conftest.$ac_ext >&5
18709
18710( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018711ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018712fi
18713rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000018714fi
18715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018716
18717
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018718fi
18719
18720{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18721echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
18722if test $ac_cv_have_chflags = yes
18723then
18724
18725cat >>confdefs.h <<\_ACEOF
18726#define HAVE_CHFLAGS 1
18727_ACEOF
18728
18729fi
18730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018731{ echo "$as_me:$LINENO: checking for lchflags" >&5
18732echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018733if test "${ac_cv_have_lchflags+set}" = set; then
18734 echo $ECHO_N "(cached) $ECHO_C" >&6
18735else
18736 if test "$cross_compiling" = yes; then
18737 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018738else
18739 cat >conftest.$ac_ext <<_ACEOF
18740/* confdefs.h. */
18741_ACEOF
18742cat confdefs.h >>conftest.$ac_ext
18743cat >>conftest.$ac_ext <<_ACEOF
18744/* end confdefs.h. */
18745
18746#include <sys/stat.h>
18747#include <unistd.h>
18748int main(int argc, char*argv[])
18749{
18750 if(lchflags(argv[0], 0) != 0)
18751 return 1;
18752 return 0;
18753}
18754
18755_ACEOF
18756rm -f conftest$ac_exeext
18757if { (ac_try="$ac_link"
18758case "(($ac_try" in
18759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18760 *) ac_try_echo=$ac_try;;
18761esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018763 (eval "$ac_link") 2>&5
18764 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18767 { (case "(($ac_try" in
18768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18769 *) ac_try_echo=$ac_try;;
18770esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018772 (eval "$ac_try") 2>&5
18773 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018775 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018776 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018777else
18778 echo "$as_me: program exited with status $ac_status" >&5
18779echo "$as_me: failed program was:" >&5
18780sed 's/^/| /' conftest.$ac_ext >&5
18781
18782( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018783ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018784fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018785rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18786fi
18787
18788
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000018789
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000018790fi
18791
18792{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18793echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
18794if test $ac_cv_have_lchflags = yes
18795then
18796
18797cat >>confdefs.h <<\_ACEOF
18798#define HAVE_LCHFLAGS 1
18799_ACEOF
18800
18801fi
18802
Ronald Oussorenf8752642006-07-06 10:13:35 +000018803case $ac_sys_system/$ac_sys_release in
18804Darwin/*)
18805 _CUR_CFLAGS="${CFLAGS}"
18806 _CUR_LDFLAGS="${LDFLAGS}"
18807 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18808 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18809 ;;
18810esac
18811
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018812{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18813echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018814if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018815 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018816else
18817 ac_check_lib_save_LIBS=$LIBS
18818LIBS="-lz $LIBS"
18819cat >conftest.$ac_ext <<_ACEOF
18820/* confdefs.h. */
18821_ACEOF
18822cat confdefs.h >>conftest.$ac_ext
18823cat >>conftest.$ac_ext <<_ACEOF
18824/* end confdefs.h. */
18825
Martin v. Löwiseba40652007-08-30 20:10:57 +000018826/* Override any GCC internal prototype to avoid an error.
18827 Use char because int might match the return type of a GCC
18828 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018829#ifdef __cplusplus
18830extern "C"
18831#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018832char inflateCopy ();
18833int
18834main ()
18835{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018836return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018837 ;
18838 return 0;
18839}
18840_ACEOF
18841rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018842if { (ac_try="$ac_link"
18843case "(($ac_try" in
18844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18845 *) ac_try_echo=$ac_try;;
18846esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018848 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018849 ac_status=$?
18850 grep -v '^ *+' conftest.er1 >conftest.err
18851 rm -f conftest.er1
18852 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018854 (exit $ac_status); } && {
18855 test -z "$ac_c_werror_flag" ||
18856 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018857 } && test -s conftest$ac_exeext &&
18858 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018859 ac_cv_lib_z_inflateCopy=yes
18860else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018861 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018862sed 's/^/| /' conftest.$ac_ext >&5
18863
Martin v. Löwiseba40652007-08-30 20:10:57 +000018864 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018866
18867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018868 conftest$ac_exeext conftest.$ac_ext
18869LIBS=$ac_check_lib_save_LIBS
18870fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018871{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18872echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
18873if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018874
18875cat >>confdefs.h <<\_ACEOF
18876#define HAVE_ZLIB_COPY 1
18877_ACEOF
18878
18879fi
18880
18881
Ronald Oussorenf8752642006-07-06 10:13:35 +000018882case $ac_sys_system/$ac_sys_release in
18883Darwin/*)
18884 CFLAGS="${_CUR_CFLAGS}"
18885 LDFLAGS="${_CUR_LDFLAGS}"
18886 ;;
18887esac
18888
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018889{ echo "$as_me:$LINENO: checking for hstrerror" >&5
18890echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018892/* confdefs.h. */
18893_ACEOF
18894cat confdefs.h >>conftest.$ac_ext
18895cat >>conftest.$ac_ext <<_ACEOF
18896/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018897
18898#include "confdefs.h"
18899#include <netdb.h>
18900
Martin v. Löwise9416172003-05-03 10:12:45 +000018901int
18902main ()
18903{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018904void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018905 ;
18906 return 0;
18907}
18908_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018909rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018910if { (ac_try="$ac_link"
18911case "(($ac_try" in
18912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18913 *) ac_try_echo=$ac_try;;
18914esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018916 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018917 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018918 grep -v '^ *+' conftest.er1 >conftest.err
18919 rm -f conftest.er1
18920 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018922 (exit $ac_status); } && {
18923 test -z "$ac_c_werror_flag" ||
18924 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018925 } && test -s conftest$ac_exeext &&
18926 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018927
18928cat >>confdefs.h <<\_ACEOF
18929#define HAVE_HSTRERROR 1
18930_ACEOF
18931
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018932 { echo "$as_me:$LINENO: result: yes" >&5
18933echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018934else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018936sed 's/^/| /' conftest.$ac_ext >&5
18937
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018938 { echo "$as_me:$LINENO: result: no" >&5
18939echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018940
18941fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942
18943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018944 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018945
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018946{ echo "$as_me:$LINENO: checking for inet_aton" >&5
18947echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018949/* confdefs.h. */
18950_ACEOF
18951cat confdefs.h >>conftest.$ac_ext
18952cat >>conftest.$ac_ext <<_ACEOF
18953/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018954
18955#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018956#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018957#include <sys/socket.h>
18958#include <netinet/in.h>
18959#include <arpa/inet.h>
18960
Martin v. Löwise9416172003-05-03 10:12:45 +000018961int
18962main ()
18963{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018964void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018965 ;
18966 return 0;
18967}
18968_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018969rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018970if { (ac_try="$ac_link"
18971case "(($ac_try" in
18972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18973 *) ac_try_echo=$ac_try;;
18974esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018976 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018978 grep -v '^ *+' conftest.er1 >conftest.err
18979 rm -f conftest.er1
18980 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018982 (exit $ac_status); } && {
18983 test -z "$ac_c_werror_flag" ||
18984 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018985 } && test -s conftest$ac_exeext &&
18986 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018987
18988cat >>confdefs.h <<\_ACEOF
18989#define HAVE_INET_ATON 1
18990_ACEOF
18991
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018992 { echo "$as_me:$LINENO: result: yes" >&5
18993echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018994else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018996sed 's/^/| /' conftest.$ac_ext >&5
18997
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018998 { echo "$as_me:$LINENO: result: no" >&5
18999echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019000
19001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019002
19003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019004 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019006{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19007echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019008cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019009/* confdefs.h. */
19010_ACEOF
19011cat confdefs.h >>conftest.$ac_ext
19012cat >>conftest.$ac_ext <<_ACEOF
19013/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019014
19015#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019016#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019017#include <sys/socket.h>
19018#include <netinet/in.h>
19019#include <arpa/inet.h>
19020
Martin v. Löwise9416172003-05-03 10:12:45 +000019021int
19022main ()
19023{
19024void* p = inet_pton
19025 ;
19026 return 0;
19027}
19028_ACEOF
19029rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019030if { (ac_try="$ac_compile"
19031case "(($ac_try" in
19032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19033 *) ac_try_echo=$ac_try;;
19034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019036 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019038 grep -v '^ *+' conftest.er1 >conftest.err
19039 rm -f conftest.er1
19040 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019042 (exit $ac_status); } && {
19043 test -z "$ac_c_werror_flag" ||
19044 test ! -s conftest.err
19045 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019046
19047cat >>confdefs.h <<\_ACEOF
19048#define HAVE_INET_PTON 1
19049_ACEOF
19050
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019051 { echo "$as_me:$LINENO: result: yes" >&5
19052echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019053else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019054 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019055sed 's/^/| /' conftest.$ac_ext >&5
19056
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019057 { echo "$as_me:$LINENO: result: no" >&5
19058echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019059
19060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019061
19062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019063
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019064# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019065{ echo "$as_me:$LINENO: checking for setgroups" >&5
19066echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019068/* confdefs.h. */
19069_ACEOF
19070cat confdefs.h >>conftest.$ac_ext
19071cat >>conftest.$ac_ext <<_ACEOF
19072/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019073
19074#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019075#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019076#ifdef HAVE_GRP_H
19077#include <grp.h>
19078#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019079
Martin v. Löwisd5843682002-11-21 20:41:28 +000019080int
19081main ()
19082{
19083void* p = setgroups
19084 ;
19085 return 0;
19086}
19087_ACEOF
19088rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089if { (ac_try="$ac_compile"
19090case "(($ac_try" in
19091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19092 *) ac_try_echo=$ac_try;;
19093esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019094eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019097 grep -v '^ *+' conftest.er1 >conftest.err
19098 rm -f conftest.er1
19099 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019101 (exit $ac_status); } && {
19102 test -z "$ac_c_werror_flag" ||
19103 test ! -s conftest.err
19104 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019105
19106cat >>confdefs.h <<\_ACEOF
19107#define HAVE_SETGROUPS 1
19108_ACEOF
19109
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019110 { echo "$as_me:$LINENO: result: yes" >&5
19111echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019112else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019113 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019114sed 's/^/| /' conftest.$ac_ext >&5
19115
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019116 { echo "$as_me:$LINENO: result: no" >&5
19117echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019118
19119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019120
19121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019122
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019123# check for openpty and forkpty
19124
Martin v. Löwis11437992002-04-12 09:54:03 +000019125
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019126for ac_func in openpty
19127do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019128as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19129{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19130echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019131if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019133else
Martin v. Löwis11437992002-04-12 09:54:03 +000019134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019135/* confdefs.h. */
19136_ACEOF
19137cat confdefs.h >>conftest.$ac_ext
19138cat >>conftest.$ac_ext <<_ACEOF
19139/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019140/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19141 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19142#define $ac_func innocuous_$ac_func
19143
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019144/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019145 which can conflict with char $ac_func (); below.
19146 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019147 <limits.h> exists even on freestanding compilers. */
19148
19149#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019150# include <limits.h>
19151#else
19152# include <assert.h>
19153#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019154
19155#undef $ac_func
19156
Martin v. Löwiseba40652007-08-30 20:10:57 +000019157/* Override any GCC internal prototype to avoid an error.
19158 Use char because int might match the return type of a GCC
19159 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019160#ifdef __cplusplus
19161extern "C"
19162#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019163char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019164/* The GNU C library defines this for functions which it implements
19165 to always fail with ENOSYS. Some functions are actually named
19166 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019167#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019168choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019169#endif
19170
Skip Montanaro6dead952003-09-25 14:50:04 +000019171int
19172main ()
19173{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019174return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019175 ;
19176 return 0;
19177}
19178_ACEOF
19179rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019180if { (ac_try="$ac_link"
19181case "(($ac_try" in
19182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19183 *) ac_try_echo=$ac_try;;
19184esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019186 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019188 grep -v '^ *+' conftest.er1 >conftest.err
19189 rm -f conftest.er1
19190 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019192 (exit $ac_status); } && {
19193 test -z "$ac_c_werror_flag" ||
19194 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019195 } && test -s conftest$ac_exeext &&
19196 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019197 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019198else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019200sed 's/^/| /' conftest.$ac_ext >&5
19201
Martin v. Löwiseba40652007-08-30 20:10:57 +000019202 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019204
19205rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019206 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019207fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019208ac_res=`eval echo '${'$as_ac_var'}'`
19209 { echo "$as_me:$LINENO: result: $ac_res" >&5
19210echo "${ECHO_T}$ac_res" >&6; }
19211if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019212 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019213#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019214_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019215
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019216else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019217 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19218echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019219if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019220 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019221else
Martin v. Löwis11437992002-04-12 09:54:03 +000019222 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019223LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019224cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019225/* confdefs.h. */
19226_ACEOF
19227cat confdefs.h >>conftest.$ac_ext
19228cat >>conftest.$ac_ext <<_ACEOF
19229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019230
Martin v. Löwiseba40652007-08-30 20:10:57 +000019231/* Override any GCC internal prototype to avoid an error.
19232 Use char because int might match the return type of a GCC
19233 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019234#ifdef __cplusplus
19235extern "C"
19236#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019237char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019238int
19239main ()
19240{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019241return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019242 ;
19243 return 0;
19244}
19245_ACEOF
19246rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019247if { (ac_try="$ac_link"
19248case "(($ac_try" in
19249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19250 *) ac_try_echo=$ac_try;;
19251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019253 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019255 grep -v '^ *+' conftest.er1 >conftest.err
19256 rm -f conftest.er1
19257 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019259 (exit $ac_status); } && {
19260 test -z "$ac_c_werror_flag" ||
19261 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019262 } && test -s conftest$ac_exeext &&
19263 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019264 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019265else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019267sed 's/^/| /' conftest.$ac_ext >&5
19268
Martin v. Löwiseba40652007-08-30 20:10:57 +000019269 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019270fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019271
19272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019274LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019275fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019276{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19277echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
19278if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019279 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019280#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019281_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019282 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019283else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019284 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19285echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019286if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019287 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019288else
19289 ac_check_lib_save_LIBS=$LIBS
19290LIBS="-lbsd $LIBS"
19291cat >conftest.$ac_ext <<_ACEOF
19292/* confdefs.h. */
19293_ACEOF
19294cat confdefs.h >>conftest.$ac_ext
19295cat >>conftest.$ac_ext <<_ACEOF
19296/* end confdefs.h. */
19297
Martin v. Löwiseba40652007-08-30 20:10:57 +000019298/* Override any GCC internal prototype to avoid an error.
19299 Use char because int might match the return type of a GCC
19300 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019301#ifdef __cplusplus
19302extern "C"
19303#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019304char openpty ();
19305int
19306main ()
19307{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019308return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019309 ;
19310 return 0;
19311}
19312_ACEOF
19313rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019314if { (ac_try="$ac_link"
19315case "(($ac_try" in
19316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19317 *) ac_try_echo=$ac_try;;
19318esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019320 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019321 ac_status=$?
19322 grep -v '^ *+' conftest.er1 >conftest.err
19323 rm -f conftest.er1
19324 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019326 (exit $ac_status); } && {
19327 test -z "$ac_c_werror_flag" ||
19328 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019329 } && test -s conftest$ac_exeext &&
19330 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019331 ac_cv_lib_bsd_openpty=yes
19332else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019333 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019334sed 's/^/| /' conftest.$ac_ext >&5
19335
Martin v. Löwiseba40652007-08-30 20:10:57 +000019336 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019338
19339rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019340 conftest$ac_exeext conftest.$ac_ext
19341LIBS=$ac_check_lib_save_LIBS
19342fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019343{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19344echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
19345if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019346 cat >>confdefs.h <<\_ACEOF
19347#define HAVE_OPENPTY 1
19348_ACEOF
19349 LIBS="$LIBS -lbsd"
19350fi
19351
19352
19353fi
19354
Fred Drake8cef4cf2000-06-28 16:40:38 +000019355
19356fi
19357done
19358
Martin v. Löwis11437992002-04-12 09:54:03 +000019359
Fred Drake8cef4cf2000-06-28 16:40:38 +000019360for ac_func in forkpty
19361do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019362as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19363{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19364echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019365if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019366 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019367else
Martin v. Löwis11437992002-04-12 09:54:03 +000019368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019369/* confdefs.h. */
19370_ACEOF
19371cat confdefs.h >>conftest.$ac_ext
19372cat >>conftest.$ac_ext <<_ACEOF
19373/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019374/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19375 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19376#define $ac_func innocuous_$ac_func
19377
Fred Drake8cef4cf2000-06-28 16:40:38 +000019378/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019379 which can conflict with char $ac_func (); below.
19380 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019381 <limits.h> exists even on freestanding compilers. */
19382
19383#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019384# include <limits.h>
19385#else
19386# include <assert.h>
19387#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019388
19389#undef $ac_func
19390
Martin v. Löwiseba40652007-08-30 20:10:57 +000019391/* Override any GCC internal prototype to avoid an error.
19392 Use char because int might match the return type of a GCC
19393 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019394#ifdef __cplusplus
19395extern "C"
19396#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019397char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019398/* The GNU C library defines this for functions which it implements
19399 to always fail with ENOSYS. Some functions are actually named
19400 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019401#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019402choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019403#endif
19404
Skip Montanaro6dead952003-09-25 14:50:04 +000019405int
19406main ()
19407{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019408return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019409 ;
19410 return 0;
19411}
19412_ACEOF
19413rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019414if { (ac_try="$ac_link"
19415case "(($ac_try" in
19416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19417 *) ac_try_echo=$ac_try;;
19418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019420 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019422 grep -v '^ *+' conftest.er1 >conftest.err
19423 rm -f conftest.er1
19424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019426 (exit $ac_status); } && {
19427 test -z "$ac_c_werror_flag" ||
19428 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019429 } && test -s conftest$ac_exeext &&
19430 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019431 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019432else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019434sed 's/^/| /' conftest.$ac_ext >&5
19435
Martin v. Löwiseba40652007-08-30 20:10:57 +000019436 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019437fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019438
19439rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019440 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019441fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019442ac_res=`eval echo '${'$as_ac_var'}'`
19443 { echo "$as_me:$LINENO: result: $ac_res" >&5
19444echo "${ECHO_T}$ac_res" >&6; }
19445if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019446 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019447#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019448_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019449
Fred Drake8cef4cf2000-06-28 16:40:38 +000019450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019451 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19452echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019453if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019454 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019455else
Martin v. Löwis11437992002-04-12 09:54:03 +000019456 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019457LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019458cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019459/* confdefs.h. */
19460_ACEOF
19461cat confdefs.h >>conftest.$ac_ext
19462cat >>conftest.$ac_ext <<_ACEOF
19463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019464
Martin v. Löwiseba40652007-08-30 20:10:57 +000019465/* Override any GCC internal prototype to avoid an error.
19466 Use char because int might match the return type of a GCC
19467 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019468#ifdef __cplusplus
19469extern "C"
19470#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019471char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019472int
19473main ()
19474{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019475return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 ;
19477 return 0;
19478}
19479_ACEOF
19480rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019481if { (ac_try="$ac_link"
19482case "(($ac_try" in
19483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19484 *) ac_try_echo=$ac_try;;
19485esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019487 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019489 grep -v '^ *+' conftest.er1 >conftest.err
19490 rm -f conftest.er1
19491 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019493 (exit $ac_status); } && {
19494 test -z "$ac_c_werror_flag" ||
19495 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019496 } && test -s conftest$ac_exeext &&
19497 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019499else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019501sed 's/^/| /' conftest.$ac_ext >&5
19502
Martin v. Löwiseba40652007-08-30 20:10:57 +000019503 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019505
19506rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019508LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019509fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019510{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19511echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
19512if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019513 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019514#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019515_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019516 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019518 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19519echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019520if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019521 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019522else
19523 ac_check_lib_save_LIBS=$LIBS
19524LIBS="-lbsd $LIBS"
19525cat >conftest.$ac_ext <<_ACEOF
19526/* confdefs.h. */
19527_ACEOF
19528cat confdefs.h >>conftest.$ac_ext
19529cat >>conftest.$ac_ext <<_ACEOF
19530/* end confdefs.h. */
19531
Martin v. Löwiseba40652007-08-30 20:10:57 +000019532/* Override any GCC internal prototype to avoid an error.
19533 Use char because int might match the return type of a GCC
19534 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019535#ifdef __cplusplus
19536extern "C"
19537#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019538char forkpty ();
19539int
19540main ()
19541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019542return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019543 ;
19544 return 0;
19545}
19546_ACEOF
19547rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019548if { (ac_try="$ac_link"
19549case "(($ac_try" in
19550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19551 *) ac_try_echo=$ac_try;;
19552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019555 ac_status=$?
19556 grep -v '^ *+' conftest.er1 >conftest.err
19557 rm -f conftest.er1
19558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019560 (exit $ac_status); } && {
19561 test -z "$ac_c_werror_flag" ||
19562 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019563 } && test -s conftest$ac_exeext &&
19564 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019565 ac_cv_lib_bsd_forkpty=yes
19566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019567 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019568sed 's/^/| /' conftest.$ac_ext >&5
19569
Martin v. Löwiseba40652007-08-30 20:10:57 +000019570 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019572
19573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019574 conftest$ac_exeext conftest.$ac_ext
19575LIBS=$ac_check_lib_save_LIBS
19576fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019577{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19578echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
19579if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019580 cat >>confdefs.h <<\_ACEOF
19581#define HAVE_FORKPTY 1
19582_ACEOF
19583 LIBS="$LIBS -lbsd"
19584fi
19585
19586
19587fi
19588
Fred Drake8cef4cf2000-06-28 16:40:38 +000019589
19590fi
19591done
19592
Jack Jansendd19cf82001-12-06 22:36:17 +000019593
Brett Cannonaa5778d2008-03-18 04:09:00 +000019594# Stuff for expat.
19595
19596for ac_func in memmove
19597do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019598as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19599{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19600echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000019601if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019602 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000019603else
19604 cat >conftest.$ac_ext <<_ACEOF
19605/* confdefs.h. */
19606_ACEOF
19607cat confdefs.h >>conftest.$ac_ext
19608cat >>conftest.$ac_ext <<_ACEOF
19609/* end confdefs.h. */
19610/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19611 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19612#define $ac_func innocuous_$ac_func
19613
19614/* System header to define __stub macros and hopefully few prototypes,
19615 which can conflict with char $ac_func (); below.
19616 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19617 <limits.h> exists even on freestanding compilers. */
19618
19619#ifdef __STDC__
19620# include <limits.h>
19621#else
19622# include <assert.h>
19623#endif
19624
19625#undef $ac_func
19626
19627/* Override any GCC internal prototype to avoid an error.
19628 Use char because int might match the return type of a GCC
19629 builtin and then its argument prototype would still apply. */
19630#ifdef __cplusplus
19631extern "C"
19632#endif
19633char $ac_func ();
19634/* The GNU C library defines this for functions which it implements
19635 to always fail with ENOSYS. Some functions are actually named
19636 something starting with __ and the normal name is an alias. */
19637#if defined __stub_$ac_func || defined __stub___$ac_func
19638choke me
19639#endif
19640
19641int
19642main ()
19643{
19644return $ac_func ();
19645 ;
19646 return 0;
19647}
19648_ACEOF
19649rm -f conftest.$ac_objext conftest$ac_exeext
19650if { (ac_try="$ac_link"
19651case "(($ac_try" in
19652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19653 *) ac_try_echo=$ac_try;;
19654esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019656 (eval "$ac_link") 2>conftest.er1
19657 ac_status=$?
19658 grep -v '^ *+' conftest.er1 >conftest.err
19659 rm -f conftest.er1
19660 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019662 (exit $ac_status); } && {
19663 test -z "$ac_c_werror_flag" ||
19664 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019665 } && test -s conftest$ac_exeext &&
19666 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019667 eval "$as_ac_var=yes"
19668else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019669 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000019670sed 's/^/| /' conftest.$ac_ext >&5
19671
19672 eval "$as_ac_var=no"
19673fi
19674
19675rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19676 conftest$ac_exeext conftest.$ac_ext
19677fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019678ac_res=`eval echo '${'$as_ac_var'}'`
19679 { echo "$as_me:$LINENO: result: $ac_res" >&5
19680echo "${ECHO_T}$ac_res" >&6; }
19681if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000019682 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019683#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000019684_ACEOF
19685
19686fi
19687done
19688
19689
Michael W. Hudson54241132001-12-07 15:38:26 +000019690# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019691
19692
19693
19694
19695
19696
Fred Drake8cef4cf2000-06-28 16:40:38 +000019697for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19698do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019699as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19700{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19701echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019702if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019704else
Martin v. Löwis11437992002-04-12 09:54:03 +000019705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019706/* confdefs.h. */
19707_ACEOF
19708cat confdefs.h >>conftest.$ac_ext
19709cat >>conftest.$ac_ext <<_ACEOF
19710/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019711/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19712 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19713#define $ac_func innocuous_$ac_func
19714
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019715/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019716 which can conflict with char $ac_func (); below.
19717 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019718 <limits.h> exists even on freestanding compilers. */
19719
19720#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019721# include <limits.h>
19722#else
19723# include <assert.h>
19724#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019725
19726#undef $ac_func
19727
Martin v. Löwiseba40652007-08-30 20:10:57 +000019728/* Override any GCC internal prototype to avoid an error.
19729 Use char because int might match the return type of a GCC
19730 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019731#ifdef __cplusplus
19732extern "C"
19733#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019734char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019735/* The GNU C library defines this for functions which it implements
19736 to always fail with ENOSYS. Some functions are actually named
19737 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019738#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019739choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019740#endif
19741
Skip Montanaro6dead952003-09-25 14:50:04 +000019742int
19743main ()
19744{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019745return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019746 ;
19747 return 0;
19748}
19749_ACEOF
19750rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019751if { (ac_try="$ac_link"
19752case "(($ac_try" in
19753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19754 *) ac_try_echo=$ac_try;;
19755esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019757 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019758 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019759 grep -v '^ *+' conftest.er1 >conftest.err
19760 rm -f conftest.er1
19761 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019763 (exit $ac_status); } && {
19764 test -z "$ac_c_werror_flag" ||
19765 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019766 } && test -s conftest$ac_exeext &&
19767 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019768 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019769else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019770 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019771sed 's/^/| /' conftest.$ac_ext >&5
19772
Martin v. Löwiseba40652007-08-30 20:10:57 +000019773 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019774fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019775
19776rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019777 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019778fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019779ac_res=`eval echo '${'$as_ac_var'}'`
19780 { echo "$as_me:$LINENO: result: $ac_res" >&5
19781echo "${ECHO_T}$ac_res" >&6; }
19782if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019783 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019784#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019785_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019786
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019787fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019788done
19789
Michael W. Hudson54241132001-12-07 15:38:26 +000019790
Martin v. Löwis11437992002-04-12 09:54:03 +000019791
19792
19793
Brett Cannonaa5778d2008-03-18 04:09:00 +000019794for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019795do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019796as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19797{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19798echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019799if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019800 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019801else
Martin v. Löwis11437992002-04-12 09:54:03 +000019802 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019803/* confdefs.h. */
19804_ACEOF
19805cat confdefs.h >>conftest.$ac_ext
19806cat >>conftest.$ac_ext <<_ACEOF
19807/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019808/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19809 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19810#define $ac_func innocuous_$ac_func
19811
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019812/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019813 which can conflict with char $ac_func (); below.
19814 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019815 <limits.h> exists even on freestanding compilers. */
19816
19817#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019818# include <limits.h>
19819#else
19820# include <assert.h>
19821#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019822
19823#undef $ac_func
19824
Martin v. Löwiseba40652007-08-30 20:10:57 +000019825/* Override any GCC internal prototype to avoid an error.
19826 Use char because int might match the return type of a GCC
19827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019828#ifdef __cplusplus
19829extern "C"
19830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019831char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019832/* The GNU C library defines this for functions which it implements
19833 to always fail with ENOSYS. Some functions are actually named
19834 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019836choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019837#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019838
Skip Montanaro6dead952003-09-25 14:50:04 +000019839int
19840main ()
19841{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019842return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019843 ;
19844 return 0;
19845}
19846_ACEOF
19847rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019848if { (ac_try="$ac_link"
19849case "(($ac_try" in
19850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19851 *) ac_try_echo=$ac_try;;
19852esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019856 grep -v '^ *+' conftest.er1 >conftest.err
19857 rm -f conftest.er1
19858 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019860 (exit $ac_status); } && {
19861 test -z "$ac_c_werror_flag" ||
19862 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019863 } && test -s conftest$ac_exeext &&
19864 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019865 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019868sed 's/^/| /' conftest.$ac_ext >&5
19869
Martin v. Löwiseba40652007-08-30 20:10:57 +000019870 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019872
19873rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019874 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019875fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019876ac_res=`eval echo '${'$as_ac_var'}'`
19877 { echo "$as_me:$LINENO: result: $ac_res" >&5
19878echo "${ECHO_T}$ac_res" >&6; }
19879if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019880 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019881#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019882_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019883
Martin v. Löwis1142de32002-03-29 16:28:31 +000019884else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019885 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019886 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019887 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19888 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019889esac
19890
Martin v. Löwis1142de32002-03-29 16:28:31 +000019891fi
19892done
19893
19894
Martin v. Löwis11437992002-04-12 09:54:03 +000019895
Martin v. Löwis1142de32002-03-29 16:28:31 +000019896for ac_func in getpgrp
19897do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019898as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19899{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19900echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019901if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019902 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019903else
Martin v. Löwis11437992002-04-12 09:54:03 +000019904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019905/* confdefs.h. */
19906_ACEOF
19907cat confdefs.h >>conftest.$ac_ext
19908cat >>conftest.$ac_ext <<_ACEOF
19909/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019910/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19911 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19912#define $ac_func innocuous_$ac_func
19913
Martin v. Löwis1142de32002-03-29 16:28:31 +000019914/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019915 which can conflict with char $ac_func (); below.
19916 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019917 <limits.h> exists even on freestanding compilers. */
19918
19919#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019920# include <limits.h>
19921#else
19922# include <assert.h>
19923#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019924
19925#undef $ac_func
19926
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927/* Override any GCC internal prototype to avoid an error.
19928 Use char because int might match the return type of a GCC
19929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019930#ifdef __cplusplus
19931extern "C"
19932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019933char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019934/* The GNU C library defines this for functions which it implements
19935 to always fail with ENOSYS. Some functions are actually named
19936 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019937#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019938choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019939#endif
19940
Skip Montanaro6dead952003-09-25 14:50:04 +000019941int
19942main ()
19943{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019944return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019945 ;
19946 return 0;
19947}
19948_ACEOF
19949rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019950if { (ac_try="$ac_link"
19951case "(($ac_try" in
19952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19953 *) ac_try_echo=$ac_try;;
19954esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019958 grep -v '^ *+' conftest.er1 >conftest.err
19959 rm -f conftest.er1
19960 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019962 (exit $ac_status); } && {
19963 test -z "$ac_c_werror_flag" ||
19964 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019965 } && test -s conftest$ac_exeext &&
19966 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019967 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019969 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019970sed 's/^/| /' conftest.$ac_ext >&5
19971
Martin v. Löwiseba40652007-08-30 20:10:57 +000019972 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019974
19975rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019976 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019977fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019978ac_res=`eval echo '${'$as_ac_var'}'`
19979 { echo "$as_me:$LINENO: result: $ac_res" >&5
19980echo "${ECHO_T}$ac_res" >&6; }
19981if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019982 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019983#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019984_ACEOF
19985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019986/* confdefs.h. */
19987_ACEOF
19988cat confdefs.h >>conftest.$ac_ext
19989cat >>conftest.$ac_ext <<_ACEOF
19990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019991#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019992int
19993main ()
19994{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019995getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 ;
19997 return 0;
19998}
19999_ACEOF
20000rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020001if { (ac_try="$ac_compile"
20002case "(($ac_try" in
20003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20004 *) ac_try_echo=$ac_try;;
20005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020009 grep -v '^ *+' conftest.er1 >conftest.err
20010 rm -f conftest.er1
20011 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020013 (exit $ac_status); } && {
20014 test -z "$ac_c_werror_flag" ||
20015 test ! -s conftest.err
20016 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020017
20018cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020019#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020020_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020021
Martin v. Löwis11437992002-04-12 09:54:03 +000020022
Guido van Rossumf78abae1997-01-21 22:02:36 +000020023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020025sed 's/^/| /' conftest.$ac_ext >&5
20026
Martin v. Löwiseba40652007-08-30 20:10:57 +000020027
Guido van Rossum627b2d71993-12-24 10:39:16 +000020028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020029
20030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020031
Guido van Rossum627b2d71993-12-24 10:39:16 +000020032fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020033done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020034
Jack Jansen150753c2003-03-29 22:07:47 +000020035
20036for ac_func in setpgrp
20037do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020038as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20039{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20040echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020041if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020042 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020043else
Martin v. Löwis11437992002-04-12 09:54:03 +000020044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020045/* confdefs.h. */
20046_ACEOF
20047cat confdefs.h >>conftest.$ac_ext
20048cat >>conftest.$ac_ext <<_ACEOF
20049/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020050/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20051 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20052#define $ac_func innocuous_$ac_func
20053
Jack Jansen150753c2003-03-29 22:07:47 +000020054/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020055 which can conflict with char $ac_func (); below.
20056 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020057 <limits.h> exists even on freestanding compilers. */
20058
20059#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020060# include <limits.h>
20061#else
20062# include <assert.h>
20063#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020064
20065#undef $ac_func
20066
Martin v. Löwiseba40652007-08-30 20:10:57 +000020067/* Override any GCC internal prototype to avoid an error.
20068 Use char because int might match the return type of a GCC
20069 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020070#ifdef __cplusplus
20071extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020072#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020073char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020074/* The GNU C library defines this for functions which it implements
20075 to always fail with ENOSYS. Some functions are actually named
20076 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020077#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020078choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020079#endif
20080
Skip Montanaro6dead952003-09-25 14:50:04 +000020081int
20082main ()
20083{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020084return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020085 ;
20086 return 0;
20087}
20088_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020089rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020090if { (ac_try="$ac_link"
20091case "(($ac_try" in
20092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20093 *) ac_try_echo=$ac_try;;
20094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020096 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020098 grep -v '^ *+' conftest.er1 >conftest.err
20099 rm -f conftest.er1
20100 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020102 (exit $ac_status); } && {
20103 test -z "$ac_c_werror_flag" ||
20104 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020105 } && test -s conftest$ac_exeext &&
20106 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020107 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020108else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020110sed 's/^/| /' conftest.$ac_ext >&5
20111
Martin v. Löwiseba40652007-08-30 20:10:57 +000020112 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020114
20115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020116 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020117fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020118ac_res=`eval echo '${'$as_ac_var'}'`
20119 { echo "$as_me:$LINENO: result: $ac_res" >&5
20120echo "${ECHO_T}$ac_res" >&6; }
20121if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020122 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020123#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020124_ACEOF
20125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020126/* confdefs.h. */
20127_ACEOF
20128cat confdefs.h >>conftest.$ac_ext
20129cat >>conftest.$ac_ext <<_ACEOF
20130/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020131#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020132int
20133main ()
20134{
20135setpgrp(0,0);
20136 ;
20137 return 0;
20138}
20139_ACEOF
20140rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020141if { (ac_try="$ac_compile"
20142case "(($ac_try" in
20143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20144 *) ac_try_echo=$ac_try;;
20145esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020146eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020147 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020149 grep -v '^ *+' conftest.er1 >conftest.err
20150 rm -f conftest.er1
20151 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020153 (exit $ac_status); } && {
20154 test -z "$ac_c_werror_flag" ||
20155 test ! -s conftest.err
20156 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020157
20158cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020159#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020160_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020161
Jack Jansen150753c2003-03-29 22:07:47 +000020162
20163else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020165sed 's/^/| /' conftest.$ac_ext >&5
20166
Martin v. Löwiseba40652007-08-30 20:10:57 +000020167
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020168fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020169
20170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020171
20172fi
20173done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020174
Martin v. Löwis11437992002-04-12 09:54:03 +000020175
Thomas Wouters3a584202000-08-05 23:28:51 +000020176for ac_func in gettimeofday
20177do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020178as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20179{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20180echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020181if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020182 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020183else
Martin v. Löwis11437992002-04-12 09:54:03 +000020184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020185/* confdefs.h. */
20186_ACEOF
20187cat confdefs.h >>conftest.$ac_ext
20188cat >>conftest.$ac_ext <<_ACEOF
20189/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020190/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20191 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20192#define $ac_func innocuous_$ac_func
20193
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020194/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020195 which can conflict with char $ac_func (); below.
20196 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020197 <limits.h> exists even on freestanding compilers. */
20198
20199#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020200# include <limits.h>
20201#else
20202# include <assert.h>
20203#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020204
20205#undef $ac_func
20206
Martin v. Löwiseba40652007-08-30 20:10:57 +000020207/* Override any GCC internal prototype to avoid an error.
20208 Use char because int might match the return type of a GCC
20209 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020210#ifdef __cplusplus
20211extern "C"
20212#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020213char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020214/* The GNU C library defines this for functions which it implements
20215 to always fail with ENOSYS. Some functions are actually named
20216 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020217#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020218choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020219#endif
20220
Skip Montanaro6dead952003-09-25 14:50:04 +000020221int
20222main ()
20223{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020224return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020225 ;
20226 return 0;
20227}
20228_ACEOF
20229rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020230if { (ac_try="$ac_link"
20231case "(($ac_try" in
20232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20233 *) ac_try_echo=$ac_try;;
20234esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020236 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020238 grep -v '^ *+' conftest.er1 >conftest.err
20239 rm -f conftest.er1
20240 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020242 (exit $ac_status); } && {
20243 test -z "$ac_c_werror_flag" ||
20244 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020245 } && test -s conftest$ac_exeext &&
20246 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020248else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020250sed 's/^/| /' conftest.$ac_ext >&5
20251
Martin v. Löwiseba40652007-08-30 20:10:57 +000020252 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020253fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254
20255rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020256 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020257fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020258ac_res=`eval echo '${'$as_ac_var'}'`
20259 { echo "$as_me:$LINENO: result: $ac_res" >&5
20260echo "${ECHO_T}$ac_res" >&6; }
20261if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020262 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020263#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020264_ACEOF
20265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020266/* confdefs.h. */
20267_ACEOF
20268cat confdefs.h >>conftest.$ac_ext
20269cat >>conftest.$ac_ext <<_ACEOF
20270/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020271#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020272int
20273main ()
20274{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020275gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020276 ;
20277 return 0;
20278}
20279_ACEOF
20280rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020281if { (ac_try="$ac_compile"
20282case "(($ac_try" in
20283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20284 *) ac_try_echo=$ac_try;;
20285esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020289 grep -v '^ *+' conftest.er1 >conftest.err
20290 rm -f conftest.er1
20291 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020293 (exit $ac_status); } && {
20294 test -z "$ac_c_werror_flag" ||
20295 test ! -s conftest.err
20296 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020297 :
20298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020300sed 's/^/| /' conftest.$ac_ext >&5
20301
Martin v. Löwis11437992002-04-12 09:54:03 +000020302
20303cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020304#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020305_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020306
Martin v. Löwis11437992002-04-12 09:54:03 +000020307
Guido van Rossum627b2d71993-12-24 10:39:16 +000020308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020309
20310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020311
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020312fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020313done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020314
Michael W. Hudson54241132001-12-07 15:38:26 +000020315
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020316{ echo "$as_me:$LINENO: checking for major" >&5
20317echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020318cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020319/* confdefs.h. */
20320_ACEOF
20321cat confdefs.h >>conftest.$ac_ext
20322cat >>conftest.$ac_ext <<_ACEOF
20323/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020324
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020325#if defined(MAJOR_IN_MKDEV)
20326#include <sys/mkdev.h>
20327#elif defined(MAJOR_IN_SYSMACROS)
20328#include <sys/sysmacros.h>
20329#else
20330#include <sys/types.h>
20331#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020332
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020333int
20334main ()
20335{
20336
20337 makedev(major(0),minor(0));
20338
20339 ;
20340 return 0;
20341}
20342_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020343rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020344if { (ac_try="$ac_link"
20345case "(($ac_try" in
20346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20347 *) ac_try_echo=$ac_try;;
20348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020352 grep -v '^ *+' conftest.er1 >conftest.err
20353 rm -f conftest.er1
20354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020356 (exit $ac_status); } && {
20357 test -z "$ac_c_werror_flag" ||
20358 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020359 } && test -s conftest$ac_exeext &&
20360 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020361
20362
20363cat >>confdefs.h <<\_ACEOF
20364#define HAVE_DEVICE_MACROS 1
20365_ACEOF
20366
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020367 { echo "$as_me:$LINENO: result: yes" >&5
20368echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020369
20370else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020372sed 's/^/| /' conftest.$ac_ext >&5
20373
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020374
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020375 { echo "$as_me:$LINENO: result: no" >&5
20376echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020377
20378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020379
20380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020381 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020382
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020383# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020384# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020385{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20386echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020387cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020388/* confdefs.h. */
20389_ACEOF
20390cat confdefs.h >>conftest.$ac_ext
20391cat >>conftest.$ac_ext <<_ACEOF
20392/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020393
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020394#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020395#include <sys/socket.h>
20396#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020397#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020398
Martin v. Löwis11437992002-04-12 09:54:03 +000020399int
20400main ()
20401{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020402getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020403 ;
20404 return 0;
20405}
20406_ACEOF
20407rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020408if { (ac_try="$ac_link"
20409case "(($ac_try" in
20410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20411 *) ac_try_echo=$ac_try;;
20412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020414 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020416 grep -v '^ *+' conftest.er1 >conftest.err
20417 rm -f conftest.er1
20418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020420 (exit $ac_status); } && {
20421 test -z "$ac_c_werror_flag" ||
20422 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020423 } && test -s conftest$ac_exeext &&
20424 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020425 have_getaddrinfo=yes
20426else
20427 echo "$as_me: failed program was:" >&5
20428sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020429
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020430 have_getaddrinfo=no
20431fi
20432
20433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20434 conftest$ac_exeext conftest.$ac_ext
20435{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20436echo "${ECHO_T}$have_getaddrinfo" >&6; }
20437if test $have_getaddrinfo = yes
20438then
20439 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020440echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020441 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20442 echo $ECHO_N "(cached) $ECHO_C" >&6
20443else
20444 if test "$cross_compiling" = yes; then
20445 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020446else
Martin v. Löwis11437992002-04-12 09:54:03 +000020447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020448/* confdefs.h. */
20449_ACEOF
20450cat confdefs.h >>conftest.$ac_ext
20451cat >>conftest.$ac_ext <<_ACEOF
20452/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020453
20454#include <sys/types.h>
20455#include <netdb.h>
20456#include <string.h>
20457#include <sys/socket.h>
20458#include <netinet/in.h>
20459
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020460int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020461{
20462 int passive, gaierr, inet4 = 0, inet6 = 0;
20463 struct addrinfo hints, *ai, *aitop;
20464 char straddr[INET6_ADDRSTRLEN], strport[16];
20465
20466 for (passive = 0; passive <= 1; passive++) {
20467 memset(&hints, 0, sizeof(hints));
20468 hints.ai_family = AF_UNSPEC;
20469 hints.ai_flags = passive ? AI_PASSIVE : 0;
20470 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020471 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020472 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20473 (void)gai_strerror(gaierr);
20474 goto bad;
20475 }
20476 for (ai = aitop; ai; ai = ai->ai_next) {
20477 if (ai->ai_addr == NULL ||
20478 ai->ai_addrlen == 0 ||
20479 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20480 straddr, sizeof(straddr), strport, sizeof(strport),
20481 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20482 goto bad;
20483 }
20484 switch (ai->ai_family) {
20485 case AF_INET:
20486 if (strcmp(strport, "54321") != 0) {
20487 goto bad;
20488 }
20489 if (passive) {
20490 if (strcmp(straddr, "0.0.0.0") != 0) {
20491 goto bad;
20492 }
20493 } else {
20494 if (strcmp(straddr, "127.0.0.1") != 0) {
20495 goto bad;
20496 }
20497 }
20498 inet4++;
20499 break;
20500 case AF_INET6:
20501 if (strcmp(strport, "54321") != 0) {
20502 goto bad;
20503 }
20504 if (passive) {
20505 if (strcmp(straddr, "::") != 0) {
20506 goto bad;
20507 }
20508 } else {
20509 if (strcmp(straddr, "::1") != 0) {
20510 goto bad;
20511 }
20512 }
20513 inet6++;
20514 break;
20515 case AF_UNSPEC:
20516 goto bad;
20517 break;
20518 default:
20519 /* another family support? */
20520 break;
20521 }
20522 }
20523 }
20524
20525 if (!(inet4 == 0 || inet4 == 2))
20526 goto bad;
20527 if (!(inet6 == 0 || inet6 == 2))
20528 goto bad;
20529
20530 if (aitop)
20531 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020532 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020533
20534 bad:
20535 if (aitop)
20536 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020537 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020538}
20539
Martin v. Löwis11437992002-04-12 09:54:03 +000020540_ACEOF
20541rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020542if { (ac_try="$ac_link"
20543case "(($ac_try" in
20544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20545 *) ac_try_echo=$ac_try;;
20546esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020548 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020549 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000020552 { (case "(($ac_try" in
20553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20554 *) ac_try_echo=$ac_try;;
20555esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020557 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020558 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020561 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020562else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020563 echo "$as_me: program exited with status $ac_status" >&5
20564echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020565sed 's/^/| /' conftest.$ac_ext >&5
20566
Martin v. Löwis11437992002-04-12 09:54:03 +000020567( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020568ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020570rm -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 +000020571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020572
20573
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020574fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020575
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020576fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020577
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000020578if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20579then
20580 if test $ipv6 = yes
20581 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020582 echo 'Fatal: You must get working getaddrinfo() function.'
20583 echo ' or you can specify "--disable-ipv6"'.
20584 exit 1
20585 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020586else
Martin v. Löwis11437992002-04-12 09:54:03 +000020587
20588cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020589#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020590_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020591
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020592fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020593
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020594for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020595do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020596as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20597{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20598echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020599if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020600 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020601else
Martin v. Löwis11437992002-04-12 09:54:03 +000020602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020603/* confdefs.h. */
20604_ACEOF
20605cat confdefs.h >>conftest.$ac_ext
20606cat >>conftest.$ac_ext <<_ACEOF
20607/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020608/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20609 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20610#define $ac_func innocuous_$ac_func
20611
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020612/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020613 which can conflict with char $ac_func (); below.
20614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020615 <limits.h> exists even on freestanding compilers. */
20616
20617#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020618# include <limits.h>
20619#else
20620# include <assert.h>
20621#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020622
20623#undef $ac_func
20624
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625/* Override any GCC internal prototype to avoid an error.
20626 Use char because int might match the return type of a GCC
20627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020628#ifdef __cplusplus
20629extern "C"
20630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020631char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020632/* The GNU C library defines this for functions which it implements
20633 to always fail with ENOSYS. Some functions are actually named
20634 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020635#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020636choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020637#endif
20638
Skip Montanaro6dead952003-09-25 14:50:04 +000020639int
20640main ()
20641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020642return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 ;
20644 return 0;
20645}
20646_ACEOF
20647rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020648if { (ac_try="$ac_link"
20649case "(($ac_try" in
20650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20651 *) ac_try_echo=$ac_try;;
20652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020654 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020656 grep -v '^ *+' conftest.er1 >conftest.err
20657 rm -f conftest.er1
20658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020660 (exit $ac_status); } && {
20661 test -z "$ac_c_werror_flag" ||
20662 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020663 } && test -s conftest$ac_exeext &&
20664 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020666else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020668sed 's/^/| /' conftest.$ac_ext >&5
20669
Martin v. Löwiseba40652007-08-30 20:10:57 +000020670 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020671fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020672
20673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020674 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020675fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020676ac_res=`eval echo '${'$as_ac_var'}'`
20677 { echo "$as_me:$LINENO: result: $ac_res" >&5
20678echo "${ECHO_T}$ac_res" >&6; }
20679if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020680 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020681#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020683
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020684fi
20685done
20686
Michael W. Hudson54241132001-12-07 15:38:26 +000020687
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020688# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020689{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20690echo $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 +000020691if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020692 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020693else
Martin v. Löwis11437992002-04-12 09:54:03 +000020694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020695/* confdefs.h. */
20696_ACEOF
20697cat confdefs.h >>conftest.$ac_ext
20698cat >>conftest.$ac_ext <<_ACEOF
20699/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020700#include <sys/types.h>
20701#include <sys/time.h>
20702#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020703
Martin v. Löwis11437992002-04-12 09:54:03 +000020704int
20705main ()
20706{
20707if ((struct tm *) 0)
20708return 0;
20709 ;
20710 return 0;
20711}
20712_ACEOF
20713rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020714if { (ac_try="$ac_compile"
20715case "(($ac_try" in
20716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20717 *) ac_try_echo=$ac_try;;
20718esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020720 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020722 grep -v '^ *+' conftest.er1 >conftest.err
20723 rm -f conftest.er1
20724 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020726 (exit $ac_status); } && {
20727 test -z "$ac_c_werror_flag" ||
20728 test ! -s conftest.err
20729 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020730 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020731else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020733sed 's/^/| /' conftest.$ac_ext >&5
20734
Martin v. Löwiseba40652007-08-30 20:10:57 +000020735 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020736fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020737
20738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020739fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020740{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20741echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020742if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020743
20744cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020745#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020746_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020747
20748fi
20749
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020750{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20751echo $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 +000020752if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020753 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020754else
Martin v. Löwis11437992002-04-12 09:54:03 +000020755 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020756/* confdefs.h. */
20757_ACEOF
20758cat confdefs.h >>conftest.$ac_ext
20759cat >>conftest.$ac_ext <<_ACEOF
20760/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020761#include <sys/types.h>
20762#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020763
Martin v. Löwis11437992002-04-12 09:54:03 +000020764int
20765main ()
20766{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020767struct tm tm;
20768 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020769 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020770 ;
20771 return 0;
20772}
20773_ACEOF
20774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020775if { (ac_try="$ac_compile"
20776case "(($ac_try" in
20777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20778 *) ac_try_echo=$ac_try;;
20779esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020783 grep -v '^ *+' conftest.er1 >conftest.err
20784 rm -f conftest.er1
20785 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020787 (exit $ac_status); } && {
20788 test -z "$ac_c_werror_flag" ||
20789 test ! -s conftest.err
20790 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020791 ac_cv_struct_tm=time.h
20792else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020794sed 's/^/| /' conftest.$ac_ext >&5
20795
Martin v. Löwiseba40652007-08-30 20:10:57 +000020796 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020798
20799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020800fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020801{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20802echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020803if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020804
20805cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020806#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020807_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020808
20809fi
20810
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020811{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20812echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020813if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020814 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020815else
Martin v. Löwis11437992002-04-12 09:54:03 +000020816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020817/* confdefs.h. */
20818_ACEOF
20819cat confdefs.h >>conftest.$ac_ext
20820cat >>conftest.$ac_ext <<_ACEOF
20821/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020822#include <sys/types.h>
20823#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020824
20825
Martin v. Löwis11437992002-04-12 09:54:03 +000020826int
20827main ()
20828{
20829static struct tm ac_aggr;
20830if (ac_aggr.tm_zone)
20831return 0;
20832 ;
20833 return 0;
20834}
20835_ACEOF
20836rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837if { (ac_try="$ac_compile"
20838case "(($ac_try" in
20839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20840 *) ac_try_echo=$ac_try;;
20841esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020843 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020845 grep -v '^ *+' conftest.er1 >conftest.err
20846 rm -f conftest.er1
20847 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020849 (exit $ac_status); } && {
20850 test -z "$ac_c_werror_flag" ||
20851 test ! -s conftest.err
20852 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020853 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020854else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020855 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020856sed 's/^/| /' conftest.$ac_ext >&5
20857
Martin v. Löwiseba40652007-08-30 20:10:57 +000020858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020859/* confdefs.h. */
20860_ACEOF
20861cat confdefs.h >>conftest.$ac_ext
20862cat >>conftest.$ac_ext <<_ACEOF
20863/* end confdefs.h. */
20864#include <sys/types.h>
20865#include <$ac_cv_struct_tm>
20866
20867
20868int
20869main ()
20870{
20871static struct tm ac_aggr;
20872if (sizeof ac_aggr.tm_zone)
20873return 0;
20874 ;
20875 return 0;
20876}
20877_ACEOF
20878rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020879if { (ac_try="$ac_compile"
20880case "(($ac_try" in
20881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20882 *) ac_try_echo=$ac_try;;
20883esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020885 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020887 grep -v '^ *+' conftest.er1 >conftest.err
20888 rm -f conftest.er1
20889 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020891 (exit $ac_status); } && {
20892 test -z "$ac_c_werror_flag" ||
20893 test ! -s conftest.err
20894 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020895 ac_cv_member_struct_tm_tm_zone=yes
20896else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020898sed 's/^/| /' conftest.$ac_ext >&5
20899
Martin v. Löwiseba40652007-08-30 20:10:57 +000020900 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020902
20903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020905
20906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020907fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020908{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20909echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
20910if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020911
20912cat >>confdefs.h <<_ACEOF
20913#define HAVE_STRUCT_TM_TM_ZONE 1
20914_ACEOF
20915
20916
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020917fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020918
Martin v. Löwis11437992002-04-12 09:54:03 +000020919if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20920
20921cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020922#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020923_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020924
20925else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020926 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20927echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020928if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020929 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000020930else
20931 cat >conftest.$ac_ext <<_ACEOF
20932/* confdefs.h. */
20933_ACEOF
20934cat confdefs.h >>conftest.$ac_ext
20935cat >>conftest.$ac_ext <<_ACEOF
20936/* end confdefs.h. */
20937#include <time.h>
20938
20939int
20940main ()
20941{
20942#ifndef tzname
20943 (void) tzname;
20944#endif
20945
20946 ;
20947 return 0;
20948}
20949_ACEOF
20950rm -f conftest.$ac_objext
20951if { (ac_try="$ac_compile"
20952case "(($ac_try" in
20953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20954 *) ac_try_echo=$ac_try;;
20955esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020957 (eval "$ac_compile") 2>conftest.er1
20958 ac_status=$?
20959 grep -v '^ *+' conftest.er1 >conftest.err
20960 rm -f conftest.er1
20961 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020963 (exit $ac_status); } && {
20964 test -z "$ac_c_werror_flag" ||
20965 test ! -s conftest.err
20966 } && test -s conftest.$ac_objext; then
20967 ac_cv_have_decl_tzname=yes
20968else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020969 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020970sed 's/^/| /' conftest.$ac_ext >&5
20971
20972 ac_cv_have_decl_tzname=no
20973fi
20974
20975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20976fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020977{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20978echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
20979if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020980
20981cat >>confdefs.h <<_ACEOF
20982#define HAVE_DECL_TZNAME 1
20983_ACEOF
20984
20985
20986else
20987 cat >>confdefs.h <<_ACEOF
20988#define HAVE_DECL_TZNAME 0
20989_ACEOF
20990
20991
20992fi
20993
20994
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020995 { echo "$as_me:$LINENO: checking for tzname" >&5
20996echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020997if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020998 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020999else
Martin v. Löwis11437992002-04-12 09:54:03 +000021000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021001/* confdefs.h. */
21002_ACEOF
21003cat confdefs.h >>conftest.$ac_ext
21004cat >>conftest.$ac_ext <<_ACEOF
21005/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021006#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021007#if !HAVE_DECL_TZNAME
21008extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021010
Martin v. Löwis11437992002-04-12 09:54:03 +000021011int
21012main ()
21013{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021014return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021015 ;
21016 return 0;
21017}
21018_ACEOF
21019rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021020if { (ac_try="$ac_link"
21021case "(($ac_try" in
21022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21023 *) ac_try_echo=$ac_try;;
21024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021026 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021027 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021028 grep -v '^ *+' conftest.er1 >conftest.err
21029 rm -f conftest.er1
21030 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021032 (exit $ac_status); } && {
21033 test -z "$ac_c_werror_flag" ||
21034 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021035 } && test -s conftest$ac_exeext &&
21036 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021037 ac_cv_var_tzname=yes
21038else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021040sed 's/^/| /' conftest.$ac_ext >&5
21041
Martin v. Löwiseba40652007-08-30 20:10:57 +000021042 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021043fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021044
21045rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021046 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021047fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021048{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21049echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021050 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021051
21052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021053#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021054_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021055
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021056 fi
21057fi
21058
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021059{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21060echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021061if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021062 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021063else
21064 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021065/* confdefs.h. */
21066_ACEOF
21067cat confdefs.h >>conftest.$ac_ext
21068cat >>conftest.$ac_ext <<_ACEOF
21069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021070$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021071int
21072main ()
21073{
21074static struct stat ac_aggr;
21075if (ac_aggr.st_rdev)
21076return 0;
21077 ;
21078 return 0;
21079}
21080_ACEOF
21081rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021082if { (ac_try="$ac_compile"
21083case "(($ac_try" in
21084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21085 *) ac_try_echo=$ac_try;;
21086esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021090 grep -v '^ *+' conftest.er1 >conftest.err
21091 rm -f conftest.er1
21092 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021094 (exit $ac_status); } && {
21095 test -z "$ac_c_werror_flag" ||
21096 test ! -s conftest.err
21097 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021098 ac_cv_member_struct_stat_st_rdev=yes
21099else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021101sed 's/^/| /' conftest.$ac_ext >&5
21102
Martin v. Löwiseba40652007-08-30 20:10:57 +000021103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021104/* confdefs.h. */
21105_ACEOF
21106cat confdefs.h >>conftest.$ac_ext
21107cat >>conftest.$ac_ext <<_ACEOF
21108/* end confdefs.h. */
21109$ac_includes_default
21110int
21111main ()
21112{
21113static struct stat ac_aggr;
21114if (sizeof ac_aggr.st_rdev)
21115return 0;
21116 ;
21117 return 0;
21118}
21119_ACEOF
21120rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021121if { (ac_try="$ac_compile"
21122case "(($ac_try" in
21123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21124 *) ac_try_echo=$ac_try;;
21125esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021127 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021129 grep -v '^ *+' conftest.er1 >conftest.err
21130 rm -f conftest.er1
21131 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133 (exit $ac_status); } && {
21134 test -z "$ac_c_werror_flag" ||
21135 test ! -s conftest.err
21136 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021137 ac_cv_member_struct_stat_st_rdev=yes
21138else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021140sed 's/^/| /' conftest.$ac_ext >&5
21141
Martin v. Löwiseba40652007-08-30 20:10:57 +000021142 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021143fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021144
21145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021147
21148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021149fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021150{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21151echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21152if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021153
21154cat >>confdefs.h <<_ACEOF
21155#define HAVE_STRUCT_STAT_ST_RDEV 1
21156_ACEOF
21157
21158
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021159fi
21160
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021161{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21162echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021163if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021164 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021165else
Martin v. Löwis11437992002-04-12 09:54:03 +000021166 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021167/* confdefs.h. */
21168_ACEOF
21169cat confdefs.h >>conftest.$ac_ext
21170cat >>conftest.$ac_ext <<_ACEOF
21171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021172$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021173int
21174main ()
21175{
21176static struct stat ac_aggr;
21177if (ac_aggr.st_blksize)
21178return 0;
21179 ;
21180 return 0;
21181}
21182_ACEOF
21183rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021184if { (ac_try="$ac_compile"
21185case "(($ac_try" in
21186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21187 *) ac_try_echo=$ac_try;;
21188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021192 grep -v '^ *+' conftest.er1 >conftest.err
21193 rm -f conftest.er1
21194 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021196 (exit $ac_status); } && {
21197 test -z "$ac_c_werror_flag" ||
21198 test ! -s conftest.err
21199 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021200 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021201else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021203sed 's/^/| /' conftest.$ac_ext >&5
21204
Martin v. Löwiseba40652007-08-30 20:10:57 +000021205 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021206/* confdefs.h. */
21207_ACEOF
21208cat confdefs.h >>conftest.$ac_ext
21209cat >>conftest.$ac_ext <<_ACEOF
21210/* end confdefs.h. */
21211$ac_includes_default
21212int
21213main ()
21214{
21215static struct stat ac_aggr;
21216if (sizeof ac_aggr.st_blksize)
21217return 0;
21218 ;
21219 return 0;
21220}
21221_ACEOF
21222rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021223if { (ac_try="$ac_compile"
21224case "(($ac_try" in
21225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21226 *) ac_try_echo=$ac_try;;
21227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021229 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021230 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021231 grep -v '^ *+' conftest.er1 >conftest.err
21232 rm -f conftest.er1
21233 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021235 (exit $ac_status); } && {
21236 test -z "$ac_c_werror_flag" ||
21237 test ! -s conftest.err
21238 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021239 ac_cv_member_struct_stat_st_blksize=yes
21240else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021241 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021242sed 's/^/| /' conftest.$ac_ext >&5
21243
Martin v. Löwiseba40652007-08-30 20:10:57 +000021244 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021246
21247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021249
21250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021251fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021252{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21253echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21254if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021255
Martin v. Löwis11437992002-04-12 09:54:03 +000021256cat >>confdefs.h <<_ACEOF
21257#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21258_ACEOF
21259
21260
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021261fi
21262
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021263{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21264echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021265if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021266 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021267else
21268 cat >conftest.$ac_ext <<_ACEOF
21269/* confdefs.h. */
21270_ACEOF
21271cat confdefs.h >>conftest.$ac_ext
21272cat >>conftest.$ac_ext <<_ACEOF
21273/* end confdefs.h. */
21274$ac_includes_default
21275int
21276main ()
21277{
21278static struct stat ac_aggr;
21279if (ac_aggr.st_flags)
21280return 0;
21281 ;
21282 return 0;
21283}
21284_ACEOF
21285rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021286if { (ac_try="$ac_compile"
21287case "(($ac_try" in
21288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21289 *) ac_try_echo=$ac_try;;
21290esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021291eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021292 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021293 ac_status=$?
21294 grep -v '^ *+' conftest.er1 >conftest.err
21295 rm -f conftest.er1
21296 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021298 (exit $ac_status); } && {
21299 test -z "$ac_c_werror_flag" ||
21300 test ! -s conftest.err
21301 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021302 ac_cv_member_struct_stat_st_flags=yes
21303else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021304 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021305sed 's/^/| /' conftest.$ac_ext >&5
21306
Martin v. Löwiseba40652007-08-30 20:10:57 +000021307 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021308/* confdefs.h. */
21309_ACEOF
21310cat confdefs.h >>conftest.$ac_ext
21311cat >>conftest.$ac_ext <<_ACEOF
21312/* end confdefs.h. */
21313$ac_includes_default
21314int
21315main ()
21316{
21317static struct stat ac_aggr;
21318if (sizeof ac_aggr.st_flags)
21319return 0;
21320 ;
21321 return 0;
21322}
21323_ACEOF
21324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021325if { (ac_try="$ac_compile"
21326case "(($ac_try" in
21327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21328 *) ac_try_echo=$ac_try;;
21329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021331 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021332 ac_status=$?
21333 grep -v '^ *+' conftest.er1 >conftest.err
21334 rm -f conftest.er1
21335 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021337 (exit $ac_status); } && {
21338 test -z "$ac_c_werror_flag" ||
21339 test ! -s conftest.err
21340 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021341 ac_cv_member_struct_stat_st_flags=yes
21342else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021343 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021344sed 's/^/| /' conftest.$ac_ext >&5
21345
Martin v. Löwiseba40652007-08-30 20:10:57 +000021346 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021347fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021348
21349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021350fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021351
21352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021353fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021354{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21355echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
21356if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021357
21358cat >>confdefs.h <<_ACEOF
21359#define HAVE_STRUCT_STAT_ST_FLAGS 1
21360_ACEOF
21361
21362
21363fi
21364
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021365{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21366echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021367if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021368 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021369else
21370 cat >conftest.$ac_ext <<_ACEOF
21371/* confdefs.h. */
21372_ACEOF
21373cat confdefs.h >>conftest.$ac_ext
21374cat >>conftest.$ac_ext <<_ACEOF
21375/* end confdefs.h. */
21376$ac_includes_default
21377int
21378main ()
21379{
21380static struct stat ac_aggr;
21381if (ac_aggr.st_gen)
21382return 0;
21383 ;
21384 return 0;
21385}
21386_ACEOF
21387rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021388if { (ac_try="$ac_compile"
21389case "(($ac_try" in
21390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21391 *) ac_try_echo=$ac_try;;
21392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021395 ac_status=$?
21396 grep -v '^ *+' conftest.er1 >conftest.err
21397 rm -f conftest.er1
21398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021400 (exit $ac_status); } && {
21401 test -z "$ac_c_werror_flag" ||
21402 test ! -s conftest.err
21403 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021404 ac_cv_member_struct_stat_st_gen=yes
21405else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021406 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021407sed 's/^/| /' conftest.$ac_ext >&5
21408
Martin v. Löwiseba40652007-08-30 20:10:57 +000021409 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021410/* confdefs.h. */
21411_ACEOF
21412cat confdefs.h >>conftest.$ac_ext
21413cat >>conftest.$ac_ext <<_ACEOF
21414/* end confdefs.h. */
21415$ac_includes_default
21416int
21417main ()
21418{
21419static struct stat ac_aggr;
21420if (sizeof ac_aggr.st_gen)
21421return 0;
21422 ;
21423 return 0;
21424}
21425_ACEOF
21426rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021427if { (ac_try="$ac_compile"
21428case "(($ac_try" in
21429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21430 *) ac_try_echo=$ac_try;;
21431esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021433 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021434 ac_status=$?
21435 grep -v '^ *+' conftest.er1 >conftest.err
21436 rm -f conftest.er1
21437 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021439 (exit $ac_status); } && {
21440 test -z "$ac_c_werror_flag" ||
21441 test ! -s conftest.err
21442 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021443 ac_cv_member_struct_stat_st_gen=yes
21444else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021445 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021446sed 's/^/| /' conftest.$ac_ext >&5
21447
Martin v. Löwiseba40652007-08-30 20:10:57 +000021448 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021450
21451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021453
21454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021455fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021456{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21457echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
21458if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021459
21460cat >>confdefs.h <<_ACEOF
21461#define HAVE_STRUCT_STAT_ST_GEN 1
21462_ACEOF
21463
21464
21465fi
21466
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021467{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21468echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021469if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021470 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021471else
21472 cat >conftest.$ac_ext <<_ACEOF
21473/* confdefs.h. */
21474_ACEOF
21475cat confdefs.h >>conftest.$ac_ext
21476cat >>conftest.$ac_ext <<_ACEOF
21477/* end confdefs.h. */
21478$ac_includes_default
21479int
21480main ()
21481{
21482static struct stat ac_aggr;
21483if (ac_aggr.st_birthtime)
21484return 0;
21485 ;
21486 return 0;
21487}
21488_ACEOF
21489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021490if { (ac_try="$ac_compile"
21491case "(($ac_try" in
21492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21493 *) ac_try_echo=$ac_try;;
21494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021497 ac_status=$?
21498 grep -v '^ *+' conftest.er1 >conftest.err
21499 rm -f conftest.er1
21500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021502 (exit $ac_status); } && {
21503 test -z "$ac_c_werror_flag" ||
21504 test ! -s conftest.err
21505 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021506 ac_cv_member_struct_stat_st_birthtime=yes
21507else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021508 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021509sed 's/^/| /' conftest.$ac_ext >&5
21510
Martin v. Löwiseba40652007-08-30 20:10:57 +000021511 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021512/* confdefs.h. */
21513_ACEOF
21514cat confdefs.h >>conftest.$ac_ext
21515cat >>conftest.$ac_ext <<_ACEOF
21516/* end confdefs.h. */
21517$ac_includes_default
21518int
21519main ()
21520{
21521static struct stat ac_aggr;
21522if (sizeof ac_aggr.st_birthtime)
21523return 0;
21524 ;
21525 return 0;
21526}
21527_ACEOF
21528rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021529if { (ac_try="$ac_compile"
21530case "(($ac_try" in
21531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21532 *) ac_try_echo=$ac_try;;
21533esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021534eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021536 ac_status=$?
21537 grep -v '^ *+' conftest.er1 >conftest.err
21538 rm -f conftest.er1
21539 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021541 (exit $ac_status); } && {
21542 test -z "$ac_c_werror_flag" ||
21543 test ! -s conftest.err
21544 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021545 ac_cv_member_struct_stat_st_birthtime=yes
21546else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021547 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021548sed 's/^/| /' conftest.$ac_ext >&5
21549
Martin v. Löwiseba40652007-08-30 20:10:57 +000021550 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021551fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021552
21553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021555
21556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021557fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021558{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21559echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
21560if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021561
21562cat >>confdefs.h <<_ACEOF
21563#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21564_ACEOF
21565
21566
21567fi
21568
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021569{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21570echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021571if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021572 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021573else
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021575/* confdefs.h. */
21576_ACEOF
21577cat confdefs.h >>conftest.$ac_ext
21578cat >>conftest.$ac_ext <<_ACEOF
21579/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021580$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021581int
21582main ()
21583{
21584static struct stat ac_aggr;
21585if (ac_aggr.st_blocks)
21586return 0;
21587 ;
21588 return 0;
21589}
21590_ACEOF
21591rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021592if { (ac_try="$ac_compile"
21593case "(($ac_try" in
21594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21595 *) ac_try_echo=$ac_try;;
21596esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021600 grep -v '^ *+' conftest.er1 >conftest.err
21601 rm -f conftest.er1
21602 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021604 (exit $ac_status); } && {
21605 test -z "$ac_c_werror_flag" ||
21606 test ! -s conftest.err
21607 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021608 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021609else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021611sed 's/^/| /' conftest.$ac_ext >&5
21612
Martin v. Löwiseba40652007-08-30 20:10:57 +000021613 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021614/* confdefs.h. */
21615_ACEOF
21616cat confdefs.h >>conftest.$ac_ext
21617cat >>conftest.$ac_ext <<_ACEOF
21618/* end confdefs.h. */
21619$ac_includes_default
21620int
21621main ()
21622{
21623static struct stat ac_aggr;
21624if (sizeof ac_aggr.st_blocks)
21625return 0;
21626 ;
21627 return 0;
21628}
21629_ACEOF
21630rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021631if { (ac_try="$ac_compile"
21632case "(($ac_try" in
21633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21634 *) ac_try_echo=$ac_try;;
21635esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021637 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021639 grep -v '^ *+' conftest.er1 >conftest.err
21640 rm -f conftest.er1
21641 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021643 (exit $ac_status); } && {
21644 test -z "$ac_c_werror_flag" ||
21645 test ! -s conftest.err
21646 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021647 ac_cv_member_struct_stat_st_blocks=yes
21648else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021649 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021650sed 's/^/| /' conftest.$ac_ext >&5
21651
Martin v. Löwiseba40652007-08-30 20:10:57 +000021652 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021653fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021654
21655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021656fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021657
21658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021659fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021660{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21661echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
21662if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021663
Martin v. Löwis11437992002-04-12 09:54:03 +000021664cat >>confdefs.h <<_ACEOF
21665#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21666_ACEOF
21667
21668
21669cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021670#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021671_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021672
21673else
Martin v. Löwiseba40652007-08-30 20:10:57 +000021674 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021675 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021676 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21677 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021678esac
21679
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021680fi
21681
Michael W. Hudson54241132001-12-07 15:38:26 +000021682
Martin v. Löwis11437992002-04-12 09:54:03 +000021683
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021684{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21685echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021686if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021687 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021688else
Martin v. Löwis11437992002-04-12 09:54:03 +000021689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021690/* confdefs.h. */
21691_ACEOF
21692cat confdefs.h >>conftest.$ac_ext
21693cat >>conftest.$ac_ext <<_ACEOF
21694/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021695#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021696int
21697main ()
21698{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021699return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021700 ;
21701 return 0;
21702}
21703_ACEOF
21704rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021705if { (ac_try="$ac_compile"
21706case "(($ac_try" in
21707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21708 *) ac_try_echo=$ac_try;;
21709esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021713 grep -v '^ *+' conftest.er1 >conftest.err
21714 rm -f conftest.er1
21715 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021717 (exit $ac_status); } && {
21718 test -z "$ac_c_werror_flag" ||
21719 test ! -s conftest.err
21720 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021721 ac_cv_header_time_altzone=yes
21722else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021723 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021724sed 's/^/| /' conftest.$ac_ext >&5
21725
Martin v. Löwiseba40652007-08-30 20:10:57 +000021726 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021727fi
21728
Martin v. Löwiseba40652007-08-30 20:10:57 +000021729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21730fi
21731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021732{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21733echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021734if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021735
21736cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021737#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021738_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021739
21740fi
21741
Guido van Rossumda88dad1995-01-26 00:46:29 +000021742was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021743{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21744echo $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 +000021745cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021746/* confdefs.h. */
21747_ACEOF
21748cat confdefs.h >>conftest.$ac_ext
21749cat >>conftest.$ac_ext <<_ACEOF
21750/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021751
21752#include <sys/types.h>
21753#include <sys/select.h>
21754#include <sys/time.h>
21755
Martin v. Löwis11437992002-04-12 09:54:03 +000021756int
21757main ()
21758{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021759;
Martin v. Löwis11437992002-04-12 09:54:03 +000021760 ;
21761 return 0;
21762}
21763_ACEOF
21764rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021765if { (ac_try="$ac_compile"
21766case "(($ac_try" in
21767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21768 *) ac_try_echo=$ac_try;;
21769esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021771 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021773 grep -v '^ *+' conftest.er1 >conftest.err
21774 rm -f conftest.er1
21775 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021777 (exit $ac_status); } && {
21778 test -z "$ac_c_werror_flag" ||
21779 test ! -s conftest.err
21780 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021781
21782
21783cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021784#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021785_ACEOF
21786
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021787 was_it_defined=yes
21788
Guido van Rossumf78abae1997-01-21 22:02:36 +000021789else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021791sed 's/^/| /' conftest.$ac_ext >&5
21792
Brett Cannon19fab762007-06-02 03:02:29 +000021793
Martin v. Löwiseba40652007-08-30 20:10:57 +000021794fi
21795
21796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021797{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
21798echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021799
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021800{ echo "$as_me:$LINENO: checking for addrinfo" >&5
21801echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021802if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021803 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021804else
Martin v. Löwis11437992002-04-12 09:54:03 +000021805 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021806/* confdefs.h. */
21807_ACEOF
21808cat confdefs.h >>conftest.$ac_ext
21809cat >>conftest.$ac_ext <<_ACEOF
21810/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021811
21812# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021813int
21814main ()
21815{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021816struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021817 ;
21818 return 0;
21819}
21820_ACEOF
21821rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021822if { (ac_try="$ac_compile"
21823case "(($ac_try" in
21824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21825 *) ac_try_echo=$ac_try;;
21826esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021828 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021830 grep -v '^ *+' conftest.er1 >conftest.err
21831 rm -f conftest.er1
21832 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021834 (exit $ac_status); } && {
21835 test -z "$ac_c_werror_flag" ||
21836 test ! -s conftest.err
21837 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021838 ac_cv_struct_addrinfo=yes
21839else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021840 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021841sed 's/^/| /' conftest.$ac_ext >&5
21842
Martin v. Löwiseba40652007-08-30 20:10:57 +000021843 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021844fi
21845
Martin v. Löwiseba40652007-08-30 20:10:57 +000021846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21847fi
21848
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021849{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21850echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021851if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021852
21853cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021854#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021855_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021856
21857fi
21858
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021859{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21860echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021861if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021862 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021863else
Martin v. Löwis11437992002-04-12 09:54:03 +000021864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021865/* confdefs.h. */
21866_ACEOF
21867cat confdefs.h >>conftest.$ac_ext
21868cat >>conftest.$ac_ext <<_ACEOF
21869/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021870
21871# include <sys/types.h>
21872# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021873int
21874main ()
21875{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021876struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021877 ;
21878 return 0;
21879}
21880_ACEOF
21881rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021882if { (ac_try="$ac_compile"
21883case "(($ac_try" in
21884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21885 *) ac_try_echo=$ac_try;;
21886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021890 grep -v '^ *+' conftest.er1 >conftest.err
21891 rm -f conftest.er1
21892 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021894 (exit $ac_status); } && {
21895 test -z "$ac_c_werror_flag" ||
21896 test ! -s conftest.err
21897 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021898 ac_cv_struct_sockaddr_storage=yes
21899else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021901sed 's/^/| /' conftest.$ac_ext >&5
21902
Martin v. Löwiseba40652007-08-30 20:10:57 +000021903 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021904fi
21905
Martin v. Löwiseba40652007-08-30 20:10:57 +000021906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21907fi
21908
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021909{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21910echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021911if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021912
21913cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021914#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021915_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021916
21917fi
21918
Guido van Rossum627b2d71993-12-24 10:39:16 +000021919# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021920
Michael W. Hudson54241132001-12-07 15:38:26 +000021921
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021922{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21923echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021924if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021925 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021926else
Martin v. Löwis11437992002-04-12 09:54:03 +000021927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021928/* confdefs.h. */
21929_ACEOF
21930cat confdefs.h >>conftest.$ac_ext
21931cat >>conftest.$ac_ext <<_ACEOF
21932/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021933$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021934int
21935main ()
21936{
21937static int test_array [1 - 2 * !(((char) -1) < 0)];
21938test_array [0] = 0
21939
21940 ;
21941 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021942}
Martin v. Löwis11437992002-04-12 09:54:03 +000021943_ACEOF
21944rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021945if { (ac_try="$ac_compile"
21946case "(($ac_try" in
21947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21948 *) ac_try_echo=$ac_try;;
21949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021953 grep -v '^ *+' conftest.er1 >conftest.err
21954 rm -f conftest.er1
21955 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021957 (exit $ac_status); } && {
21958 test -z "$ac_c_werror_flag" ||
21959 test ! -s conftest.err
21960 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021961 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021962else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021964sed 's/^/| /' conftest.$ac_ext >&5
21965
Martin v. Löwiseba40652007-08-30 20:10:57 +000021966 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021967fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021968
21969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021970fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021971{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21972echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021973if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021974 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021975#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021976_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021977
21978fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021979
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021980{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21981echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021982if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021983 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021984else
21985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021986/* confdefs.h. */
21987_ACEOF
21988cat confdefs.h >>conftest.$ac_ext
21989cat >>conftest.$ac_ext <<_ACEOF
21990/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021991
Martin v. Löwis11437992002-04-12 09:54:03 +000021992int
21993main ()
21994{
21995/* FIXME: Include the comments suggested by Paul. */
21996#ifndef __cplusplus
21997 /* Ultrix mips cc rejects this. */
21998 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000021999 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022000 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022001 char const *const *pcpcc;
22002 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022003 /* NEC SVR4.0.2 mips cc rejects this. */
22004 struct point {int x, y;};
22005 static struct point const zero = {0,0};
22006 /* AIX XL C 1.02.0.0 rejects this.
22007 It does not let you subtract one const X* pointer from another in
22008 an arm of an if-expression whose if-part is not a constant
22009 expression */
22010 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022011 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022012 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022013 ++pcpcc;
22014 ppc = (char**) pcpcc;
22015 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022016 { /* SCO 3.2v4 cc rejects this. */
22017 char *t;
22018 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022019
Martin v. Löwis11437992002-04-12 09:54:03 +000022020 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022021 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022022 }
22023 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22024 int x[] = {25, 17};
22025 const int *foo = &x[0];
22026 ++foo;
22027 }
22028 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22029 typedef const int *iptr;
22030 iptr p = 0;
22031 ++p;
22032 }
22033 { /* AIX XL C 1.02.0.0 rejects this saying
22034 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22035 struct s { int j; const int *ap[3]; };
22036 struct s *b; b->j = 5;
22037 }
22038 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22039 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022040 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022041 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022042 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022043#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022044
Martin v. Löwis11437992002-04-12 09:54:03 +000022045 ;
22046 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022047}
Martin v. Löwis11437992002-04-12 09:54:03 +000022048_ACEOF
22049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022050if { (ac_try="$ac_compile"
22051case "(($ac_try" in
22052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22053 *) ac_try_echo=$ac_try;;
22054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022056 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022057 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022058 grep -v '^ *+' conftest.er1 >conftest.err
22059 rm -f conftest.er1
22060 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022062 (exit $ac_status); } && {
22063 test -z "$ac_c_werror_flag" ||
22064 test ! -s conftest.err
22065 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022066 ac_cv_c_const=yes
22067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022069sed 's/^/| /' conftest.$ac_ext >&5
22070
Martin v. Löwiseba40652007-08-30 20:10:57 +000022071 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022073
22074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022075fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022076{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22077echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022078if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022079
22080cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022081#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022082_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022083
22084fi
22085
Michael W. Hudson54241132001-12-07 15:38:26 +000022086
Guido van Rossumda88dad1995-01-26 00:46:29 +000022087works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022088{ echo "$as_me:$LINENO: checking for working volatile" >&5
22089echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022090cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022091/* confdefs.h. */
22092_ACEOF
22093cat confdefs.h >>conftest.$ac_ext
22094cat >>conftest.$ac_ext <<_ACEOF
22095/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022096
Martin v. Löwis11437992002-04-12 09:54:03 +000022097int
22098main ()
22099{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022100volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022101 ;
22102 return 0;
22103}
22104_ACEOF
22105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022106if { (ac_try="$ac_compile"
22107case "(($ac_try" in
22108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22109 *) ac_try_echo=$ac_try;;
22110esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022114 grep -v '^ *+' conftest.er1 >conftest.err
22115 rm -f conftest.er1
22116 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022118 (exit $ac_status); } && {
22119 test -z "$ac_c_werror_flag" ||
22120 test ! -s conftest.err
22121 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022122 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022123else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022125sed 's/^/| /' conftest.$ac_ext >&5
22126
Martin v. Löwis11437992002-04-12 09:54:03 +000022127
22128cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022129#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022130_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022131
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022132
Guido van Rossum627b2d71993-12-24 10:39:16 +000022133fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134
22135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022136{ echo "$as_me:$LINENO: result: $works" >&5
22137echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022138
Guido van Rossumda88dad1995-01-26 00:46:29 +000022139works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022140{ echo "$as_me:$LINENO: checking for working signed char" >&5
22141echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022143/* confdefs.h. */
22144_ACEOF
22145cat confdefs.h >>conftest.$ac_ext
22146cat >>conftest.$ac_ext <<_ACEOF
22147/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022148
Martin v. Löwis11437992002-04-12 09:54:03 +000022149int
22150main ()
22151{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022152signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022153 ;
22154 return 0;
22155}
22156_ACEOF
22157rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158if { (ac_try="$ac_compile"
22159case "(($ac_try" in
22160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22161 *) ac_try_echo=$ac_try;;
22162esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022164 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022165 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022166 grep -v '^ *+' conftest.er1 >conftest.err
22167 rm -f conftest.er1
22168 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022170 (exit $ac_status); } && {
22171 test -z "$ac_c_werror_flag" ||
22172 test ! -s conftest.err
22173 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022174 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022177sed 's/^/| /' conftest.$ac_ext >&5
22178
Martin v. Löwis11437992002-04-12 09:54:03 +000022179
22180cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022181#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022182_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022183
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022184
Guido van Rossum7f43da71994-08-01 12:15:30 +000022185fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022186
22187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022188{ echo "$as_me:$LINENO: result: $works" >&5
22189echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022190
Guido van Rossumda88dad1995-01-26 00:46:29 +000022191have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022192{ echo "$as_me:$LINENO: checking for prototypes" >&5
22193echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022194cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022195/* confdefs.h. */
22196_ACEOF
22197cat confdefs.h >>conftest.$ac_ext
22198cat >>conftest.$ac_ext <<_ACEOF
22199/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022200int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022201int
22202main ()
22203{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022204return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022205 ;
22206 return 0;
22207}
22208_ACEOF
22209rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022210if { (ac_try="$ac_compile"
22211case "(($ac_try" in
22212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22213 *) ac_try_echo=$ac_try;;
22214esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022216 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022217 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022218 grep -v '^ *+' conftest.er1 >conftest.err
22219 rm -f conftest.er1
22220 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022222 (exit $ac_status); } && {
22223 test -z "$ac_c_werror_flag" ||
22224 test ! -s conftest.err
22225 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022226
22227
22228cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022229#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022230_ACEOF
22231
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022232 have_prototypes=yes
22233
Guido van Rossumf78abae1997-01-21 22:02:36 +000022234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022236sed 's/^/| /' conftest.$ac_ext >&5
22237
Martin v. Löwiseba40652007-08-30 20:10:57 +000022238
Guido van Rossum7f43da71994-08-01 12:15:30 +000022239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022240
22241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022242{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22243echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022244
Guido van Rossumda88dad1995-01-26 00:46:29 +000022245works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022246{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22247echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022248cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022249/* confdefs.h. */
22250_ACEOF
22251cat confdefs.h >>conftest.$ac_ext
22252cat >>conftest.$ac_ext <<_ACEOF
22253/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022254
22255#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022256int foo(int x, ...) {
22257 va_list va;
22258 va_start(va, x);
22259 va_arg(va, int);
22260 va_arg(va, char *);
22261 va_arg(va, double);
22262 return 0;
22263}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022264
Martin v. Löwis11437992002-04-12 09:54:03 +000022265int
22266main ()
22267{
Guido van Rossum90eea071996-08-30 20:58:57 +000022268return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ;
22270 return 0;
22271}
22272_ACEOF
22273rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022274if { (ac_try="$ac_compile"
22275case "(($ac_try" in
22276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22277 *) ac_try_echo=$ac_try;;
22278esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022280 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022281 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022282 grep -v '^ *+' conftest.er1 >conftest.err
22283 rm -f conftest.er1
22284 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022286 (exit $ac_status); } && {
22287 test -z "$ac_c_werror_flag" ||
22288 test ! -s conftest.err
22289 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022290
22291
22292cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022293#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022294_ACEOF
22295
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022296 works=yes
22297
Guido van Rossumf78abae1997-01-21 22:02:36 +000022298else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022300sed 's/^/| /' conftest.$ac_ext >&5
22301
Martin v. Löwiseba40652007-08-30 20:10:57 +000022302
Guido van Rossum627b2d71993-12-24 10:39:16 +000022303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022304
22305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022306{ echo "$as_me:$LINENO: result: $works" >&5
22307echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022308
Martin v. Löwisd6320502004-08-12 13:45:08 +000022309# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022310{ echo "$as_me:$LINENO: checking for socketpair" >&5
22311echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022312cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022313/* confdefs.h. */
22314_ACEOF
22315cat confdefs.h >>conftest.$ac_ext
22316cat >>conftest.$ac_ext <<_ACEOF
22317/* end confdefs.h. */
22318
22319#include <sys/types.h>
22320#include <sys/socket.h>
22321
22322int
22323main ()
22324{
22325void *x=socketpair
22326 ;
22327 return 0;
22328}
22329_ACEOF
22330rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022331if { (ac_try="$ac_compile"
22332case "(($ac_try" in
22333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22334 *) ac_try_echo=$ac_try;;
22335esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022337 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022339 grep -v '^ *+' conftest.er1 >conftest.err
22340 rm -f conftest.er1
22341 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022343 (exit $ac_status); } && {
22344 test -z "$ac_c_werror_flag" ||
22345 test ! -s conftest.err
22346 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022347
22348cat >>confdefs.h <<\_ACEOF
22349#define HAVE_SOCKETPAIR 1
22350_ACEOF
22351
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022352 { echo "$as_me:$LINENO: result: yes" >&5
22353echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022354else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022355 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022356sed 's/^/| /' conftest.$ac_ext >&5
22357
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022358 { echo "$as_me:$LINENO: result: no" >&5
22359echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022360
22361fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022362
22363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022364
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022365# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022366{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22367echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022368cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022369/* confdefs.h. */
22370_ACEOF
22371cat confdefs.h >>conftest.$ac_ext
22372cat >>conftest.$ac_ext <<_ACEOF
22373/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022374#include <sys/types.h>
22375#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022376int
22377main ()
22378{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022379struct sockaddr x;
22380x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022381 ;
22382 return 0;
22383}
22384_ACEOF
22385rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022386if { (ac_try="$ac_compile"
22387case "(($ac_try" in
22388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22389 *) ac_try_echo=$ac_try;;
22390esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022392 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022394 grep -v '^ *+' conftest.er1 >conftest.err
22395 rm -f conftest.er1
22396 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022398 (exit $ac_status); } && {
22399 test -z "$ac_c_werror_flag" ||
22400 test ! -s conftest.err
22401 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022402 { echo "$as_me:$LINENO: result: yes" >&5
22403echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022404
22405cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022406#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022407_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022408
22409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022411sed 's/^/| /' conftest.$ac_ext >&5
22412
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022413 { echo "$as_me:$LINENO: result: no" >&5
22414echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022415fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416
22417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022418
Guido van Rossumda88dad1995-01-26 00:46:29 +000022419va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022420{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22421echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022422cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022423/* confdefs.h. */
22424_ACEOF
22425cat confdefs.h >>conftest.$ac_ext
22426cat >>conftest.$ac_ext <<_ACEOF
22427/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022428
22429#ifdef HAVE_STDARG_PROTOTYPES
22430#include <stdarg.h>
22431#else
22432#include <varargs.h>
22433#endif
22434
Martin v. Löwis11437992002-04-12 09:54:03 +000022435int
22436main ()
22437{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022438va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022439 ;
22440 return 0;
22441}
22442_ACEOF
22443rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022444if { (ac_try="$ac_compile"
22445case "(($ac_try" in
22446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22447 *) ac_try_echo=$ac_try;;
22448esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022449eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022450 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022452 grep -v '^ *+' conftest.er1 >conftest.err
22453 rm -f conftest.er1
22454 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022456 (exit $ac_status); } && {
22457 test -z "$ac_c_werror_flag" ||
22458 test ! -s conftest.err
22459 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022460 :
22461else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022463sed 's/^/| /' conftest.$ac_ext >&5
22464
Martin v. Löwis11437992002-04-12 09:54:03 +000022465
22466
22467cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022468#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022469_ACEOF
22470
Guido van Rossumda88dad1995-01-26 00:46:29 +000022471 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022472
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022474
22475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022476{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22477echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022478
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022479# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022480
22481
22482
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022483{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22484echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022485if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022486 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022487else
Martin v. Löwis11437992002-04-12 09:54:03 +000022488 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022489/* confdefs.h. */
22490_ACEOF
22491cat confdefs.h >>conftest.$ac_ext
22492cat >>conftest.$ac_ext <<_ACEOF
22493/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022494/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22495 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22496#define gethostbyname_r innocuous_gethostbyname_r
22497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022498/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022499 which can conflict with char gethostbyname_r (); below.
22500 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022501 <limits.h> exists even on freestanding compilers. */
22502
22503#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022504# include <limits.h>
22505#else
22506# include <assert.h>
22507#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022508
22509#undef gethostbyname_r
22510
Martin v. Löwiseba40652007-08-30 20:10:57 +000022511/* Override any GCC internal prototype to avoid an error.
22512 Use char because int might match the return type of a GCC
22513 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022514#ifdef __cplusplus
22515extern "C"
22516#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022517char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022518/* The GNU C library defines this for functions which it implements
22519 to always fail with ENOSYS. Some functions are actually named
22520 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022521#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022522choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022523#endif
22524
Skip Montanaro6dead952003-09-25 14:50:04 +000022525int
22526main ()
22527{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022528return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022529 ;
22530 return 0;
22531}
22532_ACEOF
22533rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022534if { (ac_try="$ac_link"
22535case "(($ac_try" in
22536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22537 *) ac_try_echo=$ac_try;;
22538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022540 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022542 grep -v '^ *+' conftest.er1 >conftest.err
22543 rm -f conftest.er1
22544 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022546 (exit $ac_status); } && {
22547 test -z "$ac_c_werror_flag" ||
22548 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022549 } && test -s conftest$ac_exeext &&
22550 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022551 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022552else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022554sed 's/^/| /' conftest.$ac_ext >&5
22555
Martin v. Löwiseba40652007-08-30 20:10:57 +000022556 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022557fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022558
22559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022560 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022561fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022562{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22563echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
22564if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022565
Martin v. Löwis11437992002-04-12 09:54:03 +000022566 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022567#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022568_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022569
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022570 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22571echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022572 OLD_CFLAGS=$CFLAGS
22573 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022575/* confdefs.h. */
22576_ACEOF
22577cat confdefs.h >>conftest.$ac_ext
22578cat >>conftest.$ac_ext <<_ACEOF
22579/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022580
22581# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022582
Martin v. Löwis11437992002-04-12 09:54:03 +000022583int
22584main ()
22585{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022586
22587 char *name;
22588 struct hostent *he, *res;
22589 char buffer[2048];
22590 int buflen = 2048;
22591 int h_errnop;
22592
22593 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022594
22595 ;
22596 return 0;
22597}
22598_ACEOF
22599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022600if { (ac_try="$ac_compile"
22601case "(($ac_try" in
22602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22603 *) ac_try_echo=$ac_try;;
22604esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022606 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022608 grep -v '^ *+' conftest.er1 >conftest.err
22609 rm -f conftest.er1
22610 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022612 (exit $ac_status); } && {
22613 test -z "$ac_c_werror_flag" ||
22614 test ! -s conftest.err
22615 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022616
22617 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022618#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022619_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022620
Martin v. Löwis11437992002-04-12 09:54:03 +000022621
22622cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022623#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022624_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022625
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022626 { echo "$as_me:$LINENO: result: yes" >&5
22627echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022628
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022631sed 's/^/| /' conftest.$ac_ext >&5
22632
Martin v. Löwis11437992002-04-12 09:54:03 +000022633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022634 { echo "$as_me:$LINENO: result: no" >&5
22635echo "${ECHO_T}no" >&6; }
22636 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22637echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022639/* confdefs.h. */
22640_ACEOF
22641cat confdefs.h >>conftest.$ac_ext
22642cat >>conftest.$ac_ext <<_ACEOF
22643/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022644
22645# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022646
Martin v. Löwis11437992002-04-12 09:54:03 +000022647int
22648main ()
22649{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022650
22651 char *name;
22652 struct hostent *he;
22653 char buffer[2048];
22654 int buflen = 2048;
22655 int h_errnop;
22656
22657 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022658
22659 ;
22660 return 0;
22661}
22662_ACEOF
22663rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022664if { (ac_try="$ac_compile"
22665case "(($ac_try" in
22666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22667 *) ac_try_echo=$ac_try;;
22668esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022670 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022672 grep -v '^ *+' conftest.er1 >conftest.err
22673 rm -f conftest.er1
22674 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676 (exit $ac_status); } && {
22677 test -z "$ac_c_werror_flag" ||
22678 test ! -s conftest.err
22679 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022680
22681 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022682#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022683_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022684
Martin v. Löwis11437992002-04-12 09:54:03 +000022685
22686cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022687#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022688_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022689
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022690 { echo "$as_me:$LINENO: result: yes" >&5
22691echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022692
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022693else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022695sed 's/^/| /' conftest.$ac_ext >&5
22696
Martin v. Löwis11437992002-04-12 09:54:03 +000022697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022698 { echo "$as_me:$LINENO: result: no" >&5
22699echo "${ECHO_T}no" >&6; }
22700 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22701echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022702 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022703/* confdefs.h. */
22704_ACEOF
22705cat confdefs.h >>conftest.$ac_ext
22706cat >>conftest.$ac_ext <<_ACEOF
22707/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022708
22709# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022710
Martin v. Löwis11437992002-04-12 09:54:03 +000022711int
22712main ()
22713{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022714
22715 char *name;
22716 struct hostent *he;
22717 struct hostent_data data;
22718
22719 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022720
22721 ;
22722 return 0;
22723}
22724_ACEOF
22725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726if { (ac_try="$ac_compile"
22727case "(($ac_try" in
22728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22729 *) ac_try_echo=$ac_try;;
22730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022734 grep -v '^ *+' conftest.er1 >conftest.err
22735 rm -f conftest.er1
22736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738 (exit $ac_status); } && {
22739 test -z "$ac_c_werror_flag" ||
22740 test ! -s conftest.err
22741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022742
22743 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022744#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022745_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022746
Martin v. Löwis11437992002-04-12 09:54:03 +000022747
22748cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022749#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022750_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022751
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022752 { echo "$as_me:$LINENO: result: yes" >&5
22753echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022754
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022755else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022757sed 's/^/| /' conftest.$ac_ext >&5
22758
Martin v. Löwis11437992002-04-12 09:54:03 +000022759
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022760 { echo "$as_me:$LINENO: result: no" >&5
22761echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022764
22765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022766
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022768
22769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022772
22773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022774 CFLAGS=$OLD_CFLAGS
22775
22776else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022777
Martin v. Löwis11437992002-04-12 09:54:03 +000022778
22779for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022780do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022781as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22782{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22783echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022784if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022785 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022786else
Martin v. Löwis11437992002-04-12 09:54:03 +000022787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022788/* confdefs.h. */
22789_ACEOF
22790cat confdefs.h >>conftest.$ac_ext
22791cat >>conftest.$ac_ext <<_ACEOF
22792/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022793/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22794 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22795#define $ac_func innocuous_$ac_func
22796
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022797/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022798 which can conflict with char $ac_func (); below.
22799 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022800 <limits.h> exists even on freestanding compilers. */
22801
22802#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022803# include <limits.h>
22804#else
22805# include <assert.h>
22806#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022807
22808#undef $ac_func
22809
Martin v. Löwiseba40652007-08-30 20:10:57 +000022810/* Override any GCC internal prototype to avoid an error.
22811 Use char because int might match the return type of a GCC
22812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022813#ifdef __cplusplus
22814extern "C"
22815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022816char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022817/* The GNU C library defines this for functions which it implements
22818 to always fail with ENOSYS. Some functions are actually named
22819 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022820#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022821choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022822#endif
22823
Skip Montanaro6dead952003-09-25 14:50:04 +000022824int
22825main ()
22826{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022827return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022828 ;
22829 return 0;
22830}
22831_ACEOF
22832rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022833if { (ac_try="$ac_link"
22834case "(($ac_try" in
22835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22836 *) ac_try_echo=$ac_try;;
22837esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022839 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022841 grep -v '^ *+' conftest.er1 >conftest.err
22842 rm -f conftest.er1
22843 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022845 (exit $ac_status); } && {
22846 test -z "$ac_c_werror_flag" ||
22847 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022848 } && test -s conftest$ac_exeext &&
22849 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022850 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022851else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022852 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022853sed 's/^/| /' conftest.$ac_ext >&5
22854
Martin v. Löwiseba40652007-08-30 20:10:57 +000022855 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022856fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022857
22858rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022859 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022860fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022861ac_res=`eval echo '${'$as_ac_var'}'`
22862 { echo "$as_me:$LINENO: result: $ac_res" >&5
22863echo "${ECHO_T}$ac_res" >&6; }
22864if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022865 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022866#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022867_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022868
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022869fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022870done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022871
Michael W. Hudson54241132001-12-07 15:38:26 +000022872
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022873fi
22874
Michael W. Hudson54241132001-12-07 15:38:26 +000022875
22876
22877
22878
22879
22880
Guido van Rossum627b2d71993-12-24 10:39:16 +000022881# checks for system services
22882# (none yet)
22883
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022884# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022885{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
22886echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022887if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022888 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022889else
Martin v. Löwis11437992002-04-12 09:54:03 +000022890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022891/* confdefs.h. */
22892_ACEOF
22893cat confdefs.h >>conftest.$ac_ext
22894cat >>conftest.$ac_ext <<_ACEOF
22895/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022896/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22897 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22898#define __fpu_control innocuous___fpu_control
22899
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022900/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022901 which can conflict with char __fpu_control (); below.
22902 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022903 <limits.h> exists even on freestanding compilers. */
22904
22905#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022906# include <limits.h>
22907#else
22908# include <assert.h>
22909#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022910
22911#undef __fpu_control
22912
Martin v. Löwiseba40652007-08-30 20:10:57 +000022913/* Override any GCC internal prototype to avoid an error.
22914 Use char because int might match the return type of a GCC
22915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022916#ifdef __cplusplus
22917extern "C"
22918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022919char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022920/* The GNU C library defines this for functions which it implements
22921 to always fail with ENOSYS. Some functions are actually named
22922 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022923#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022924choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022925#endif
22926
Skip Montanaro6dead952003-09-25 14:50:04 +000022927int
22928main ()
22929{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022930return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022931 ;
22932 return 0;
22933}
22934_ACEOF
22935rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022936if { (ac_try="$ac_link"
22937case "(($ac_try" in
22938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22939 *) ac_try_echo=$ac_try;;
22940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022942 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022944 grep -v '^ *+' conftest.er1 >conftest.err
22945 rm -f conftest.er1
22946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022948 (exit $ac_status); } && {
22949 test -z "$ac_c_werror_flag" ||
22950 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022951 } && test -s conftest$ac_exeext &&
22952 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022953 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022954else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022956sed 's/^/| /' conftest.$ac_ext >&5
22957
Martin v. Löwiseba40652007-08-30 20:10:57 +000022958 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022959fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022960
22961rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022962 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022963fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022964{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22965echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
22966if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022967 :
22968else
Martin v. Löwis11437992002-04-12 09:54:03 +000022969
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022970{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22971echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022972if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022973 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022974else
Martin v. Löwis11437992002-04-12 09:54:03 +000022975 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022976LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022978/* confdefs.h. */
22979_ACEOF
22980cat confdefs.h >>conftest.$ac_ext
22981cat >>conftest.$ac_ext <<_ACEOF
22982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022983
Martin v. Löwiseba40652007-08-30 20:10:57 +000022984/* Override any GCC internal prototype to avoid an error.
22985 Use char because int might match the return type of a GCC
22986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022987#ifdef __cplusplus
22988extern "C"
22989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022990char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022991int
22992main ()
22993{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022994return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022995 ;
22996 return 0;
22997}
22998_ACEOF
22999rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023000if { (ac_try="$ac_link"
23001case "(($ac_try" in
23002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23003 *) ac_try_echo=$ac_try;;
23004esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023006 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023008 grep -v '^ *+' conftest.er1 >conftest.err
23009 rm -f conftest.er1
23010 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023012 (exit $ac_status); } && {
23013 test -z "$ac_c_werror_flag" ||
23014 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023015 } && test -s conftest$ac_exeext &&
23016 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023017 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023018else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023020sed 's/^/| /' conftest.$ac_ext >&5
23021
Martin v. Löwiseba40652007-08-30 20:10:57 +000023022 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023023fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023024
23025rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023026 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023027LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023028fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023029{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23030echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23031if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023032 cat >>confdefs.h <<_ACEOF
23033#define HAVE_LIBIEEE 1
23034_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023035
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023036 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023037
Guido van Rossum627b2d71993-12-24 10:39:16 +000023038fi
23039
Michael W. Hudson54241132001-12-07 15:38:26 +000023040
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023041fi
23042
Michael W. Hudson54241132001-12-07 15:38:26 +000023043
Guido van Rossum7f253911997-05-09 02:42:48 +000023044# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023045{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23046echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023047
Martin v. Löwiseba40652007-08-30 20:10:57 +000023048# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023049if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023050 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023051if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023052then
23053
23054cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023055#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023056_ACEOF
23057
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023058 { echo "$as_me:$LINENO: result: yes" >&5
23059echo "${ECHO_T}yes" >&6; }
23060else { echo "$as_me:$LINENO: result: no" >&5
23061echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023062fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023063else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023064 { echo "$as_me:$LINENO: result: no" >&5
23065echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023066fi
23067
Guido van Rossum7f253911997-05-09 02:42:48 +000023068
Guido van Rossum7f43da71994-08-01 12:15:30 +000023069# check for --with-libm=...
23070
Guido van Rossum563e7081996-09-10 18:20:48 +000023071case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023072Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023073BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023074*) LIBM=-lm
23075esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023076{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23077echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023078
Martin v. Löwiseba40652007-08-30 20:10:57 +000023079# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023080if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023081 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023082if test "$withval" = no
23083then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023084 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23085echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023086elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023087then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023088 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23089echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23090else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23091echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023092 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023093fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023094else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023095 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23096echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023097fi
23098
Guido van Rossum7f43da71994-08-01 12:15:30 +000023099
23100# check for --with-libc=...
23101
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023102{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23103echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023104
Martin v. Löwiseba40652007-08-30 20:10:57 +000023105# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023106if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023107 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023108if test "$withval" = no
23109then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023110 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23111echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023112elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023113then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023114 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23115echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23116else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23117echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023118 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023119fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023120else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023121 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23122echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123fi
23124
Guido van Rossum7f43da71994-08-01 12:15:30 +000023125
Christian Heimes0a8143f2007-12-18 23:22:54 +000023126# ************************************
23127# * Check for mathematical functions *
23128# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023129
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023130LIBS_SAVE=$LIBS
23131LIBS="$LIBS $LIBM"
23132
Mark Dickinson04b27232009-01-04 12:29:36 +000023133# Detect whether system arithmetic is subject to x87-style double
23134# rounding issues. The result of this test has little meaning on non
23135# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23136# mode is round-to-nearest and double rounding issues are present, and
23137# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023138{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23139echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023140if test "${ac_cv_x87_double_rounding+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023141 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson04b27232009-01-04 12:29:36 +000023142else
23143
23144if test "$cross_compiling" = yes; then
23145 ac_cv_x87_double_rounding=no
23146else
23147 cat >conftest.$ac_ext <<_ACEOF
23148/* confdefs.h. */
23149_ACEOF
23150cat confdefs.h >>conftest.$ac_ext
23151cat >>conftest.$ac_ext <<_ACEOF
23152/* end confdefs.h. */
23153
23154#include <stdlib.h>
23155#include <math.h>
23156int main() {
23157 volatile double x, y, z;
23158 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23159 x = 0.99999999999999989; /* 1-2**-53 */
23160 y = 1./x;
23161 if (y != 1.)
23162 exit(0);
23163 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23164 x = 1e16;
23165 y = 2.99999;
23166 z = x + y;
23167 if (z != 1e16+4.)
23168 exit(0);
23169 /* both tests show evidence of double rounding */
23170 exit(1);
23171}
23172
23173_ACEOF
23174rm -f conftest$ac_exeext
23175if { (ac_try="$ac_link"
23176case "(($ac_try" in
23177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23178 *) ac_try_echo=$ac_try;;
23179esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023181 (eval "$ac_link") 2>&5
23182 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023184 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23185 { (case "(($ac_try" in
23186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23187 *) ac_try_echo=$ac_try;;
23188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023190 (eval "$ac_try") 2>&5
23191 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023193 (exit $ac_status); }; }; then
23194 ac_cv_x87_double_rounding=no
23195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023196 echo "$as_me: program exited with status $ac_status" >&5
23197echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000023198sed 's/^/| /' conftest.$ac_ext >&5
23199
23200( exit $ac_status )
23201ac_cv_x87_double_rounding=yes
23202fi
23203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23204fi
23205
23206
23207fi
23208
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023209{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23210echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000023211if test "$ac_cv_x87_double_rounding" = yes
23212then
23213
23214cat >>confdefs.h <<\_ACEOF
23215#define X87_DOUBLE_ROUNDING 1
23216_ACEOF
23217
23218fi
23219
Jesse Noller355b1262009-04-02 00:03:28 +000023220# Multiprocessing check for broken sem_getvalue
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023221{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23222echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023223if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23224 echo $ECHO_N "(cached) $ECHO_C" >&6
23225else
23226 if test "$cross_compiling" = yes; then
23227 ac_cv_broken_sem_getvalue=yes
Jesse Noller355b1262009-04-02 00:03:28 +000023228else
23229 cat >conftest.$ac_ext <<_ACEOF
23230/* confdefs.h. */
23231_ACEOF
23232cat confdefs.h >>conftest.$ac_ext
23233cat >>conftest.$ac_ext <<_ACEOF
23234/* end confdefs.h. */
23235
23236#include <unistd.h>
23237#include <fcntl.h>
23238#include <stdio.h>
23239#include <semaphore.h>
23240#include <sys/stat.h>
23241
23242int main(void){
23243 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23244 int count;
23245 int res;
23246 if(a==SEM_FAILED){
23247 perror("sem_open");
23248 return 1;
23249
23250 }
23251 res = sem_getvalue(a, &count);
23252 sem_close(a);
23253 return res==-1 ? 1 : 0;
23254}
23255
Jesse Noller355b1262009-04-02 00:03:28 +000023256_ACEOF
23257rm -f conftest$ac_exeext
23258if { (ac_try="$ac_link"
23259case "(($ac_try" in
23260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23261 *) ac_try_echo=$ac_try;;
23262esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023264 (eval "$ac_link") 2>&5
23265 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023267 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23268 { (case "(($ac_try" in
23269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23270 *) ac_try_echo=$ac_try;;
23271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023273 (eval "$ac_try") 2>&5
23274 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023276 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023277 ac_cv_broken_sem_getvalue=no
Jesse Noller355b1262009-04-02 00:03:28 +000023278else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023279 echo "$as_me: program exited with status $ac_status" >&5
23280echo "$as_me: failed program was:" >&5
Jesse Noller355b1262009-04-02 00:03:28 +000023281sed 's/^/| /' conftest.$ac_ext >&5
23282
23283( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023284ac_cv_broken_sem_getvalue=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023285fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023286rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23287fi
23288
23289
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000023290
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000023291fi
23292
23293{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
23294echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
23295if test $ac_cv_broken_sem_getvalue = yes
23296then
23297
23298cat >>confdefs.h <<\_ACEOF
23299#define HAVE_BROKEN_SEM_GETVALUE 1
23300_ACEOF
23301
23302fi
23303
Mark Dickinson265d7382008-04-21 22:32:24 +000023304# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23305# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023306{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23307echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023308if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023309 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000023310else
23311
23312if test "$cross_compiling" = yes; then
23313 ac_cv_tanh_preserves_zero_sign=no
23314else
23315 cat >conftest.$ac_ext <<_ACEOF
23316/* confdefs.h. */
23317_ACEOF
23318cat confdefs.h >>conftest.$ac_ext
23319cat >>conftest.$ac_ext <<_ACEOF
23320/* end confdefs.h. */
23321
23322#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000023323#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000023324int main() {
23325 /* return 0 if either negative zeros don't exist
23326 on this platform or if negative zeros exist
23327 and tanh(-0.) == -0. */
23328 if (atan2(0., -1.) == atan2(-0., -1.) ||
23329 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23330 else exit(1);
23331}
23332
23333_ACEOF
23334rm -f conftest$ac_exeext
23335if { (ac_try="$ac_link"
23336case "(($ac_try" in
23337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23338 *) ac_try_echo=$ac_try;;
23339esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023341 (eval "$ac_link") 2>&5
23342 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023344 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23345 { (case "(($ac_try" in
23346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23347 *) ac_try_echo=$ac_try;;
23348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023350 (eval "$ac_try") 2>&5
23351 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023353 (exit $ac_status); }; }; then
23354 ac_cv_tanh_preserves_zero_sign=yes
23355else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023356 echo "$as_me: program exited with status $ac_status" >&5
23357echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000023358sed 's/^/| /' conftest.$ac_ext >&5
23359
23360( exit $ac_status )
23361ac_cv_tanh_preserves_zero_sign=no
23362fi
23363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23364fi
23365
23366
23367fi
23368
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023369{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23370echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000023371if test "$ac_cv_tanh_preserves_zero_sign" = yes
23372then
23373
23374cat >>confdefs.h <<\_ACEOF
23375#define TANH_PRESERVES_ZERO_SIGN 1
23376_ACEOF
23377
23378fi
23379
Martin v. Löwis11437992002-04-12 09:54:03 +000023380
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023381
Michael W. Hudson54241132001-12-07 15:38:26 +000023382
Christian Heimes0a8143f2007-12-18 23:22:54 +000023383
23384
23385
23386
23387
Mark Dickinson8e5446f2009-04-18 14:41:37 +000023388
23389for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes0a8143f2007-12-18 23:22:54 +000023390do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023391as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23392{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23393echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000023394if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023395 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000023396else
23397 cat >conftest.$ac_ext <<_ACEOF
23398/* confdefs.h. */
23399_ACEOF
23400cat confdefs.h >>conftest.$ac_ext
23401cat >>conftest.$ac_ext <<_ACEOF
23402/* end confdefs.h. */
23403/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23404 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23405#define $ac_func innocuous_$ac_func
23406
23407/* System header to define __stub macros and hopefully few prototypes,
23408 which can conflict with char $ac_func (); below.
23409 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23410 <limits.h> exists even on freestanding compilers. */
23411
23412#ifdef __STDC__
23413# include <limits.h>
23414#else
23415# include <assert.h>
23416#endif
23417
23418#undef $ac_func
23419
23420/* Override any GCC internal prototype to avoid an error.
23421 Use char because int might match the return type of a GCC
23422 builtin and then its argument prototype would still apply. */
23423#ifdef __cplusplus
23424extern "C"
23425#endif
23426char $ac_func ();
23427/* The GNU C library defines this for functions which it implements
23428 to always fail with ENOSYS. Some functions are actually named
23429 something starting with __ and the normal name is an alias. */
23430#if defined __stub_$ac_func || defined __stub___$ac_func
23431choke me
23432#endif
23433
23434int
23435main ()
23436{
23437return $ac_func ();
23438 ;
23439 return 0;
23440}
23441_ACEOF
23442rm -f conftest.$ac_objext conftest$ac_exeext
23443if { (ac_try="$ac_link"
23444case "(($ac_try" in
23445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23446 *) ac_try_echo=$ac_try;;
23447esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023449 (eval "$ac_link") 2>conftest.er1
23450 ac_status=$?
23451 grep -v '^ *+' conftest.er1 >conftest.err
23452 rm -f conftest.er1
23453 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023455 (exit $ac_status); } && {
23456 test -z "$ac_c_werror_flag" ||
23457 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023458 } && test -s conftest$ac_exeext &&
23459 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023460 eval "$as_ac_var=yes"
23461else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023462 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000023463sed 's/^/| /' conftest.$ac_ext >&5
23464
23465 eval "$as_ac_var=no"
23466fi
23467
23468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23469 conftest$ac_exeext conftest.$ac_ext
23470fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023471ac_res=`eval echo '${'$as_ac_var'}'`
23472 { echo "$as_me:$LINENO: result: $ac_res" >&5
23473echo "${ECHO_T}$ac_res" >&6; }
23474if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000023475 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023476#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000023477_ACEOF
23478
23479fi
23480done
23481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023482{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23483echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023484if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023485 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023486else
23487 cat >conftest.$ac_ext <<_ACEOF
23488/* confdefs.h. */
23489_ACEOF
23490cat confdefs.h >>conftest.$ac_ext
23491cat >>conftest.$ac_ext <<_ACEOF
23492/* end confdefs.h. */
23493#include <math.h>
23494
23495int
23496main ()
23497{
23498#ifndef isinf
23499 (void) isinf;
23500#endif
23501
23502 ;
23503 return 0;
23504}
23505_ACEOF
23506rm -f conftest.$ac_objext
23507if { (ac_try="$ac_compile"
23508case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;;
23511esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023513 (eval "$ac_compile") 2>conftest.er1
23514 ac_status=$?
23515 grep -v '^ *+' conftest.er1 >conftest.err
23516 rm -f conftest.er1
23517 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023519 (exit $ac_status); } && {
23520 test -z "$ac_c_werror_flag" ||
23521 test ! -s conftest.err
23522 } && test -s conftest.$ac_objext; then
23523 ac_cv_have_decl_isinf=yes
23524else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023525 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023526sed 's/^/| /' conftest.$ac_ext >&5
23527
23528 ac_cv_have_decl_isinf=no
23529fi
23530
23531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23532fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023533{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23534echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
23535if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023536
23537cat >>confdefs.h <<_ACEOF
23538#define HAVE_DECL_ISINF 1
23539_ACEOF
23540
23541
23542else
23543 cat >>confdefs.h <<_ACEOF
23544#define HAVE_DECL_ISINF 0
23545_ACEOF
23546
23547
23548fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023549{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23550echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023551if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023552 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023553else
23554 cat >conftest.$ac_ext <<_ACEOF
23555/* confdefs.h. */
23556_ACEOF
23557cat confdefs.h >>conftest.$ac_ext
23558cat >>conftest.$ac_ext <<_ACEOF
23559/* end confdefs.h. */
23560#include <math.h>
23561
23562int
23563main ()
23564{
23565#ifndef isnan
23566 (void) isnan;
23567#endif
23568
23569 ;
23570 return 0;
23571}
23572_ACEOF
23573rm -f conftest.$ac_objext
23574if { (ac_try="$ac_compile"
23575case "(($ac_try" in
23576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23577 *) ac_try_echo=$ac_try;;
23578esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023580 (eval "$ac_compile") 2>conftest.er1
23581 ac_status=$?
23582 grep -v '^ *+' conftest.er1 >conftest.err
23583 rm -f conftest.er1
23584 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023586 (exit $ac_status); } && {
23587 test -z "$ac_c_werror_flag" ||
23588 test ! -s conftest.err
23589 } && test -s conftest.$ac_objext; then
23590 ac_cv_have_decl_isnan=yes
23591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023592 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023593sed 's/^/| /' conftest.$ac_ext >&5
23594
23595 ac_cv_have_decl_isnan=no
23596fi
23597
23598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23599fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023600{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23601echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
23602if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023603
23604cat >>confdefs.h <<_ACEOF
23605#define HAVE_DECL_ISNAN 1
23606_ACEOF
23607
23608
23609else
23610 cat >>confdefs.h <<_ACEOF
23611#define HAVE_DECL_ISNAN 0
23612_ACEOF
23613
23614
23615fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023616{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23617echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023618if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023619 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023620else
23621 cat >conftest.$ac_ext <<_ACEOF
23622/* confdefs.h. */
23623_ACEOF
23624cat confdefs.h >>conftest.$ac_ext
23625cat >>conftest.$ac_ext <<_ACEOF
23626/* end confdefs.h. */
23627#include <math.h>
23628
23629int
23630main ()
23631{
23632#ifndef isfinite
23633 (void) isfinite;
23634#endif
23635
23636 ;
23637 return 0;
23638}
23639_ACEOF
23640rm -f conftest.$ac_objext
23641if { (ac_try="$ac_compile"
23642case "(($ac_try" in
23643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23644 *) ac_try_echo=$ac_try;;
23645esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023647 (eval "$ac_compile") 2>conftest.er1
23648 ac_status=$?
23649 grep -v '^ *+' conftest.er1 >conftest.err
23650 rm -f conftest.er1
23651 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023653 (exit $ac_status); } && {
23654 test -z "$ac_c_werror_flag" ||
23655 test ! -s conftest.err
23656 } && test -s conftest.$ac_objext; then
23657 ac_cv_have_decl_isfinite=yes
23658else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023659 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023660sed 's/^/| /' conftest.$ac_ext >&5
23661
23662 ac_cv_have_decl_isfinite=no
23663fi
23664
23665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23666fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023667{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23668echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
23669if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000023670
23671cat >>confdefs.h <<_ACEOF
23672#define HAVE_DECL_ISFINITE 1
23673_ACEOF
23674
23675
23676else
23677 cat >>confdefs.h <<_ACEOF
23678#define HAVE_DECL_ISFINITE 0
23679_ACEOF
23680
23681
23682fi
23683
23684
Christian Heimes0a8143f2007-12-18 23:22:54 +000023685
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023686LIBS=$LIBS_SAVE
23687
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023688# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023689{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23690echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023691# Check whether --enable-big-digits was given.
23692if test "${enable_big_digits+set}" = set; then
23693 enableval=$enable_big_digits; case $enable_big_digits in
23694yes)
23695 enable_big_digits=30 ;;
23696no)
23697 enable_big_digits=15 ;;
2369815|30)
23699 ;;
23700*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023701 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23702echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023703 { (exit 1); exit 1; }; } ;;
23704esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023705{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23706echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023707
23708cat >>confdefs.h <<_ACEOF
23709#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23710_ACEOF
23711
23712
23713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023714 { echo "$as_me:$LINENO: result: no value specified" >&5
23715echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000023716fi
23717
23718
Guido van Rossumef2255b2000-03-10 22:30:29 +000023719# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023720if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023721 { echo "$as_me:$LINENO: checking for wchar.h" >&5
23722echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023723if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023724 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023725fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023726{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23727echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023728else
Martin v. Löwis11437992002-04-12 09:54:03 +000023729 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023730{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
23731echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023732cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023733/* confdefs.h. */
23734_ACEOF
23735cat confdefs.h >>conftest.$ac_ext
23736cat >>conftest.$ac_ext <<_ACEOF
23737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023738$ac_includes_default
23739#include <wchar.h>
23740_ACEOF
23741rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023742if { (ac_try="$ac_compile"
23743case "(($ac_try" in
23744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23745 *) ac_try_echo=$ac_try;;
23746esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023750 grep -v '^ *+' conftest.er1 >conftest.err
23751 rm -f conftest.er1
23752 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023754 (exit $ac_status); } && {
23755 test -z "$ac_c_werror_flag" ||
23756 test ! -s conftest.err
23757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023758 ac_header_compiler=yes
23759else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023761sed 's/^/| /' conftest.$ac_ext >&5
23762
Martin v. Löwiseba40652007-08-30 20:10:57 +000023763 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023764fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023765
23766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023767{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23768echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023769
23770# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023771{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
23772echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023774/* confdefs.h. */
23775_ACEOF
23776cat confdefs.h >>conftest.$ac_ext
23777cat >>conftest.$ac_ext <<_ACEOF
23778/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023779#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023780_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023781if { (ac_try="$ac_cpp conftest.$ac_ext"
23782case "(($ac_try" in
23783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23784 *) ac_try_echo=$ac_try;;
23785esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023787 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023788 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023789 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023790 rm -f conftest.er1
23791 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023793 (exit $ac_status); } >/dev/null && {
23794 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23795 test ! -s conftest.err
23796 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023797 ac_header_preproc=yes
23798else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023799 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023800sed 's/^/| /' conftest.$ac_ext >&5
23801
Martin v. Löwis11437992002-04-12 09:54:03 +000023802 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023803fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023804
Martin v. Löwis11437992002-04-12 09:54:03 +000023805rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023806{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23807echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023808
23809# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023810case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23811 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023812 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23813echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23814 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23815echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023816 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023817 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023818 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023819 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23820echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23821 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23822echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23823 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23824echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23825 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23826echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23827 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23828echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23829 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23830echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000023831 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000023832## -------------------------------------- ##
23833## Report this to http://bugs.python.org/ ##
23834## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023835_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000023836 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023837 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023839{ echo "$as_me:$LINENO: checking for wchar.h" >&5
23840echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023841if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023842 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023843else
23844 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023845fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023846{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23847echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023848
23849fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023850if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023851
23852
23853cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023854#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023855_ACEOF
23856
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023857 wchar_h="yes"
23858
Guido van Rossumef2255b2000-03-10 22:30:29 +000023859else
Martin v. Löwis11437992002-04-12 09:54:03 +000023860 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023861
23862fi
23863
Michael W. Hudson54241132001-12-07 15:38:26 +000023864
Martin v. Löwis11437992002-04-12 09:54:03 +000023865
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023866# determine wchar_t size
23867if test "$wchar_h" = yes
23868then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023869 { echo "$as_me:$LINENO: checking for wchar_t" >&5
23870echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
23871if test "${ac_cv_type_wchar_t+set}" = set; then
23872 echo $ECHO_N "(cached) $ECHO_C" >&6
23873else
23874 cat >conftest.$ac_ext <<_ACEOF
23875/* confdefs.h. */
23876_ACEOF
23877cat confdefs.h >>conftest.$ac_ext
23878cat >>conftest.$ac_ext <<_ACEOF
23879/* end confdefs.h. */
23880#include <wchar.h>
23881
23882typedef wchar_t ac__type_new_;
23883int
23884main ()
23885{
23886if ((ac__type_new_ *) 0)
23887 return 0;
23888if (sizeof (ac__type_new_))
23889 return 0;
23890 ;
23891 return 0;
23892}
23893_ACEOF
23894rm -f conftest.$ac_objext
23895if { (ac_try="$ac_compile"
23896case "(($ac_try" in
23897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23898 *) ac_try_echo=$ac_try;;
23899esac
23900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23901 (eval "$ac_compile") 2>conftest.er1
23902 ac_status=$?
23903 grep -v '^ *+' conftest.er1 >conftest.err
23904 rm -f conftest.er1
23905 cat conftest.err >&5
23906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23907 (exit $ac_status); } && {
23908 test -z "$ac_c_werror_flag" ||
23909 test ! -s conftest.err
23910 } && test -s conftest.$ac_objext; then
23911 ac_cv_type_wchar_t=yes
23912else
23913 echo "$as_me: failed program was:" >&5
23914sed 's/^/| /' conftest.$ac_ext >&5
23915
23916 ac_cv_type_wchar_t=no
23917fi
23918
23919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23920fi
23921{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
23922echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
23923
23924# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000023925# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23926# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23927# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023928{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
23929echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023930if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023931 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023932else
Martin v. Löwis11437992002-04-12 09:54:03 +000023933 if test "$cross_compiling" = yes; then
23934 # Depending upon the size, compute the lo and hi bounds.
23935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023936/* confdefs.h. */
23937_ACEOF
23938cat confdefs.h >>conftest.$ac_ext
23939cat >>conftest.$ac_ext <<_ACEOF
23940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023941#include <wchar.h>
23942
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023943 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023944int
23945main ()
23946{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023947static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023948test_array [0] = 0
23949
23950 ;
23951 return 0;
23952}
23953_ACEOF
23954rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023955if { (ac_try="$ac_compile"
23956case "(($ac_try" in
23957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23958 *) ac_try_echo=$ac_try;;
23959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023963 grep -v '^ *+' conftest.er1 >conftest.err
23964 rm -f conftest.er1
23965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023967 (exit $ac_status); } && {
23968 test -z "$ac_c_werror_flag" ||
23969 test ! -s conftest.err
23970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023971 ac_lo=0 ac_mid=0
23972 while :; do
23973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023974/* confdefs.h. */
23975_ACEOF
23976cat confdefs.h >>conftest.$ac_ext
23977cat >>conftest.$ac_ext <<_ACEOF
23978/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023979#include <wchar.h>
23980
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023981 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000023982int
23983main ()
23984{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023985static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023986test_array [0] = 0
23987
23988 ;
23989 return 0;
23990}
23991_ACEOF
23992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023993if { (ac_try="$ac_compile"
23994case "(($ac_try" in
23995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23996 *) ac_try_echo=$ac_try;;
23997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024001 grep -v '^ *+' conftest.er1 >conftest.err
24002 rm -f conftest.er1
24003 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024005 (exit $ac_status); } && {
24006 test -z "$ac_c_werror_flag" ||
24007 test ! -s conftest.err
24008 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024009 ac_hi=$ac_mid; break
24010else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024012sed 's/^/| /' conftest.$ac_ext >&5
24013
Martin v. Löwiseba40652007-08-30 20:10:57 +000024014 ac_lo=`expr $ac_mid + 1`
24015 if test $ac_lo -le $ac_mid; then
24016 ac_lo= ac_hi=
24017 break
24018 fi
24019 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024021
24022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024023 done
24024else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024026sed 's/^/| /' conftest.$ac_ext >&5
24027
Martin v. Löwiseba40652007-08-30 20:10:57 +000024028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024029/* confdefs.h. */
24030_ACEOF
24031cat confdefs.h >>conftest.$ac_ext
24032cat >>conftest.$ac_ext <<_ACEOF
24033/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024034#include <wchar.h>
24035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024036 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024037int
24038main ()
24039{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024040static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024041test_array [0] = 0
24042
24043 ;
24044 return 0;
24045}
24046_ACEOF
24047rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024048if { (ac_try="$ac_compile"
24049case "(($ac_try" in
24050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24051 *) ac_try_echo=$ac_try;;
24052esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024056 grep -v '^ *+' conftest.er1 >conftest.err
24057 rm -f conftest.er1
24058 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024060 (exit $ac_status); } && {
24061 test -z "$ac_c_werror_flag" ||
24062 test ! -s conftest.err
24063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024064 ac_hi=-1 ac_mid=-1
24065 while :; do
24066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024067/* confdefs.h. */
24068_ACEOF
24069cat confdefs.h >>conftest.$ac_ext
24070cat >>conftest.$ac_ext <<_ACEOF
24071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024072#include <wchar.h>
24073
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024074 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024075int
24076main ()
24077{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024078static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024079test_array [0] = 0
24080
24081 ;
24082 return 0;
24083}
24084_ACEOF
24085rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024086if { (ac_try="$ac_compile"
24087case "(($ac_try" in
24088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24089 *) ac_try_echo=$ac_try;;
24090esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024092 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024093 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024094 grep -v '^ *+' conftest.er1 >conftest.err
24095 rm -f conftest.er1
24096 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024098 (exit $ac_status); } && {
24099 test -z "$ac_c_werror_flag" ||
24100 test ! -s conftest.err
24101 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024102 ac_lo=$ac_mid; break
24103else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024105sed 's/^/| /' conftest.$ac_ext >&5
24106
Martin v. Löwiseba40652007-08-30 20:10:57 +000024107 ac_hi=`expr '(' $ac_mid ')' - 1`
24108 if test $ac_mid -le $ac_hi; then
24109 ac_lo= ac_hi=
24110 break
24111 fi
24112 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024113fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024114
24115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024116 done
24117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024119sed 's/^/| /' conftest.$ac_ext >&5
24120
Martin v. Löwiseba40652007-08-30 20:10:57 +000024121 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024123
24124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024126
24127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024128# Binary search between lo and hi bounds.
24129while test "x$ac_lo" != "x$ac_hi"; do
24130 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24131 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024132/* confdefs.h. */
24133_ACEOF
24134cat confdefs.h >>conftest.$ac_ext
24135cat >>conftest.$ac_ext <<_ACEOF
24136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024137#include <wchar.h>
24138
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024139 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000024140int
24141main ()
24142{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024143static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024144test_array [0] = 0
24145
24146 ;
24147 return 0;
24148}
24149_ACEOF
24150rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024151if { (ac_try="$ac_compile"
24152case "(($ac_try" in
24153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24154 *) ac_try_echo=$ac_try;;
24155esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024159 grep -v '^ *+' conftest.er1 >conftest.err
24160 rm -f conftest.er1
24161 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024163 (exit $ac_status); } && {
24164 test -z "$ac_c_werror_flag" ||
24165 test ! -s conftest.err
24166 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024167 ac_hi=$ac_mid
24168else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024170sed 's/^/| /' conftest.$ac_ext >&5
24171
Martin v. Löwiseba40652007-08-30 20:10:57 +000024172 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024174
24175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024176done
24177case $ac_lo in
24178?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024179'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024180 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024181See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024182echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024183See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024184 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024185 else
24186 ac_cv_sizeof_wchar_t=0
24187 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024188esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024189else
Martin v. Löwis11437992002-04-12 09:54:03 +000024190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024191/* confdefs.h. */
24192_ACEOF
24193cat confdefs.h >>conftest.$ac_ext
24194cat >>conftest.$ac_ext <<_ACEOF
24195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024196#include <wchar.h>
24197
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024198 typedef wchar_t ac__type_sizeof_;
24199static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
24200static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024201#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024202#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024203int
24204main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024205{
Martin v. Löwis11437992002-04-12 09:54:03 +000024206
24207 FILE *f = fopen ("conftest.val", "w");
24208 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000024209 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024210 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024211 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024212 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024213 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024214 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024215 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024216 }
24217 else
24218 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000024219 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024220 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000024221 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024222 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024223 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024224 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024225
24226 ;
24227 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024228}
Martin v. Löwis11437992002-04-12 09:54:03 +000024229_ACEOF
24230rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024231if { (ac_try="$ac_link"
24232case "(($ac_try" in
24233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24234 *) ac_try_echo=$ac_try;;
24235esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024237 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024238 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024240 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024241 { (case "(($ac_try" in
24242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24243 *) ac_try_echo=$ac_try;;
24244esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024246 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024247 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024249 (exit $ac_status); }; }; then
24250 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024251else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024252 echo "$as_me: program exited with status $ac_status" >&5
24253echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024254sed 's/^/| /' conftest.$ac_ext >&5
24255
Martin v. Löwis11437992002-04-12 09:54:03 +000024256( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000024257if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024258 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024259See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024260echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024261See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024262 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024263 else
24264 ac_cv_sizeof_wchar_t=0
24265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024266fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024267rm -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 +000024268fi
24269rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024270fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024271{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24272echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024273
24274
24275
Martin v. Löwis11437992002-04-12 09:54:03 +000024276cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024277#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024278_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024279
Michael W. Hudson54241132001-12-07 15:38:26 +000024280
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024281fi
24282
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024283{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24284echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024285have_ucs4_tcl=no
24286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024287/* confdefs.h. */
24288_ACEOF
24289cat confdefs.h >>conftest.$ac_ext
24290cat >>conftest.$ac_ext <<_ACEOF
24291/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024292
24293#include <tcl.h>
24294#if TCL_UTF_MAX != 6
24295# error "NOT UCS4_TCL"
24296#endif
24297int
24298main ()
24299{
24300
24301 ;
24302 return 0;
24303}
24304_ACEOF
24305rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024306if { (ac_try="$ac_compile"
24307case "(($ac_try" in
24308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24309 *) ac_try_echo=$ac_try;;
24310esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024314 grep -v '^ *+' conftest.er1 >conftest.err
24315 rm -f conftest.er1
24316 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024318 (exit $ac_status); } && {
24319 test -z "$ac_c_werror_flag" ||
24320 test ! -s conftest.err
24321 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024322
24323
24324cat >>confdefs.h <<\_ACEOF
24325#define HAVE_UCS4_TCL 1
24326_ACEOF
24327
24328 have_ucs4_tcl=yes
24329
24330else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024331 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024332sed 's/^/| /' conftest.$ac_ext >&5
24333
Martin v. Löwiseba40652007-08-30 20:10:57 +000024334
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024336
24337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024338{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24339echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024340
Skip Montanaro6dead952003-09-25 14:50:04 +000024341# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024342if test "$wchar_h" = yes
24343then
24344 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024345 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24346echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024347 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024348 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024349else
24350
24351 if test "$cross_compiling" = yes; then
24352 ac_cv_wchar_t_signed=yes
24353else
24354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024355/* confdefs.h. */
24356_ACEOF
24357cat confdefs.h >>conftest.$ac_ext
24358cat >>conftest.$ac_ext <<_ACEOF
24359/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024360
24361 #include <wchar.h>
24362 int main()
24363 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000024364 /* Success: exit code 0 */
24365 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024366 }
24367
24368_ACEOF
24369rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370if { (ac_try="$ac_link"
24371case "(($ac_try" in
24372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24373 *) ac_try_echo=$ac_try;;
24374esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024376 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024377 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024379 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024380 { (case "(($ac_try" in
24381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24382 *) ac_try_echo=$ac_try;;
24383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024385 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024386 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024388 (exit $ac_status); }; }; then
24389 ac_cv_wchar_t_signed=yes
24390else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024391 echo "$as_me: program exited with status $ac_status" >&5
24392echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024393sed 's/^/| /' conftest.$ac_ext >&5
24394
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024395( exit $ac_status )
24396ac_cv_wchar_t_signed=no
24397fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024398rm -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 +000024399fi
24400
Martin v. Löwiseba40652007-08-30 20:10:57 +000024401
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024402fi
24403
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024404 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24405echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024406fi
24407
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024408{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
24409echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000024410# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024411if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000024412 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024413else
24414 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000024415fi
24416
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024417
24418if test $enable_unicode = yes
24419then
Martin v. Löwisfd917792001-06-27 20:22:04 +000024420 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024421 case "$have_ucs4_tcl" in
24422 yes) enable_unicode="ucs4"
24423 ;;
24424 *) enable_unicode="ucs2"
24425 ;;
24426 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024427fi
24428
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024429
24430
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024431case "$enable_unicode" in
24432ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000024433 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024434#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000024435_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024436
24437 ;;
24438ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000024439 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024440#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024441_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024442
24443 ;;
24444esac
24445
Michael W. Hudson54241132001-12-07 15:38:26 +000024446
Martin v. Löwis11437992002-04-12 09:54:03 +000024447
24448
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024449
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024450if test "$enable_unicode" = "no"
24451then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024452 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024453 { echo "$as_me:$LINENO: result: not used" >&5
24454echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024455else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000024456 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000024457
24458cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024459#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024460_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024461
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024462
24463 # wchar_t is only usable if it maps to an unsigned type
24464 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024465 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024466 then
24467 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024468
Martin v. Löwis11437992002-04-12 09:54:03 +000024469cat >>confdefs.h <<\_ACEOF
24470#define HAVE_USABLE_WCHAR_T 1
24471_ACEOF
24472
24473 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024474#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024475_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024476
24477 elif test "$ac_cv_sizeof_short" = "$unicode_size"
24478 then
24479 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000024480 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024481#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024482_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024483
24484 elif test "$ac_cv_sizeof_long" = "$unicode_size"
24485 then
24486 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000024487 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024488#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024489_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024490
24491 else
24492 PY_UNICODE_TYPE="no type found"
24493 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024494 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24495echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024496fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000024497
24498# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024499{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24500echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024501if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024502 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024504 # See if sys/param.h defines the BYTE_ORDER macro.
24505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024506/* confdefs.h. */
24507_ACEOF
24508cat confdefs.h >>conftest.$ac_ext
24509cat >>conftest.$ac_ext <<_ACEOF
24510/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024511#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024512#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024513
Martin v. Löwis11437992002-04-12 09:54:03 +000024514int
24515main ()
24516{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024517#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
24518 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
24519 bogus endian macros
24520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024521
24522 ;
24523 return 0;
24524}
24525_ACEOF
24526rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024527if { (ac_try="$ac_compile"
24528case "(($ac_try" in
24529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24530 *) ac_try_echo=$ac_try;;
24531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024535 grep -v '^ *+' conftest.er1 >conftest.err
24536 rm -f conftest.er1
24537 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024539 (exit $ac_status); } && {
24540 test -z "$ac_c_werror_flag" ||
24541 test ! -s conftest.err
24542 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024543 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024545/* confdefs.h. */
24546_ACEOF
24547cat confdefs.h >>conftest.$ac_ext
24548cat >>conftest.$ac_ext <<_ACEOF
24549/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024550#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024551#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024552
Martin v. Löwis11437992002-04-12 09:54:03 +000024553int
24554main ()
24555{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024556#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024557 not big endian
24558#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024559
24560 ;
24561 return 0;
24562}
24563_ACEOF
24564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024565if { (ac_try="$ac_compile"
24566case "(($ac_try" in
24567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24568 *) ac_try_echo=$ac_try;;
24569esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024573 grep -v '^ *+' conftest.er1 >conftest.err
24574 rm -f conftest.er1
24575 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024577 (exit $ac_status); } && {
24578 test -z "$ac_c_werror_flag" ||
24579 test ! -s conftest.err
24580 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024581 ac_cv_c_bigendian=yes
24582else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024584sed 's/^/| /' conftest.$ac_ext >&5
24585
Martin v. Löwiseba40652007-08-30 20:10:57 +000024586 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024588
24589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024590else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024592sed 's/^/| /' conftest.$ac_ext >&5
24593
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024594 # It does not; compile a test program.
24595if test "$cross_compiling" = yes; then
24596 # try to guess the endianness by grepping values into an object file
24597 ac_cv_c_bigendian=unknown
24598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024599/* confdefs.h. */
24600_ACEOF
24601cat confdefs.h >>conftest.$ac_ext
24602cat >>conftest.$ac_ext <<_ACEOF
24603/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024604short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24605short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24606void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
24607short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24608short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24609void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024610int
24611main ()
24612{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024613 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024614 ;
24615 return 0;
24616}
24617_ACEOF
24618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024619if { (ac_try="$ac_compile"
24620case "(($ac_try" in
24621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24622 *) ac_try_echo=$ac_try;;
24623esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024625 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024627 grep -v '^ *+' conftest.er1 >conftest.err
24628 rm -f conftest.er1
24629 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024631 (exit $ac_status); } && {
24632 test -z "$ac_c_werror_flag" ||
24633 test ! -s conftest.err
24634 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024635 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024636 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024637fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024638if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24639 if test "$ac_cv_c_bigendian" = unknown; then
24640 ac_cv_c_bigendian=no
24641 else
24642 # finding both strings is unlikely to happen, but who knows?
24643 ac_cv_c_bigendian=unknown
24644 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024645fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024646else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024647 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024648sed 's/^/| /' conftest.$ac_ext >&5
24649
Martin v. Löwiseba40652007-08-30 20:10:57 +000024650
Martin v. Löwis11437992002-04-12 09:54:03 +000024651fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024652
24653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024654else
24655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024656/* confdefs.h. */
24657_ACEOF
24658cat confdefs.h >>conftest.$ac_ext
24659cat >>conftest.$ac_ext <<_ACEOF
24660/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000024661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024662int
24663main ()
24664{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024665
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024666 /* Are we little or big endian? From Harbison&Steele. */
24667 union
24668 {
24669 long int l;
24670 char c[sizeof (long int)];
24671 } u;
24672 u.l = 1;
24673 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024674
24675 ;
24676 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024677}
Martin v. Löwis11437992002-04-12 09:54:03 +000024678_ACEOF
24679rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024680if { (ac_try="$ac_link"
24681case "(($ac_try" in
24682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24683 *) ac_try_echo=$ac_try;;
24684esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024686 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024687 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024689 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024690 { (case "(($ac_try" in
24691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24692 *) ac_try_echo=$ac_try;;
24693esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024695 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024696 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024698 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024699 ac_cv_c_bigendian=no
24700else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024701 echo "$as_me: program exited with status $ac_status" >&5
24702echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024703sed 's/^/| /' conftest.$ac_ext >&5
24704
Martin v. Löwis11437992002-04-12 09:54:03 +000024705( exit $ac_status )
24706ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024707fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024708rm -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 +000024709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024710
24711
Martin v. Löwis11437992002-04-12 09:54:03 +000024712fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024713
24714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24715fi
24716{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24717echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
24718case $ac_cv_c_bigendian in
24719 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024720
24721cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024722#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000024723_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024724 ;;
24725 no)
24726 ;;
24727 *)
24728 { { echo "$as_me:$LINENO: error: unknown endianness
24729presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24730echo "$as_me: error: unknown endianness
24731presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024732 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024733esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024734
Michael W. Hudson54241132001-12-07 15:38:26 +000024735
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024736# Check whether right shifting a negative integer extends the sign bit
24737# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024738{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24739echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024740if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024741 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024742else
Martin v. Löwis11437992002-04-12 09:54:03 +000024743
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024744if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024745 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024746else
Martin v. Löwis11437992002-04-12 09:54:03 +000024747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024748/* confdefs.h. */
24749_ACEOF
24750cat confdefs.h >>conftest.$ac_ext
24751cat >>conftest.$ac_ext <<_ACEOF
24752/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024753
24754int main()
24755{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024756 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024757}
24758
Martin v. Löwis11437992002-04-12 09:54:03 +000024759_ACEOF
24760rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024761if { (ac_try="$ac_link"
24762case "(($ac_try" in
24763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24764 *) ac_try_echo=$ac_try;;
24765esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024767 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024768 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024770 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024771 { (case "(($ac_try" in
24772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24773 *) ac_try_echo=$ac_try;;
24774esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024776 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024777 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024779 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024780 ac_cv_rshift_extends_sign=yes
24781else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024782 echo "$as_me: program exited with status $ac_status" >&5
24783echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024784sed 's/^/| /' conftest.$ac_ext >&5
24785
Martin v. Löwis11437992002-04-12 09:54:03 +000024786( exit $ac_status )
24787ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024788fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024789rm -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 +000024790fi
24791
Martin v. Löwiseba40652007-08-30 20:10:57 +000024792
24793fi
24794
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024795{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24796echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024797if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024798then
Martin v. Löwis11437992002-04-12 09:54:03 +000024799
24800cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024801#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024802_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024803
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024804fi
24805
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024806# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024807{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24808echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024809if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024810 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024811else
Martin v. Löwis11437992002-04-12 09:54:03 +000024812
24813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024814/* confdefs.h. */
24815_ACEOF
24816cat confdefs.h >>conftest.$ac_ext
24817cat >>conftest.$ac_ext <<_ACEOF
24818/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024819#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024820int
24821main ()
24822{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024823
24824 FILE *f = fopen("/dev/null", "r");
24825 flockfile(f);
24826 getc_unlocked(f);
24827 funlockfile(f);
24828
Martin v. Löwis11437992002-04-12 09:54:03 +000024829 ;
24830 return 0;
24831}
24832_ACEOF
24833rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024834if { (ac_try="$ac_link"
24835case "(($ac_try" in
24836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24837 *) ac_try_echo=$ac_try;;
24838esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024840 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024842 grep -v '^ *+' conftest.er1 >conftest.err
24843 rm -f conftest.er1
24844 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024846 (exit $ac_status); } && {
24847 test -z "$ac_c_werror_flag" ||
24848 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024849 } && test -s conftest$ac_exeext &&
24850 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024851 ac_cv_have_getc_unlocked=yes
24852else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024853 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024854sed 's/^/| /' conftest.$ac_ext >&5
24855
Martin v. Löwiseba40652007-08-30 20:10:57 +000024856 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024857fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024858
24859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024860 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024861fi
24862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024863{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24864echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024865if test "$ac_cv_have_getc_unlocked" = yes
24866then
Martin v. Löwis11437992002-04-12 09:54:03 +000024867
24868cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024869#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024870_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024871
24872fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024873
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024874# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024875# save the value of LIBS so we don't actually link Python with readline
24876LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024877
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024878# On some systems we need to link readline to a termcap compatible
24879# library. NOTE: Keep the precedence of listed libraries synchronised
24880# with setup.py.
24881py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024882{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
24883echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024884for py_libtermcap in "" ncursesw ncurses curses termcap; do
24885 if test -z "$py_libtermcap"; then
24886 READLINE_LIBS="-lreadline"
24887 else
24888 READLINE_LIBS="-lreadline -l$py_libtermcap"
24889 fi
24890 LIBS="$READLINE_LIBS $LIBS_no_readline"
24891 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024892/* confdefs.h. */
24893_ACEOF
24894cat confdefs.h >>conftest.$ac_ext
24895cat >>conftest.$ac_ext <<_ACEOF
24896/* end confdefs.h. */
24897
Martin v. Löwiseba40652007-08-30 20:10:57 +000024898/* Override any GCC internal prototype to avoid an error.
24899 Use char because int might match the return type of a GCC
24900 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024901#ifdef __cplusplus
24902extern "C"
24903#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024904char readline ();
24905int
24906main ()
24907{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024908return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024909 ;
24910 return 0;
24911}
24912_ACEOF
24913rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024914if { (ac_try="$ac_link"
24915case "(($ac_try" in
24916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24917 *) ac_try_echo=$ac_try;;
24918esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024921 ac_status=$?
24922 grep -v '^ *+' conftest.er1 >conftest.err
24923 rm -f conftest.er1
24924 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024926 (exit $ac_status); } && {
24927 test -z "$ac_c_werror_flag" ||
24928 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024929 } && test -s conftest$ac_exeext &&
24930 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024931 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024932else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024933 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024934sed 's/^/| /' conftest.$ac_ext >&5
24935
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024936
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024937fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024938
24939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024940 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024941 if test $py_cv_lib_readline = yes; then
24942 break
24943 fi
24944done
24945# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24946#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000024947if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024948 { echo "$as_me:$LINENO: result: none" >&5
24949echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024950else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024951 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24952echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024953
24954cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024955#define HAVE_LIBREADLINE 1
24956_ACEOF
24957
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024958fi
24959
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024960# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024961{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24962echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024963if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024964 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024965else
24966 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024967LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024968cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024969/* confdefs.h. */
24970_ACEOF
24971cat confdefs.h >>conftest.$ac_ext
24972cat >>conftest.$ac_ext <<_ACEOF
24973/* end confdefs.h. */
24974
Martin v. Löwiseba40652007-08-30 20:10:57 +000024975/* Override any GCC internal prototype to avoid an error.
24976 Use char because int might match the return type of a GCC
24977 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024978#ifdef __cplusplus
24979extern "C"
24980#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024981char rl_callback_handler_install ();
24982int
24983main ()
24984{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024985return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024986 ;
24987 return 0;
24988}
24989_ACEOF
24990rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024991if { (ac_try="$ac_link"
24992case "(($ac_try" in
24993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24994 *) ac_try_echo=$ac_try;;
24995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024997 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024999 grep -v '^ *+' conftest.er1 >conftest.err
25000 rm -f conftest.er1
25001 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025003 (exit $ac_status); } && {
25004 test -z "$ac_c_werror_flag" ||
25005 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025006 } && test -s conftest$ac_exeext &&
25007 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025008 ac_cv_lib_readline_rl_callback_handler_install=yes
25009else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025010 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025011sed 's/^/| /' conftest.$ac_ext >&5
25012
Martin v. Löwiseba40652007-08-30 20:10:57 +000025013 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025014fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025015
25016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025017 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025018LIBS=$ac_check_lib_save_LIBS
25019fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025020{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25021echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25022if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025023
25024cat >>confdefs.h <<\_ACEOF
25025#define HAVE_RL_CALLBACK 1
25026_ACEOF
25027
25028fi
25029
25030
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025031# check for readline 2.2
25032cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025033/* confdefs.h. */
25034_ACEOF
25035cat confdefs.h >>conftest.$ac_ext
25036cat >>conftest.$ac_ext <<_ACEOF
25037/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025038#include <readline/readline.h>
25039_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025040if { (ac_try="$ac_cpp conftest.$ac_ext"
25041case "(($ac_try" in
25042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25043 *) ac_try_echo=$ac_try;;
25044esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025046 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025047 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025048 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025049 rm -f conftest.er1
25050 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025052 (exit $ac_status); } >/dev/null && {
25053 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25054 test ! -s conftest.err
25055 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025056 have_readline=yes
25057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025058 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025059sed 's/^/| /' conftest.$ac_ext >&5
25060
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025061 have_readline=no
25062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025063
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025064rm -f conftest.err conftest.$ac_ext
25065if test $have_readline = yes
25066then
25067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025068/* confdefs.h. */
25069_ACEOF
25070cat confdefs.h >>conftest.$ac_ext
25071cat >>conftest.$ac_ext <<_ACEOF
25072/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025073#include <readline/readline.h>
25074
25075_ACEOF
25076if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025077 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025078
25079cat >>confdefs.h <<\_ACEOF
25080#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25081_ACEOF
25082
25083fi
25084rm -f conftest*
25085
25086fi
25087
Martin v. Löwis0daad592001-09-30 21:09:59 +000025088# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025089{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25090echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025091if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025093else
Martin v. Löwis11437992002-04-12 09:54:03 +000025094 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025095LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025097/* confdefs.h. */
25098_ACEOF
25099cat confdefs.h >>conftest.$ac_ext
25100cat >>conftest.$ac_ext <<_ACEOF
25101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025102
Martin v. Löwiseba40652007-08-30 20:10:57 +000025103/* Override any GCC internal prototype to avoid an error.
25104 Use char because int might match the return type of a GCC
25105 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025106#ifdef __cplusplus
25107extern "C"
25108#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025109char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025110int
25111main ()
25112{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025113return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025114 ;
25115 return 0;
25116}
25117_ACEOF
25118rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025119if { (ac_try="$ac_link"
25120case "(($ac_try" in
25121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25122 *) ac_try_echo=$ac_try;;
25123esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025125 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025127 grep -v '^ *+' conftest.er1 >conftest.err
25128 rm -f conftest.er1
25129 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025131 (exit $ac_status); } && {
25132 test -z "$ac_c_werror_flag" ||
25133 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025134 } && test -s conftest$ac_exeext &&
25135 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025136 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025137else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025139sed 's/^/| /' conftest.$ac_ext >&5
25140
Martin v. Löwiseba40652007-08-30 20:10:57 +000025141 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025142fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025143
25144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025145 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025146LIBS=$ac_check_lib_save_LIBS
25147fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025148{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25149echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25150if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025151
Martin v. Löwis11437992002-04-12 09:54:03 +000025152cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025153#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025154_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025155
Martin v. Löwis0daad592001-09-30 21:09:59 +000025156fi
25157
Michael W. Hudson54241132001-12-07 15:38:26 +000025158
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025159# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025160{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25161echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025162if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025163 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025164else
25165 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025166LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025167cat >conftest.$ac_ext <<_ACEOF
25168/* confdefs.h. */
25169_ACEOF
25170cat confdefs.h >>conftest.$ac_ext
25171cat >>conftest.$ac_ext <<_ACEOF
25172/* end confdefs.h. */
25173
25174/* Override any GCC internal prototype to avoid an error.
25175 Use char because int might match the return type of a GCC
25176 builtin and then its argument prototype would still apply. */
25177#ifdef __cplusplus
25178extern "C"
25179#endif
25180char rl_completion_display_matches_hook ();
25181int
25182main ()
25183{
25184return rl_completion_display_matches_hook ();
25185 ;
25186 return 0;
25187}
25188_ACEOF
25189rm -f conftest.$ac_objext conftest$ac_exeext
25190if { (ac_try="$ac_link"
25191case "(($ac_try" in
25192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25193 *) ac_try_echo=$ac_try;;
25194esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025196 (eval "$ac_link") 2>conftest.er1
25197 ac_status=$?
25198 grep -v '^ *+' conftest.er1 >conftest.err
25199 rm -f conftest.er1
25200 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025202 (exit $ac_status); } && {
25203 test -z "$ac_c_werror_flag" ||
25204 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025205 } && test -s conftest$ac_exeext &&
25206 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025207 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25208else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025209 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025210sed 's/^/| /' conftest.$ac_ext >&5
25211
25212 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25213fi
25214
25215rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25216 conftest$ac_exeext conftest.$ac_ext
25217LIBS=$ac_check_lib_save_LIBS
25218fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025219{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25220echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25221if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000025222
25223cat >>confdefs.h <<\_ACEOF
25224#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25225_ACEOF
25226
25227fi
25228
25229
Martin v. Löwis0daad592001-09-30 21:09:59 +000025230# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025231{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25232echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025233if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025234 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025235else
Martin v. Löwis11437992002-04-12 09:54:03 +000025236 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000025237LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025238cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025239/* confdefs.h. */
25240_ACEOF
25241cat confdefs.h >>conftest.$ac_ext
25242cat >>conftest.$ac_ext <<_ACEOF
25243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025244
Martin v. Löwiseba40652007-08-30 20:10:57 +000025245/* Override any GCC internal prototype to avoid an error.
25246 Use char because int might match the return type of a GCC
25247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025248#ifdef __cplusplus
25249extern "C"
25250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025251char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025252int
25253main ()
25254{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025255return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025256 ;
25257 return 0;
25258}
25259_ACEOF
25260rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025261if { (ac_try="$ac_link"
25262case "(($ac_try" in
25263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25264 *) ac_try_echo=$ac_try;;
25265esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025267 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025269 grep -v '^ *+' conftest.er1 >conftest.err
25270 rm -f conftest.er1
25271 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025273 (exit $ac_status); } && {
25274 test -z "$ac_c_werror_flag" ||
25275 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025276 } && test -s conftest$ac_exeext &&
25277 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025278 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025279else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025281sed 's/^/| /' conftest.$ac_ext >&5
25282
Martin v. Löwiseba40652007-08-30 20:10:57 +000025283 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025284fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025285
25286rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025287 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025288LIBS=$ac_check_lib_save_LIBS
25289fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025290{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25291echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
25292if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025293
Martin v. Löwis11437992002-04-12 09:54:03 +000025294cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025295#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025296_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025297
Guido van Rossum353ae582001-07-10 16:45:32 +000025298fi
25299
Jack Jansendd19cf82001-12-06 22:36:17 +000025300
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025301# also in readline 4.2
25302cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025303/* confdefs.h. */
25304_ACEOF
25305cat confdefs.h >>conftest.$ac_ext
25306cat >>conftest.$ac_ext <<_ACEOF
25307/* end confdefs.h. */
25308#include <readline/readline.h>
25309_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000025310if { (ac_try="$ac_cpp conftest.$ac_ext"
25311case "(($ac_try" in
25312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25313 *) ac_try_echo=$ac_try;;
25314esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025316 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025317 ac_status=$?
25318 grep -v '^ *+' conftest.er1 >conftest.err
25319 rm -f conftest.er1
25320 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025322 (exit $ac_status); } >/dev/null && {
25323 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25324 test ! -s conftest.err
25325 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025326 have_readline=yes
25327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025328 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025329sed 's/^/| /' conftest.$ac_ext >&5
25330
25331 have_readline=no
25332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025333
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025334rm -f conftest.err conftest.$ac_ext
25335if test $have_readline = yes
25336then
25337 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025338/* confdefs.h. */
25339_ACEOF
25340cat confdefs.h >>conftest.$ac_ext
25341cat >>conftest.$ac_ext <<_ACEOF
25342/* end confdefs.h. */
25343#include <readline/readline.h>
25344
25345_ACEOF
25346if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25347 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25348
25349cat >>confdefs.h <<\_ACEOF
25350#define HAVE_RL_CATCH_SIGNAL 1
25351_ACEOF
25352
25353fi
25354rm -f conftest*
25355
25356fi
25357
Martin v. Löwis82bca632006-02-10 20:49:30 +000025358# End of readline checks: restore LIBS
25359LIBS=$LIBS_no_readline
25360
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025361{ echo "$as_me:$LINENO: checking for broken nice()" >&5
25362echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025363if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025364 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025365else
Martin v. Löwis11437992002-04-12 09:54:03 +000025366
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025367if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025368 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025369else
Martin v. Löwis11437992002-04-12 09:54:03 +000025370 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025371/* confdefs.h. */
25372_ACEOF
25373cat confdefs.h >>conftest.$ac_ext
25374cat >>conftest.$ac_ext <<_ACEOF
25375/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025376
25377int main()
25378{
25379 int val1 = nice(1);
25380 if (val1 != -1 && val1 == nice(2))
25381 exit(0);
25382 exit(1);
25383}
25384
Martin v. Löwis11437992002-04-12 09:54:03 +000025385_ACEOF
25386rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025387if { (ac_try="$ac_link"
25388case "(($ac_try" in
25389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25390 *) ac_try_echo=$ac_try;;
25391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025393 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025394 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025397 { (case "(($ac_try" in
25398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25399 *) ac_try_echo=$ac_try;;
25400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025402 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025403 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025405 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025406 ac_cv_broken_nice=yes
25407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025408 echo "$as_me: program exited with status $ac_status" >&5
25409echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025410sed 's/^/| /' conftest.$ac_ext >&5
25411
Martin v. Löwis11437992002-04-12 09:54:03 +000025412( exit $ac_status )
25413ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025414fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025415rm -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 +000025416fi
25417
Martin v. Löwiseba40652007-08-30 20:10:57 +000025418
25419fi
25420
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025421{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25422echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025423if test "$ac_cv_broken_nice" = yes
25424then
Martin v. Löwis11437992002-04-12 09:54:03 +000025425
25426cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025427#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025428_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025429
25430fi
25431
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025432{ echo "$as_me:$LINENO: checking for broken poll()" >&5
25433echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025434if test "${ac_cv_broken_poll+set}" = set; then
25435 echo $ECHO_N "(cached) $ECHO_C" >&6
25436else
25437 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025438 ac_cv_broken_poll=no
25439else
25440 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025441/* confdefs.h. */
25442_ACEOF
25443cat confdefs.h >>conftest.$ac_ext
25444cat >>conftest.$ac_ext <<_ACEOF
25445/* end confdefs.h. */
25446
25447#include <poll.h>
25448
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025449int main()
25450{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025451 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025452 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025453
25454 close (42);
25455
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025456 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025457 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025458 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025459 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025460 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025461 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025462 return 1;
25463}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025464
25465_ACEOF
25466rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025467if { (ac_try="$ac_link"
25468case "(($ac_try" in
25469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25470 *) ac_try_echo=$ac_try;;
25471esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025473 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025474 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025476 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025477 { (case "(($ac_try" in
25478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25479 *) ac_try_echo=$ac_try;;
25480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025482 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025483 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025485 (exit $ac_status); }; }; then
25486 ac_cv_broken_poll=yes
25487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025488 echo "$as_me: program exited with status $ac_status" >&5
25489echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025490sed 's/^/| /' conftest.$ac_ext >&5
25491
25492( exit $ac_status )
25493ac_cv_broken_poll=no
25494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025495rm -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 +000025496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025497
25498
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000025499fi
25500
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025501{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25502echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025503if test "$ac_cv_broken_poll" = yes
25504then
25505
25506cat >>confdefs.h <<\_ACEOF
25507#define HAVE_BROKEN_POLL 1
25508_ACEOF
25509
25510fi
25511
Brett Cannon43802422005-02-10 20:48:03 +000025512# 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 +000025513# (which is not required by ISO C or UNIX spec) and/or if we support
25514# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025515{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25516echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025517if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025518 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025519else
25520 cat >conftest.$ac_ext <<_ACEOF
25521/* confdefs.h. */
25522_ACEOF
25523cat confdefs.h >>conftest.$ac_ext
25524cat >>conftest.$ac_ext <<_ACEOF
25525/* end confdefs.h. */
25526#include <sys/types.h>
25527#include <$ac_cv_struct_tm>
25528
25529
25530int
25531main ()
25532{
25533static struct tm ac_aggr;
25534if (ac_aggr.tm_zone)
25535return 0;
25536 ;
25537 return 0;
25538}
25539_ACEOF
25540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025541if { (ac_try="$ac_compile"
25542case "(($ac_try" in
25543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25544 *) ac_try_echo=$ac_try;;
25545esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025547 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025548 ac_status=$?
25549 grep -v '^ *+' conftest.er1 >conftest.err
25550 rm -f conftest.er1
25551 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025553 (exit $ac_status); } && {
25554 test -z "$ac_c_werror_flag" ||
25555 test ! -s conftest.err
25556 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025557 ac_cv_member_struct_tm_tm_zone=yes
25558else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025559 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025560sed 's/^/| /' conftest.$ac_ext >&5
25561
Martin v. Löwiseba40652007-08-30 20:10:57 +000025562 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025563/* confdefs.h. */
25564_ACEOF
25565cat confdefs.h >>conftest.$ac_ext
25566cat >>conftest.$ac_ext <<_ACEOF
25567/* end confdefs.h. */
25568#include <sys/types.h>
25569#include <$ac_cv_struct_tm>
25570
25571
25572int
25573main ()
25574{
25575static struct tm ac_aggr;
25576if (sizeof ac_aggr.tm_zone)
25577return 0;
25578 ;
25579 return 0;
25580}
25581_ACEOF
25582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025583if { (ac_try="$ac_compile"
25584case "(($ac_try" in
25585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25586 *) ac_try_echo=$ac_try;;
25587esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025589 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025590 ac_status=$?
25591 grep -v '^ *+' conftest.er1 >conftest.err
25592 rm -f conftest.er1
25593 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025595 (exit $ac_status); } && {
25596 test -z "$ac_c_werror_flag" ||
25597 test ! -s conftest.err
25598 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025599 ac_cv_member_struct_tm_tm_zone=yes
25600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025601 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025602sed 's/^/| /' conftest.$ac_ext >&5
25603
Martin v. Löwiseba40652007-08-30 20:10:57 +000025604 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025605fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025606
25607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025608fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609
25610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025611fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025612{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25613echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
25614if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025615
25616cat >>confdefs.h <<_ACEOF
25617#define HAVE_STRUCT_TM_TM_ZONE 1
25618_ACEOF
25619
25620
25621fi
25622
25623if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25624
25625cat >>confdefs.h <<\_ACEOF
25626#define HAVE_TM_ZONE 1
25627_ACEOF
25628
25629else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025630 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25631echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025632if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025633 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025634else
25635 cat >conftest.$ac_ext <<_ACEOF
25636/* confdefs.h. */
25637_ACEOF
25638cat confdefs.h >>conftest.$ac_ext
25639cat >>conftest.$ac_ext <<_ACEOF
25640/* end confdefs.h. */
25641#include <time.h>
25642
25643int
25644main ()
25645{
25646#ifndef tzname
25647 (void) tzname;
25648#endif
25649
25650 ;
25651 return 0;
25652}
25653_ACEOF
25654rm -f conftest.$ac_objext
25655if { (ac_try="$ac_compile"
25656case "(($ac_try" in
25657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25658 *) ac_try_echo=$ac_try;;
25659esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025661 (eval "$ac_compile") 2>conftest.er1
25662 ac_status=$?
25663 grep -v '^ *+' conftest.er1 >conftest.err
25664 rm -f conftest.er1
25665 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025667 (exit $ac_status); } && {
25668 test -z "$ac_c_werror_flag" ||
25669 test ! -s conftest.err
25670 } && test -s conftest.$ac_objext; then
25671 ac_cv_have_decl_tzname=yes
25672else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025673 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025674sed 's/^/| /' conftest.$ac_ext >&5
25675
25676 ac_cv_have_decl_tzname=no
25677fi
25678
25679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25680fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025681{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25682echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
25683if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025684
25685cat >>confdefs.h <<_ACEOF
25686#define HAVE_DECL_TZNAME 1
25687_ACEOF
25688
25689
25690else
25691 cat >>confdefs.h <<_ACEOF
25692#define HAVE_DECL_TZNAME 0
25693_ACEOF
25694
25695
25696fi
25697
25698
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025699 { echo "$as_me:$LINENO: checking for tzname" >&5
25700echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025701if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025702 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000025703else
25704 cat >conftest.$ac_ext <<_ACEOF
25705/* confdefs.h. */
25706_ACEOF
25707cat confdefs.h >>conftest.$ac_ext
25708cat >>conftest.$ac_ext <<_ACEOF
25709/* end confdefs.h. */
25710#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000025711#if !HAVE_DECL_TZNAME
25712extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025713#endif
25714
25715int
25716main ()
25717{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025718return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025719 ;
25720 return 0;
25721}
25722_ACEOF
25723rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025724if { (ac_try="$ac_link"
25725case "(($ac_try" in
25726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25727 *) ac_try_echo=$ac_try;;
25728esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025730 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025731 ac_status=$?
25732 grep -v '^ *+' conftest.er1 >conftest.err
25733 rm -f conftest.er1
25734 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025736 (exit $ac_status); } && {
25737 test -z "$ac_c_werror_flag" ||
25738 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025739 } && test -s conftest$ac_exeext &&
25740 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000025741 ac_cv_var_tzname=yes
25742else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025743 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025744sed 's/^/| /' conftest.$ac_ext >&5
25745
Martin v. Löwiseba40652007-08-30 20:10:57 +000025746 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025747fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025748
25749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025750 conftest$ac_exeext conftest.$ac_ext
25751fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025752{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25753echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025754 if test $ac_cv_var_tzname = yes; then
25755
25756cat >>confdefs.h <<\_ACEOF
25757#define HAVE_TZNAME 1
25758_ACEOF
25759
25760 fi
25761fi
25762
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025763
Martin v. Löwis1d459062005-03-14 21:23:33 +000025764# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025765{ echo "$as_me:$LINENO: checking for working tzset()" >&5
25766echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025767if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025769else
25770
25771if test "$cross_compiling" = yes; then
25772 ac_cv_working_tzset=no
25773else
25774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025775/* confdefs.h. */
25776_ACEOF
25777cat confdefs.h >>conftest.$ac_ext
25778cat >>conftest.$ac_ext <<_ACEOF
25779/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025780
25781#include <stdlib.h>
25782#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025783#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025784
25785#if HAVE_TZNAME
25786extern char *tzname[];
25787#endif
25788
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025789int main()
25790{
Brett Cannon18367812003-09-19 00:59:16 +000025791 /* Note that we need to ensure that not only does tzset(3)
25792 do 'something' with localtime, but it works as documented
25793 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025794 This includes making sure that tzname is set properly if
25795 tm->tm_zone does not exist since it is the alternative way
25796 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025797
25798 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025799 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025800 */
25801
Martin v. Löwis1d459062005-03-14 21:23:33 +000025802 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025803 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25804
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025805 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025806 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025807 if (localtime(&groundhogday)->tm_hour != 0)
25808 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025809#if HAVE_TZNAME
25810 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25811 if (strcmp(tzname[0], "UTC") ||
25812 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25813 exit(1);
25814#endif
Brett Cannon18367812003-09-19 00:59:16 +000025815
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025816 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025817 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025818 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025819 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025820#if HAVE_TZNAME
25821 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25822 exit(1);
25823#endif
Brett Cannon18367812003-09-19 00:59:16 +000025824
25825 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25826 tzset();
25827 if (localtime(&groundhogday)->tm_hour != 11)
25828 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025829#if HAVE_TZNAME
25830 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25831 exit(1);
25832#endif
25833
25834#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025835 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25836 exit(1);
25837 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25838 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025839#endif
Brett Cannon18367812003-09-19 00:59:16 +000025840
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025841 exit(0);
25842}
25843
25844_ACEOF
25845rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025846if { (ac_try="$ac_link"
25847case "(($ac_try" in
25848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25849 *) ac_try_echo=$ac_try;;
25850esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025852 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025853 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025856 { (case "(($ac_try" in
25857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25858 *) ac_try_echo=$ac_try;;
25859esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025861 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025862 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025864 (exit $ac_status); }; }; then
25865 ac_cv_working_tzset=yes
25866else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025867 echo "$as_me: program exited with status $ac_status" >&5
25868echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025869sed 's/^/| /' conftest.$ac_ext >&5
25870
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025871( exit $ac_status )
25872ac_cv_working_tzset=no
25873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025874rm -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 +000025875fi
25876
Martin v. Löwiseba40652007-08-30 20:10:57 +000025877
25878fi
25879
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025880{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25881echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025882if test "$ac_cv_working_tzset" = yes
25883then
25884
25885cat >>confdefs.h <<\_ACEOF
25886#define HAVE_WORKING_TZSET 1
25887_ACEOF
25888
25889fi
25890
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025891# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025892{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25893echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025894if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025895 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025896else
25897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025898/* confdefs.h. */
25899_ACEOF
25900cat confdefs.h >>conftest.$ac_ext
25901cat >>conftest.$ac_ext <<_ACEOF
25902/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025903#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025904int
25905main ()
25906{
25907
25908struct stat st;
25909st.st_mtim.tv_nsec = 1;
25910
25911 ;
25912 return 0;
25913}
25914_ACEOF
25915rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025916if { (ac_try="$ac_compile"
25917case "(($ac_try" in
25918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25919 *) ac_try_echo=$ac_try;;
25920esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025922 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025924 grep -v '^ *+' conftest.er1 >conftest.err
25925 rm -f conftest.er1
25926 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025928 (exit $ac_status); } && {
25929 test -z "$ac_c_werror_flag" ||
25930 test ! -s conftest.err
25931 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025932 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025933else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025935sed 's/^/| /' conftest.$ac_ext >&5
25936
Martin v. Löwiseba40652007-08-30 20:10:57 +000025937 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025938fi
25939
Martin v. Löwiseba40652007-08-30 20:10:57 +000025940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25941fi
25942
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025943{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25944echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025945if test "$ac_cv_stat_tv_nsec" = yes
25946then
25947
25948cat >>confdefs.h <<\_ACEOF
25949#define HAVE_STAT_TV_NSEC 1
25950_ACEOF
25951
25952fi
25953
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025954# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025955{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25956echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025957if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025958 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025959else
25960 cat >conftest.$ac_ext <<_ACEOF
25961/* confdefs.h. */
25962_ACEOF
25963cat confdefs.h >>conftest.$ac_ext
25964cat >>conftest.$ac_ext <<_ACEOF
25965/* end confdefs.h. */
25966#include <sys/stat.h>
25967int
25968main ()
25969{
25970
25971struct stat st;
25972st.st_mtimespec.tv_nsec = 1;
25973
25974 ;
25975 return 0;
25976}
25977_ACEOF
25978rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025979if { (ac_try="$ac_compile"
25980case "(($ac_try" in
25981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25982 *) ac_try_echo=$ac_try;;
25983esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025986 ac_status=$?
25987 grep -v '^ *+' conftest.er1 >conftest.err
25988 rm -f conftest.er1
25989 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025991 (exit $ac_status); } && {
25992 test -z "$ac_c_werror_flag" ||
25993 test ! -s conftest.err
25994 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025995 ac_cv_stat_tv_nsec2=yes
25996else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025997 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025998sed 's/^/| /' conftest.$ac_ext >&5
25999
Martin v. Löwiseba40652007-08-30 20:10:57 +000026000 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026001fi
26002
Martin v. Löwiseba40652007-08-30 20:10:57 +000026003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26004fi
26005
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026006{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26007echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026008if test "$ac_cv_stat_tv_nsec2" = yes
26009then
26010
26011cat >>confdefs.h <<\_ACEOF
26012#define HAVE_STAT_TV_NSEC2 1
26013_ACEOF
26014
26015fi
26016
Jack Jansen666b1e72001-10-31 12:11:48 +000026017# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026018{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26019echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026020if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026021 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026022else
Martin v. Löwis11437992002-04-12 09:54:03 +000026023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026024/* confdefs.h. */
26025_ACEOF
26026cat confdefs.h >>conftest.$ac_ext
26027cat >>conftest.$ac_ext <<_ACEOF
26028/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026029#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026030int
26031main ()
26032{
Jack Jansen666b1e72001-10-31 12:11:48 +000026033
26034 int rtn;
26035 rtn = mvwdelch(0,0,0);
26036
Martin v. Löwis11437992002-04-12 09:54:03 +000026037 ;
26038 return 0;
26039}
26040_ACEOF
26041rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026042if { (ac_try="$ac_compile"
26043case "(($ac_try" in
26044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26045 *) ac_try_echo=$ac_try;;
26046esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026050 grep -v '^ *+' conftest.er1 >conftest.err
26051 rm -f conftest.er1
26052 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026054 (exit $ac_status); } && {
26055 test -z "$ac_c_werror_flag" ||
26056 test ! -s conftest.err
26057 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026058 ac_cv_mvwdelch_is_expression=yes
26059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026061sed 's/^/| /' conftest.$ac_ext >&5
26062
Martin v. Löwiseba40652007-08-30 20:10:57 +000026063 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026064fi
26065
Martin v. Löwiseba40652007-08-30 20:10:57 +000026066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26067fi
26068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026069{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26070echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026071
26072if test "$ac_cv_mvwdelch_is_expression" = yes
26073then
Martin v. Löwis11437992002-04-12 09:54:03 +000026074
26075cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026076#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026077_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026078
26079fi
26080
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026081{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26082echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026083if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026084 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026085else
Martin v. Löwis11437992002-04-12 09:54:03 +000026086 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026087/* confdefs.h. */
26088_ACEOF
26089cat confdefs.h >>conftest.$ac_ext
26090cat >>conftest.$ac_ext <<_ACEOF
26091/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026092#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026093int
26094main ()
26095{
Jack Jansen666b1e72001-10-31 12:11:48 +000026096
26097 WINDOW *w;
26098 w->_flags = 0;
26099
Martin v. Löwis11437992002-04-12 09:54:03 +000026100 ;
26101 return 0;
26102}
26103_ACEOF
26104rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026105if { (ac_try="$ac_compile"
26106case "(($ac_try" in
26107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26108 *) ac_try_echo=$ac_try;;
26109esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026111 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026113 grep -v '^ *+' conftest.er1 >conftest.err
26114 rm -f conftest.er1
26115 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026117 (exit $ac_status); } && {
26118 test -z "$ac_c_werror_flag" ||
26119 test ! -s conftest.err
26120 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026121 ac_cv_window_has_flags=yes
26122else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026124sed 's/^/| /' conftest.$ac_ext >&5
26125
Martin v. Löwiseba40652007-08-30 20:10:57 +000026126 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026127fi
26128
Martin v. Löwiseba40652007-08-30 20:10:57 +000026129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26130fi
26131
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026132{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26133echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026134
Jack Jansen666b1e72001-10-31 12:11:48 +000026135
26136if test "$ac_cv_window_has_flags" = yes
26137then
Martin v. Löwis11437992002-04-12 09:54:03 +000026138
26139cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026140#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026141_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026142
26143fi
26144
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026145{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
26146echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026147cat >conftest.$ac_ext <<_ACEOF
26148/* confdefs.h. */
26149_ACEOF
26150cat confdefs.h >>conftest.$ac_ext
26151cat >>conftest.$ac_ext <<_ACEOF
26152/* end confdefs.h. */
26153#include <curses.h>
26154int
26155main ()
26156{
26157void *x=is_term_resized
26158 ;
26159 return 0;
26160}
26161_ACEOF
26162rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026163if { (ac_try="$ac_compile"
26164case "(($ac_try" in
26165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26166 *) ac_try_echo=$ac_try;;
26167esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026169 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026170 ac_status=$?
26171 grep -v '^ *+' conftest.er1 >conftest.err
26172 rm -f conftest.er1
26173 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026175 (exit $ac_status); } && {
26176 test -z "$ac_c_werror_flag" ||
26177 test ! -s conftest.err
26178 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026179
26180cat >>confdefs.h <<\_ACEOF
26181#define HAVE_CURSES_IS_TERM_RESIZED 1
26182_ACEOF
26183
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026184 { echo "$as_me:$LINENO: result: yes" >&5
26185echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026187 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026188sed 's/^/| /' conftest.$ac_ext >&5
26189
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026190 { echo "$as_me:$LINENO: result: no" >&5
26191echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026192
26193fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026194
Martin v. Löwiseba40652007-08-30 20:10:57 +000026195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26196
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026197{ echo "$as_me:$LINENO: checking for resize_term" >&5
26198echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026199cat >conftest.$ac_ext <<_ACEOF
26200/* confdefs.h. */
26201_ACEOF
26202cat confdefs.h >>conftest.$ac_ext
26203cat >>conftest.$ac_ext <<_ACEOF
26204/* end confdefs.h. */
26205#include <curses.h>
26206int
26207main ()
26208{
26209void *x=resize_term
26210 ;
26211 return 0;
26212}
26213_ACEOF
26214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026215if { (ac_try="$ac_compile"
26216case "(($ac_try" in
26217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26218 *) ac_try_echo=$ac_try;;
26219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026221 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026222 ac_status=$?
26223 grep -v '^ *+' conftest.er1 >conftest.err
26224 rm -f conftest.er1
26225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026227 (exit $ac_status); } && {
26228 test -z "$ac_c_werror_flag" ||
26229 test ! -s conftest.err
26230 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026231
26232cat >>confdefs.h <<\_ACEOF
26233#define HAVE_CURSES_RESIZE_TERM 1
26234_ACEOF
26235
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026236 { echo "$as_me:$LINENO: result: yes" >&5
26237echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026239 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026240sed 's/^/| /' conftest.$ac_ext >&5
26241
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026242 { echo "$as_me:$LINENO: result: no" >&5
26243echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026244
26245fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026246
Martin v. Löwiseba40652007-08-30 20:10:57 +000026247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26248
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026249{ echo "$as_me:$LINENO: checking for resizeterm" >&5
26250echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026251cat >conftest.$ac_ext <<_ACEOF
26252/* confdefs.h. */
26253_ACEOF
26254cat confdefs.h >>conftest.$ac_ext
26255cat >>conftest.$ac_ext <<_ACEOF
26256/* end confdefs.h. */
26257#include <curses.h>
26258int
26259main ()
26260{
26261void *x=resizeterm
26262 ;
26263 return 0;
26264}
26265_ACEOF
26266rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026267if { (ac_try="$ac_compile"
26268case "(($ac_try" in
26269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26270 *) ac_try_echo=$ac_try;;
26271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026273 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000026274 ac_status=$?
26275 grep -v '^ *+' conftest.er1 >conftest.err
26276 rm -f conftest.er1
26277 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026279 (exit $ac_status); } && {
26280 test -z "$ac_c_werror_flag" ||
26281 test ! -s conftest.err
26282 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000026283
26284cat >>confdefs.h <<\_ACEOF
26285#define HAVE_CURSES_RESIZETERM 1
26286_ACEOF
26287
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026288 { echo "$as_me:$LINENO: result: yes" >&5
26289echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026290else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026291 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000026292sed 's/^/| /' conftest.$ac_ext >&5
26293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026294 { echo "$as_me:$LINENO: result: no" >&5
26295echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000026296
26297fi
Walter Dörwald4994d952006-06-19 08:07:50 +000026298
Martin v. Löwiseba40652007-08-30 20:10:57 +000026299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26300
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026301{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26302echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026303
26304if test -r /dev/ptmx
26305then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026306 { echo "$as_me:$LINENO: result: yes" >&5
26307echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026308
26309cat >>confdefs.h <<\_ACEOF
26310#define HAVE_DEV_PTMX 1
26311_ACEOF
26312
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026313else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026314 { echo "$as_me:$LINENO: result: no" >&5
26315echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026316fi
26317
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026318{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26319echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026320
26321if test -r /dev/ptc
26322then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026323 { echo "$as_me:$LINENO: result: yes" >&5
26324echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026325
26326cat >>confdefs.h <<\_ACEOF
26327#define HAVE_DEV_PTC 1
26328_ACEOF
26329
Martin v. Löwisfefbc202006-10-17 18:59:23 +000026330else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026331 { echo "$as_me:$LINENO: result: no" >&5
26332echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026333fi
26334
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026335{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26336echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026337if test "${ac_cv_have_size_t_format+set}" = set; then
26338 echo $ECHO_N "(cached) $ECHO_C" >&6
26339else
26340 if test "$cross_compiling" = yes; then
26341 ac_cv_have_size_t_format=no
Brett Cannon09d12362006-05-11 05:11:33 +000026342else
26343 cat >conftest.$ac_ext <<_ACEOF
26344/* confdefs.h. */
26345_ACEOF
26346cat confdefs.h >>conftest.$ac_ext
26347cat >>conftest.$ac_ext <<_ACEOF
26348/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026349
Brett Cannon09d12362006-05-11 05:11:33 +000026350#include <stdio.h>
26351#include <stddef.h>
26352#include <string.h>
26353
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026354#ifdef HAVE_SYS_TYPES_H
26355#include <sys/types.h>
26356#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026357
26358#ifdef HAVE_SSIZE_T
26359typedef ssize_t Py_ssize_t;
26360#elif SIZEOF_VOID_P == SIZEOF_LONG
26361typedef long Py_ssize_t;
26362#else
26363typedef int Py_ssize_t;
26364#endif
Brett Cannon09d12362006-05-11 05:11:33 +000026365
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000026366int main()
26367{
26368 char buffer[256];
26369
Brett Cannon09d12362006-05-11 05:11:33 +000026370 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26371 return 1;
26372
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000026373 if (strcmp(buffer, "123"))
26374 return 1;
26375
26376 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26377 return 1;
26378
26379 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000026380 return 1;
26381
26382 return 0;
26383}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026384
Brett Cannon09d12362006-05-11 05:11:33 +000026385_ACEOF
26386rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026387if { (ac_try="$ac_link"
26388case "(($ac_try" in
26389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26390 *) ac_try_echo=$ac_try;;
26391esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026393 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026394 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026397 { (case "(($ac_try" in
26398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26399 *) ac_try_echo=$ac_try;;
26400esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026402 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000026403 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000026405 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026406 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026407else
26408 echo "$as_me: program exited with status $ac_status" >&5
26409echo "$as_me: failed program was:" >&5
26410sed 's/^/| /' conftest.$ac_ext >&5
26411
26412( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026413ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026414fi
26415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000026416fi
26417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026418
26419
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026420fi
26421
26422{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26423echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
26424if test $ac_cv_have_size_t_format = yes
26425then
26426
26427cat >>confdefs.h <<\_ACEOF
26428#define PY_FORMAT_SIZE_T "z"
26429_ACEOF
26430
26431fi
26432
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026433{ echo "$as_me:$LINENO: checking for socklen_t" >&5
26434echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026435if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026437else
Martin v. Löwis11437992002-04-12 09:54:03 +000026438 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026439/* confdefs.h. */
26440_ACEOF
26441cat confdefs.h >>conftest.$ac_ext
26442cat >>conftest.$ac_ext <<_ACEOF
26443/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026444
26445#ifdef HAVE_SYS_TYPES_H
26446#include <sys/types.h>
26447#endif
26448#ifdef HAVE_SYS_SOCKET_H
26449#include <sys/socket.h>
26450#endif
26451
26452
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026453typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000026454int
26455main ()
26456{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026457if ((ac__type_new_ *) 0)
26458 return 0;
26459if (sizeof (ac__type_new_))
26460 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026461 ;
26462 return 0;
26463}
26464_ACEOF
26465rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026466if { (ac_try="$ac_compile"
26467case "(($ac_try" in
26468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26469 *) ac_try_echo=$ac_try;;
26470esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026474 grep -v '^ *+' conftest.er1 >conftest.err
26475 rm -f conftest.er1
26476 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026478 (exit $ac_status); } && {
26479 test -z "$ac_c_werror_flag" ||
26480 test ! -s conftest.err
26481 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026482 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000026483else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026485sed 's/^/| /' conftest.$ac_ext >&5
26486
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026487 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000026488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026489
26490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026491fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026492{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26493echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
26494if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026495 :
26496else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026497
Martin v. Löwis01c04012002-11-11 14:58:44 +000026498cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026499#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026500_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026501
26502fi
26503
Michael W. Hudson54241132001-12-07 15:38:26 +000026504
Michael W. Hudson54241132001-12-07 15:38:26 +000026505
26506
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026507for h in `(cd $srcdir;echo Python/thread_*.h)`
26508do
26509 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26510done
26511
Michael W. Hudson54241132001-12-07 15:38:26 +000026512
Neal Norwitzd24499d2005-12-18 21:36:39 +000026513SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026514{ echo "$as_me:$LINENO: checking for build directories" >&5
26515echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026516for dir in $SRCDIRS; do
26517 if test ! -d $dir; then
26518 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026519 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026520done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026521{ echo "$as_me:$LINENO: result: done" >&5
26522echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026523
Guido van Rossum627b2d71993-12-24 10:39:16 +000026524# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000026525ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026526
Martin v. Löwis11437992002-04-12 09:54:03 +000026527cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026528# This file is a shell script that caches the results of configure
26529# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026530# scripts and configure runs, see configure's option --config-cache.
26531# It is not useful on other systems. If it contains results you don't
26532# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026533#
Martin v. Löwis11437992002-04-12 09:54:03 +000026534# config.status only pays attention to the cache file if you give it
26535# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026536#
Skip Montanaro6dead952003-09-25 14:50:04 +000026537# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026538# loading this file, other *unset* `ac_cv_foo' will be assigned the
26539# following values.
26540
26541_ACEOF
26542
Guido van Rossumf78abae1997-01-21 22:02:36 +000026543# The following way of writing the cache mishandles newlines in values,
26544# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026545# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026546# Ultrix sh set writes to stderr and can't be redirected directly,
26547# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026548(
26549 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26550 eval ac_val=\$$ac_var
26551 case $ac_val in #(
26552 *${as_nl}*)
26553 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026554 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
26555echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026556 esac
26557 case $ac_var in #(
26558 _ | IFS | as_nl) ;; #(
26559 *) $as_unset $ac_var ;;
26560 esac ;;
26561 esac
26562 done
26563
Martin v. Löwis11437992002-04-12 09:54:03 +000026564 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026565 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26566 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026567 # `set' does not quote correctly, so add quotes (double-quote
26568 # substitution turns \\\\ into \\, and sed turns \\ into \).
26569 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026570 "s/'/'\\\\''/g;
26571 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026572 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026573 *)
26574 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026575 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026576 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026577 esac |
26578 sort
26579) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026580 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026581 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026582 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000026583 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026584 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26585 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000026586 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26587 :end' >>confcache
26588if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26589 if test -w "$cache_file"; then
26590 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026591 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
26592echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026593 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026594 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026595 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26596echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026597 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026598fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026599rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026601test "x$prefix" = xNONE && prefix=$ac_default_prefix
26602# Let make expand exec_prefix.
26603test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026604
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026605DEFS=-DHAVE_CONFIG_H
26606
Skip Montanaro6dead952003-09-25 14:50:04 +000026607ac_libobjs=
26608ac_ltlibobjs=
26609for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26610 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026611 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026612 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026613 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26614 # will be set to the directory where LIBOBJS objects are built.
26615 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26616 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026617done
26618LIBOBJS=$ac_libobjs
26619
26620LTLIBOBJS=$ac_ltlibobjs
26621
26622
Martin v. Löwis11437992002-04-12 09:54:03 +000026623
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026624: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000026625ac_clean_files_save=$ac_clean_files
26626ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026627{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26628echo "$as_me: creating $CONFIG_STATUS" >&6;}
26629cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026630#! $SHELL
26631# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026632# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026633# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026634# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026635
Martin v. Löwis11437992002-04-12 09:54:03 +000026636debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026637ac_cs_recheck=false
26638ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026639SHELL=\${CONFIG_SHELL-$SHELL}
26640_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026642cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026643## --------------------- ##
26644## M4sh Initialization. ##
26645## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026646
Martin v. Löwiseba40652007-08-30 20:10:57 +000026647# Be more Bourne compatible
26648DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026649if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26650 emulate sh
26651 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026652 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026653 # is contrary to our usage. Disable this feature.
26654 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026655 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000026656else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026657 case `(set -o) 2>/dev/null` in
26658 *posix*) set -o posix ;;
26659esac
26660
Martin v. Löwis11437992002-04-12 09:54:03 +000026661fi
Michael W. Hudson54241132001-12-07 15:38:26 +000026662
Skip Montanaro6dead952003-09-25 14:50:04 +000026663
Martin v. Löwis11437992002-04-12 09:54:03 +000026664
26665
Martin v. Löwiseba40652007-08-30 20:10:57 +000026666# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026667# Avoid depending upon Character Ranges.
26668as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26669as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26670as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26671as_cr_digits='0123456789'
26672as_cr_alnum=$as_cr_Letters$as_cr_digits
26673
26674# The user is always right.
26675if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026676 echo "#! /bin/sh" >conf$$.sh
26677 echo "exit 0" >>conf$$.sh
26678 chmod +x conf$$.sh
26679 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
26680 PATH_SEPARATOR=';'
26681 else
26682 PATH_SEPARATOR=:
26683 fi
26684 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026685fi
26686
Martin v. Löwiseba40652007-08-30 20:10:57 +000026687# Support unset when possible.
26688if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26689 as_unset=unset
26690else
26691 as_unset=false
26692fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026693
Martin v. Löwiseba40652007-08-30 20:10:57 +000026694
26695# IFS
26696# We need space, tab and new line, in precisely that order. Quoting is
26697# there to prevent editors from complaining about space-tab.
26698# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26699# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026700as_nl='
26701'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026702IFS=" "" $as_nl"
26703
26704# Find who we are. Look in the path if we contain no directory separator.
26705case $0 in
26706 *[\\/]* ) as_myself=$0 ;;
26707 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026708for as_dir in $PATH
26709do
26710 IFS=$as_save_IFS
26711 test -z "$as_dir" && as_dir=.
26712 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26713done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026714IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026715
Martin v. Löwiseba40652007-08-30 20:10:57 +000026716 ;;
26717esac
26718# We did not find ourselves, most probably we were run as `sh COMMAND'
26719# in which case we are not to be found in the path.
26720if test "x$as_myself" = x; then
26721 as_myself=$0
26722fi
26723if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026724 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000026725 { (exit 1); exit 1; }
26726fi
26727
26728# Work around bugs in pre-3.0 UWIN ksh.
26729for as_var in ENV MAIL MAILPATH
26730do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26731done
26732PS1='$ '
26733PS2='> '
26734PS4='+ '
26735
26736# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026737for as_var in \
26738 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
26739 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
26740 LC_TELEPHONE LC_TIME
26741do
26742 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
26743 eval $as_var=C; export $as_var
26744 else
26745 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26746 fi
26747done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026748
26749# Required to use basename.
26750if expr a : '\(a\)' >/dev/null 2>&1 &&
26751 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26752 as_expr=expr
26753else
26754 as_expr=false
26755fi
26756
26757if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26758 as_basename=basename
26759else
26760 as_basename=false
26761fi
26762
26763
26764# Name of the executable.
26765as_me=`$as_basename -- "$0" ||
26766$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26767 X"$0" : 'X\(//\)$' \| \
26768 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026769echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026770 sed '/^.*\/\([^/][^/]*\)\/*$/{
26771 s//\1/
26772 q
26773 }
26774 /^X\/\(\/\/\)$/{
26775 s//\1/
26776 q
26777 }
26778 /^X\/\(\/\).*/{
26779 s//\1/
26780 q
26781 }
26782 s/.*/./; q'`
26783
26784# CDPATH.
26785$as_unset CDPATH
26786
26787
26788
Martin v. Löwis11437992002-04-12 09:54:03 +000026789 as_lineno_1=$LINENO
26790 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026791 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026792 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026793
Martin v. Löwis11437992002-04-12 09:54:03 +000026794 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26795 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000026796 # line-number line after each line using $LINENO; the second 'sed'
26797 # does the real work. The second script uses 'N' to pair each
26798 # line-number line with the line containing $LINENO, and appends
26799 # trailing '-' during substitution so that $LINENO is not a special
26800 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026801 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026802 # scripts with optimization help from Paolo Bonzini. Blame Lee
26803 # E. McMahon (1931-1989) for sed's syntax. :-)
26804 sed -n '
26805 p
26806 /[$]LINENO/=
26807 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026808 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026809 s/[$]LINENO.*/&-/
26810 t lineno
26811 b
26812 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026813 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000026814 :loop
26815 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026816 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000026817 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026818 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026819 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026820 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026821 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026822
Martin v. Löwis11437992002-04-12 09:54:03 +000026823 # Don't try to exec as it changes $[0], causing all sort of problems
26824 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026825 # original and so on. Autoconf is especially sensitive to this).
26826 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026827 # Exit status is that of the last command.
26828 exit
26829}
26830
26831
Martin v. Löwiseba40652007-08-30 20:10:57 +000026832if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26833 as_dirname=dirname
26834else
26835 as_dirname=false
26836fi
26837
26838ECHO_C= ECHO_N= ECHO_T=
26839case `echo -n x` in
26840-n*)
26841 case `echo 'x\c'` in
26842 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26843 *) ECHO_C='\c';;
26844 esac;;
26845*)
26846 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026847esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026848
Martin v. Löwiseba40652007-08-30 20:10:57 +000026849if expr a : '\(a\)' >/dev/null 2>&1 &&
26850 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026851 as_expr=expr
26852else
26853 as_expr=false
26854fi
26855
26856rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026857if test -d conf$$.dir; then
26858 rm -f conf$$.dir/conf$$.file
26859else
26860 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026861 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000026862fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026863echo >conf$$.file
26864if ln -s conf$$.file conf$$ 2>/dev/null; then
26865 as_ln_s='ln -s'
26866 # ... but there are two gotchas:
26867 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26868 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26869 # In both cases, we have to default to `cp -p'.
26870 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026871 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026872elif ln conf$$.file conf$$ 2>/dev/null; then
26873 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000026874else
26875 as_ln_s='cp -p'
26876fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026877rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26878rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026879
Skip Montanaro6dead952003-09-25 14:50:04 +000026880if mkdir -p . 2>/dev/null; then
26881 as_mkdir_p=:
26882else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026883 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026884 as_mkdir_p=false
26885fi
26886
Martin v. Löwiseba40652007-08-30 20:10:57 +000026887if test -x / >/dev/null 2>&1; then
26888 as_test_x='test -x'
26889else
26890 if ls -dL / >/dev/null 2>&1; then
26891 as_ls_L_option=L
26892 else
26893 as_ls_L_option=
26894 fi
26895 as_test_x='
26896 eval sh -c '\''
26897 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026898 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000026899 else
26900 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026901 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026902 esac;
26903 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26904 ???[sx]*):;;*)false;;esac;fi
26905 '\'' sh
26906 '
26907fi
26908as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026909
26910# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026911as_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 +000026912
26913# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026914as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026915
26916
Martin v. Löwis11437992002-04-12 09:54:03 +000026917exec 6>&1
26918
Martin v. Löwiseba40652007-08-30 20:10:57 +000026919# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026920# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000026921# values after options handling.
26922ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000026923This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026924generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026925
26926 CONFIG_FILES = $CONFIG_FILES
26927 CONFIG_HEADERS = $CONFIG_HEADERS
26928 CONFIG_LINKS = $CONFIG_LINKS
26929 CONFIG_COMMANDS = $CONFIG_COMMANDS
26930 $ $0 $@
26931
Martin v. Löwiseba40652007-08-30 20:10:57 +000026932on `(hostname || uname -n) 2>/dev/null | sed 1q`
26933"
26934
Martin v. Löwis11437992002-04-12 09:54:03 +000026935_ACEOF
26936
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026937cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026938# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000026939config_files="$ac_config_files"
26940config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026941
Martin v. Löwiseba40652007-08-30 20:10:57 +000026942_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026943
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026944cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026945ac_cs_usage="\
26946\`$as_me' instantiates files from templates according to the
26947current configuration.
26948
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026949Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026950
26951 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000026952 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026953 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026954 -d, --debug don't remove temporary files
26955 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026956 --file=FILE[:TEMPLATE]
26957 instantiate the configuration file FILE
26958 --header=FILE[:TEMPLATE]
26959 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026960
26961Configuration files:
26962$config_files
26963
26964Configuration headers:
26965$config_headers
26966
26967Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000026968
Martin v. Löwiseba40652007-08-30 20:10:57 +000026969_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026970cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026971ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000026972python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026973configured by $0, generated by GNU Autoconf 2.61,
26974 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026975
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026976Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026977This config.status script is free software; the Free Software Foundation
26978gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000026979
26980ac_pwd='$ac_pwd'
26981srcdir='$srcdir'
26982INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000026983_ACEOF
26984
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026985cat >>$CONFIG_STATUS <<\_ACEOF
26986# If no file are specified by the user, then we need to provide default
26987# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000026988ac_need_defaults=:
26989while test $# != 0
26990do
26991 case $1 in
26992 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000026993 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26994 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026995 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026996 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026997 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026998 ac_option=$1
26999 ac_optarg=$2
27000 ac_shift=shift
27001 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027002 esac
27003
Skip Montanaro6dead952003-09-25 14:50:04 +000027004 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027005 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027006 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27007 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027008 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027009 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027010 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027011 debug=: ;;
27012 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027013 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027014 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027015 ac_need_defaults=false;;
27016 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027017 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027018 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000027019 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027020 --he | --h)
27021 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027022 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027023Try \`$0 --help' for more information." >&2
27024 { (exit 1); exit 1; }; };;
27025 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027026 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027027 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27028 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27029 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027030
27031 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027032 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027033Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027034 { (exit 1); exit 1; }; } ;;
27035
Martin v. Löwiseba40652007-08-30 20:10:57 +000027036 *) ac_config_targets="$ac_config_targets $1"
27037 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027038
27039 esac
27040 shift
27041done
27042
Skip Montanaro6dead952003-09-25 14:50:04 +000027043ac_configure_extra_args=
27044
27045if $ac_cs_silent; then
27046 exec 6>/dev/null
27047 ac_configure_extra_args="$ac_configure_extra_args --silent"
27048fi
27049
27050_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027051cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027052if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027053 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
27054 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000027055 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027056 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000027057fi
27058
Martin v. Löwis11437992002-04-12 09:54:03 +000027059_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027060cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027061exec 5>>config.log
27062{
27063 echo
27064 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27065## Running $as_me. ##
27066_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027067 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027068} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027069
Martin v. Löwiseba40652007-08-30 20:10:57 +000027070_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027071cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027072_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027073
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027074cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027075
27076# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027077for ac_config_target in $ac_config_targets
27078do
Martin v. Löwiseba40652007-08-30 20:10:57 +000027079 case $ac_config_target in
27080 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27081 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27082 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
27083 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000027084 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27085 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027086 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27087 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027088 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027090 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27091echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027092 { (exit 1); exit 1; }; };;
27093 esac
27094done
27095
Martin v. Löwiseba40652007-08-30 20:10:57 +000027096
Martin v. Löwis11437992002-04-12 09:54:03 +000027097# If the user did not use the arguments to specify the items to instantiate,
27098# then the envvar interface is used. Set only those that are not.
27099# We use the long form for the default assignment because of an extremely
27100# bizarre bug on SunOS 4.1.3.
27101if $ac_need_defaults; then
27102 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27103 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27104fi
27105
Skip Montanaro6dead952003-09-25 14:50:04 +000027106# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000027107# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027108# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027109# Hook for its removal unless debugging.
27110# Note that there is a small window in which the directory will not be cleaned:
27111# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027112$debug ||
27113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027114 tmp=
27115 trap 'exit_status=$?
27116 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27117' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027118 trap '{ (exit 1); exit 1; }' 1 2 13 15
27119}
Martin v. Löwis11437992002-04-12 09:54:03 +000027120# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027121
Martin v. Löwis11437992002-04-12 09:54:03 +000027122{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027123 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027124 test -n "$tmp" && test -d "$tmp"
27125} ||
27126{
Martin v. Löwiseba40652007-08-30 20:10:57 +000027127 tmp=./conf$$-$RANDOM
27128 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027129} ||
27130{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027131 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027132 { (exit 1); exit 1; }
27133}
27134
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027135#
27136# Set up the sed scripts for CONFIG_FILES section.
27137#
27138
27139# No need to generate the scripts if there are no CONFIG_FILES.
27140# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000027141if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027142
27143_ACEOF
27144
Martin v. Löwiseba40652007-08-30 20:10:57 +000027145
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027146
Martin v. Löwiseba40652007-08-30 20:10:57 +000027147ac_delim='%!_!# '
27148for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027149 cat >conf$$subs.sed <<_ACEOF
27150SHELL!$SHELL$ac_delim
27151PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
27152PACKAGE_NAME!$PACKAGE_NAME$ac_delim
27153PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
27154PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
27155PACKAGE_STRING!$PACKAGE_STRING$ac_delim
27156PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
27157exec_prefix!$exec_prefix$ac_delim
27158prefix!$prefix$ac_delim
27159program_transform_name!$program_transform_name$ac_delim
27160bindir!$bindir$ac_delim
27161sbindir!$sbindir$ac_delim
27162libexecdir!$libexecdir$ac_delim
27163datarootdir!$datarootdir$ac_delim
27164datadir!$datadir$ac_delim
27165sysconfdir!$sysconfdir$ac_delim
27166sharedstatedir!$sharedstatedir$ac_delim
27167localstatedir!$localstatedir$ac_delim
27168includedir!$includedir$ac_delim
27169oldincludedir!$oldincludedir$ac_delim
27170docdir!$docdir$ac_delim
27171infodir!$infodir$ac_delim
27172htmldir!$htmldir$ac_delim
27173dvidir!$dvidir$ac_delim
27174pdfdir!$pdfdir$ac_delim
27175psdir!$psdir$ac_delim
27176libdir!$libdir$ac_delim
27177localedir!$localedir$ac_delim
27178mandir!$mandir$ac_delim
27179DEFS!$DEFS$ac_delim
27180ECHO_C!$ECHO_C$ac_delim
27181ECHO_N!$ECHO_N$ac_delim
27182ECHO_T!$ECHO_T$ac_delim
27183LIBS!$LIBS$ac_delim
27184build_alias!$build_alias$ac_delim
27185host_alias!$host_alias$ac_delim
27186target_alias!$target_alias$ac_delim
27187VERSION!$VERSION$ac_delim
27188SOVERSION!$SOVERSION$ac_delim
27189CONFIG_ARGS!$CONFIG_ARGS$ac_delim
27190UNIVERSALSDK!$UNIVERSALSDK$ac_delim
27191ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
27192PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
27193PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
27194PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
27195PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
27196PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
27197FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
27198FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
27199FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
27200FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
27201FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
27202MACHDEP!$MACHDEP$ac_delim
27203SGI_ABI!$SGI_ABI$ac_delim
27204EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
27205EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
27206CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
27207EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
27208CC!$CC$ac_delim
27209CFLAGS!$CFLAGS$ac_delim
27210LDFLAGS!$LDFLAGS$ac_delim
27211CPPFLAGS!$CPPFLAGS$ac_delim
27212ac_ct_CC!$ac_ct_CC$ac_delim
27213EXEEXT!$EXEEXT$ac_delim
27214OBJEXT!$OBJEXT$ac_delim
27215CXX!$CXX$ac_delim
27216MAINCC!$MAINCC$ac_delim
27217CPP!$CPP$ac_delim
27218GREP!$GREP$ac_delim
27219EGREP!$EGREP$ac_delim
27220BUILDEXEEXT!$BUILDEXEEXT$ac_delim
27221LIBRARY!$LIBRARY$ac_delim
27222LDLIBRARY!$LDLIBRARY$ac_delim
27223DLLLIBRARY!$DLLLIBRARY$ac_delim
27224BLDLIBRARY!$BLDLIBRARY$ac_delim
27225LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
27226INSTSONAME!$INSTSONAME$ac_delim
27227RUNSHARED!$RUNSHARED$ac_delim
27228LINKCC!$LINKCC$ac_delim
27229GNULD!$GNULD$ac_delim
27230RANLIB!$RANLIB$ac_delim
27231AR!$AR$ac_delim
27232ARFLAGS!$ARFLAGS$ac_delim
27233SVNVERSION!$SVNVERSION$ac_delim
27234INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
27235INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
27236INSTALL_DATA!$INSTALL_DATA$ac_delim
27237LN!$LN$ac_delim
27238OPT!$OPT$ac_delim
27239BASECFLAGS!$BASECFLAGS$ac_delim
27240UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
27241OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
27242LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
27243SO!$SO$ac_delim
27244LDSHARED!$LDSHARED$ac_delim
27245BLDSHARED!$BLDSHARED$ac_delim
27246CCSHARED!$CCSHARED$ac_delim
27247_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027248
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027249 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000027250 break
27251 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027252 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27253echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027254 { (exit 1); exit 1; }; }
27255 else
27256 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027257 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027258done
27259
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027260ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27261if test -n "$ac_eof"; then
27262 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27263 ac_eof=`expr $ac_eof + 1`
27264fi
27265
27266cat >>$CONFIG_STATUS <<_ACEOF
27267cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
27268/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000027269_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027270sed '
27271s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27272s/^/s,@/; s/!/@,|#_!!_#|/
27273:n
27274t n
27275s/'"$ac_delim"'$/,g/; t
27276s/$/\\/; p
27277N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27278' >>$CONFIG_STATUS <conf$$subs.sed
27279rm -f conf$$subs.sed
27280cat >>$CONFIG_STATUS <<_ACEOF
27281CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000027282_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027283
27284
27285ac_delim='%!_!# '
27286for ac_last_try in false false false false false :; do
27287 cat >conf$$subs.sed <<_ACEOF
27288LINKFORSHARED!$LINKFORSHARED$ac_delim
27289CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
27290SHLIBS!$SHLIBS$ac_delim
27291USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
27292SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
27293USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
27294LDLAST!$LDLAST$ac_delim
27295THREADOBJ!$THREADOBJ$ac_delim
27296DLINCLDIR!$DLINCLDIR$ac_delim
27297DYNLOADFILE!$DYNLOADFILE$ac_delim
27298MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
27299TRUE!$TRUE$ac_delim
27300LIBOBJS!$LIBOBJS$ac_delim
27301HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
27302HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
27303HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
27304HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
27305HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
27306LIBM!$LIBM$ac_delim
27307LIBC!$LIBC$ac_delim
27308UNICODE_OBJS!$UNICODE_OBJS$ac_delim
27309THREADHEADERS!$THREADHEADERS$ac_delim
27310SRCDIRS!$SRCDIRS$ac_delim
27311LTLIBOBJS!$LTLIBOBJS$ac_delim
27312_ACEOF
27313
27314 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
27315 break
27316 elif $ac_last_try; then
27317 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27318echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027319 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027320 else
27321 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27322 fi
27323done
27324
27325ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
27326if test -n "$ac_eof"; then
27327 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
27328 ac_eof=`expr $ac_eof + 1`
27329fi
27330
27331cat >>$CONFIG_STATUS <<_ACEOF
27332cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
27333/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027334_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027335sed '
27336s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
27337s/^/s,@/; s/!/@,|#_!!_#|/
27338:n
27339t n
27340s/'"$ac_delim"'$/,g/; t
27341s/$/\\/; p
27342N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
27343' >>$CONFIG_STATUS <conf$$subs.sed
27344rm -f conf$$subs.sed
27345cat >>$CONFIG_STATUS <<_ACEOF
27346:end
27347s/|#_!!_#|//g
27348CEOF$ac_eof
27349_ACEOF
27350
Martin v. Löwiseba40652007-08-30 20:10:57 +000027351
27352# VPATH may cause trouble with some makes, so we remove $(srcdir),
27353# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27354# trailing colons and then remove the whole line if VPATH becomes empty
27355# (actually we leave an empty line to preserve line numbers).
27356if test "x$srcdir" = x.; then
27357 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27358s/:*\$(srcdir):*/:/
27359s/:*\${srcdir}:*/:/
27360s/:*@srcdir@:*/:/
27361s/^\([^=]*=[ ]*\):*/\1/
27362s/:*$//
27363s/^[^=]*=[ ]*$//
27364}'
27365fi
27366
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027367cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027368fi # test -n "$CONFIG_FILES"
27369
Martin v. Löwiseba40652007-08-30 20:10:57 +000027370
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027371for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000027372do
27373 case $ac_tag in
27374 :[FHLC]) ac_mode=$ac_tag; continue;;
27375 esac
27376 case $ac_mode$ac_tag in
27377 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027378 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
27379echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027380 { (exit 1); exit 1; }; };;
27381 :[FH]-) ac_tag=-:-;;
27382 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27383 esac
27384 ac_save_IFS=$IFS
27385 IFS=:
27386 set x $ac_tag
27387 IFS=$ac_save_IFS
27388 shift
27389 ac_file=$1
27390 shift
27391
27392 case $ac_mode in
27393 :L) ac_source=$1;;
27394 :[FH])
27395 ac_file_inputs=
27396 for ac_f
27397 do
27398 case $ac_f in
27399 -) ac_f="$tmp/stdin";;
27400 *) # Look for the file first in the build tree, then in the source tree
27401 # (if the path is not absolute). The absolute path cannot be DOS-style,
27402 # because $ac_f cannot contain `:'.
27403 test -f "$ac_f" ||
27404 case $ac_f in
27405 [\\/$]*) false;;
27406 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27407 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027408 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27409echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027410 { (exit 1); exit 1; }; };;
27411 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027412 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027413 done
27414
27415 # Let's still pretend it is `configure' which instantiates (i.e., don't
27416 # use $as_me), people would be surprised to read:
27417 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027418 configure_input="Generated from "`IFS=:
27419 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000027420 if test x"$ac_file" != x-; then
27421 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027422 { echo "$as_me:$LINENO: creating $ac_file" >&5
27423echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027424 fi
27425
27426 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027427 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027428 esac
27429 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027430 esac
27431
Martin v. Löwiseba40652007-08-30 20:10:57 +000027432 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027433$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027434 X"$ac_file" : 'X\(//\)[^/]' \| \
27435 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027436 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027437echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027438 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27439 s//\1/
27440 q
27441 }
27442 /^X\(\/\/\)[^/].*/{
27443 s//\1/
27444 q
27445 }
27446 /^X\(\/\/\)$/{
27447 s//\1/
27448 q
27449 }
27450 /^X\(\/\).*/{
27451 s//\1/
27452 q
27453 }
27454 s/.*/./; q'`
27455 { as_dir="$ac_dir"
27456 case $as_dir in #(
27457 -*) as_dir=./$as_dir;;
27458 esac
27459 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027460 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027461 while :; do
27462 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027463 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027464 *) as_qdir=$as_dir;;
27465 esac
27466 as_dirs="'$as_qdir' $as_dirs"
27467 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027468$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027469 X"$as_dir" : 'X\(//\)[^/]' \| \
27470 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027471 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027472echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027473 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27474 s//\1/
27475 q
27476 }
27477 /^X\(\/\/\)[^/].*/{
27478 s//\1/
27479 q
27480 }
27481 /^X\(\/\/\)$/{
27482 s//\1/
27483 q
27484 }
27485 /^X\(\/\).*/{
27486 s//\1/
27487 q
27488 }
27489 s/.*/./; q'`
27490 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027491 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027492 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027493 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27494echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027495 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027496 ac_builddir=.
27497
Martin v. Löwiseba40652007-08-30 20:10:57 +000027498case "$ac_dir" in
27499.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27500*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027501 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027502 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027503 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027504 case $ac_top_builddir_sub in
27505 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27506 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27507 esac ;;
27508esac
27509ac_abs_top_builddir=$ac_pwd
27510ac_abs_builddir=$ac_pwd$ac_dir_suffix
27511# for backward compatibility:
27512ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027513
27514case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027515 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027516 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027517 ac_top_srcdir=$ac_top_builddir_sub
27518 ac_abs_top_srcdir=$ac_pwd ;;
27519 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027520 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027521 ac_top_srcdir=$srcdir
27522 ac_abs_top_srcdir=$srcdir ;;
27523 *) # Relative name.
27524 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27525 ac_top_srcdir=$ac_top_build_prefix$srcdir
27526 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027527esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027528ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027529
Martin v. Löwis11437992002-04-12 09:54:03 +000027530
Martin v. Löwiseba40652007-08-30 20:10:57 +000027531 case $ac_mode in
27532 :F)
27533 #
27534 # CONFIG_FILE
27535 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027536
27537 case $INSTALL in
27538 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027539 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027540 esac
Brett Cannon19fab762007-06-02 03:02:29 +000027541_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027542
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027543cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027544# If the template does not know about datarootdir, expand it.
27545# FIXME: This hack should be removed a few years after 2.60.
27546ac_datarootdir_hack=; ac_datarootdir_seen=
27547
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027548case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000027549 p
27550 q
27551}
27552/@datadir@/p
27553/@docdir@/p
27554/@infodir@/p
27555/@localedir@/p
27556/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027557' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027558*datarootdir*) ac_datarootdir_seen=yes;;
27559*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027560 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27561echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027562_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027563cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027564 ac_datarootdir_hack='
27565 s&@datadir@&$datadir&g
27566 s&@docdir@&$docdir&g
27567 s&@infodir@&$infodir&g
27568 s&@localedir@&$localedir&g
27569 s&@mandir@&$mandir&g
27570 s&\\\${datarootdir}&$datarootdir&g' ;;
27571esac
27572_ACEOF
27573
27574# Neutralize VPATH when `$srcdir' = `.'.
27575# Shell code in configure.ac might set extrasub.
27576# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027577cat >>$CONFIG_STATUS <<_ACEOF
27578 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027579$extrasub
27580_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027581cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027582:t
27583/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027584s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027585s&@top_builddir@&$ac_top_builddir_sub&;t t
27586s&@srcdir@&$ac_srcdir&;t t
27587s&@abs_srcdir@&$ac_abs_srcdir&;t t
27588s&@top_srcdir@&$ac_top_srcdir&;t t
27589s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27590s&@builddir@&$ac_builddir&;t t
27591s&@abs_builddir@&$ac_abs_builddir&;t t
27592s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27593s&@INSTALL@&$ac_INSTALL&;t t
27594$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027595" $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 +000027596
Martin v. Löwiseba40652007-08-30 20:10:57 +000027597test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27598 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27599 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027600 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027601which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027602echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027603which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027604
Martin v. Löwiseba40652007-08-30 20:10:57 +000027605 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027606 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027607 -) cat "$tmp/out"; rm -f "$tmp/out";;
27608 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
27609 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027610 ;;
27611 :H)
27612 #
27613 # CONFIG_HEADER
27614 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027615_ACEOF
27616
27617# Transform confdefs.h into a sed script `conftest.defines', that
27618# substitutes the proper values into config.h.in to produce config.h.
27619rm -f conftest.defines conftest.tail
27620# First, append a space to every undef/define line, to ease matching.
27621echo 's/$/ /' >conftest.defines
27622# Then, protect against being on the right side of a sed subst, or in
27623# an unquoted here document, in config.status. If some macros were
27624# called several times there might be several #defines for the same
27625# symbol, which is useless. But do not sort them, since the last
27626# AC_DEFINE must be honored.
27627ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27628# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
27629# NAME is the cpp macro being defined, VALUE is the value it is being given.
27630# PARAMS is the parameter list in the macro definition--in most cases, it's
27631# just an empty string.
27632ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
27633ac_dB='\\)[ (].*,\\1define\\2'
27634ac_dC=' '
27635ac_dD=' ,'
27636
27637uniq confdefs.h |
27638 sed -n '
27639 t rset
27640 :rset
27641 s/^[ ]*#[ ]*define[ ][ ]*//
27642 t ok
27643 d
27644 :ok
27645 s/[\\&,]/\\&/g
27646 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
27647 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
27648 ' >>conftest.defines
27649
27650# Remove the space that was appended to ease matching.
27651# Then replace #undef with comments. This is necessary, for
27652# example, in the case of _POSIX_SOURCE, which is predefined and required
27653# on some systems where configure will not decide to define it.
27654# (The regexp can be short, since the line contains either #define or #undef.)
27655echo 's/ $//
27656s,^[ #]*u.*,/* & */,' >>conftest.defines
27657
27658# Break up conftest.defines:
27659ac_max_sed_lines=50
27660
27661# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
27662# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
27663# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
27664# et cetera.
27665ac_in='$ac_file_inputs'
27666ac_out='"$tmp/out1"'
27667ac_nxt='"$tmp/out2"'
27668
27669while :
27670do
27671 # Write a here document:
27672 cat >>$CONFIG_STATUS <<_ACEOF
27673 # First, check the format of the line:
27674 cat >"\$tmp/defines.sed" <<\\CEOF
27675/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
27676/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
27677b
27678:def
27679_ACEOF
27680 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
27681 echo 'CEOF
27682 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
27683 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
27684 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
27685 grep . conftest.tail >/dev/null || break
27686 rm -f conftest.defines
27687 mv conftest.tail conftest.defines
27688done
27689rm -f conftest.defines conftest.tail
27690
27691echo "ac_result=$ac_in" >>$CONFIG_STATUS
27692cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027693 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027694 echo "/* $configure_input */" >"$tmp/config.h"
27695 cat "$ac_result" >>"$tmp/config.h"
27696 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
27697 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27698echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027699 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027700 rm -f $ac_file
27701 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000027702 fi
27703 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027704 echo "/* $configure_input */"
27705 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000027706 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027707 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027708 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027709
Martin v. Löwiseba40652007-08-30 20:10:57 +000027710
27711 esac
27712
27713done # for ac_tag
27714
Guido van Rossum627b2d71993-12-24 10:39:16 +000027715
Martin v. Löwis11437992002-04-12 09:54:03 +000027716{ (exit 0); exit 0; }
27717_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027718chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027719ac_clean_files=$ac_clean_files_save
27720
27721
27722# configure is writing to config.log, and then calls config.status.
27723# config.status does its own redirection, appending to config.log.
27724# Unfortunately, on DOS this fails, as config.log is still kept open
27725# by configure, so config.status won't be able to write to it; its
27726# output is simply discarded. So we exec the FD to /dev/null,
27727# effectively closing config.log, so it can be properly (re)opened and
27728# appended to by config.status. When coming back to configure, we
27729# need to make the FD available again.
27730if test "$no_create" != yes; then
27731 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027732 ac_config_status_args=
27733 test "$silent" = yes &&
27734 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027735 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027736 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027737 exec 5>>config.log
27738 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27739 # would make configure fail if this is the last instruction.
27740 $ac_cs_success || { (exit 1); exit 1; }
27741fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027742
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027743
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027744echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027745if test ! -f Modules/Setup
27746then
27747 cp $srcdir/Modules/Setup.dist Modules/Setup
27748fi
27749
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027750echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027751if test ! -f Modules/Setup.local
27752then
27753 echo "# Edit this file for local setup changes" >Modules/Setup.local
27754fi
27755
27756echo "creating Makefile"
27757$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27758 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027759 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000027760
27761case $ac_sys_system in
27762BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027763 { echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027764
27765 Support for BeOS is deprecated as of Python 2.6.
27766 See PEP 11 for the gory details.
27767 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027768echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027769
27770 Support for BeOS is deprecated as of Python 2.6.
27771 See PEP 11 for the gory details.
27772 " >&2;}
27773 ;;
27774*) ;;
27775esac
27776
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027777mv config.c Modules